X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fvfpu.cpp;h=bf9e9e674be40dbef10d45a8cb1f4b836908bab1;hp=85637fff122e9f773812086244367cae792e8ffa;hb=d9c0c3792133f87cd224dc22be428be8ddc016d8;hpb=7fc41b098090ad2d365ef34700542656947aa8ff diff --git a/src/vfpu.cpp b/src/vfpu.cpp index 85637ff..bf9e9e6 100644 --- a/src/vfpu.cpp +++ b/src/vfpu.cpp @@ -21,7 +21,7 @@ using namespace std; namespace VFPU { - + static const char g_fpu[] = "vfpu"; static bool g_running = false; @@ -114,9 +114,8 @@ float Exec(float opa, float opb, Opcode op, Rmode rmode) Register Exec(const Register & a, const Register & b, Opcode op, Rmode rmode) { assert(g_running); - stringstream s; - s << hex << setw(8) << setfill('0') << a.to_ullong() << "\n" << b.to_ullong() << "\n" << setw(3) << op <<"\n" << setw(2) << rmode << "\n\n"; + s << hex << setw(8) << setfill('0') << a.to_ulong() << "\n" << b.to_ulong() << "\n" << setw(1) << op <<"\n" << setw(1) << rmode << "\n"; string str(s.str()); //Debug("Writing: %s", str.c_str()); @@ -138,7 +137,8 @@ Register Exec(const Register & a, const Register & b, Opcode op, Rmode rmode) } stringstream s2; - s2 << hex << result.to_ullong(); + //TODO: Make it compile on non C++11 + s2 << hex << result.to_ulong(); //Debug("Result is: %s", s2.str().c_str()); return result; }