X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fvfpu.h;h=8444afd27a31feb4761d20a4a9f2d8df4b7f10ac;hp=04de1360d647eb6bbd211bb7672bab3cd242549c;hb=9e1a33043e1242c4605f2a3a48bd948fc760d948;hpb=29f315953466e71fc76b1b05c79c1231e5c83074 diff --git a/src/vfpu.h b/src/vfpu.h index 04de136..8444afd 100644 --- a/src/vfpu.h +++ b/src/vfpu.h @@ -11,8 +11,8 @@ namespace VFPU { extern int Start(const char * vcd_output = NULL); // Starts the VFPU extern int Halt(); // Halts the VFPU - typedef enum {ADD=0x000, SUB=0x001, MULT=0x010, DIV=0x011, SQRT=0x100} Opcode; - typedef enum {EVEN=0x00, ZERO=0x01, UP=0x10, DOWN=0x11} Rmode; // Rounding mode; to even, towards zero, always up, always down + typedef enum {ADD=0x0, SUB=0x1, MULT=0x2, DIV=0x3, SQRT=0x4} Opcode; + typedef enum {EVEN=0x0, ZERO=0x1, UP=0x2, DOWN=0x3} Rmode; // Rounding mode; to even, towards zero, always up, always down typedef std::bitset<32> Register; extern Register Exec(const Register & a, const Register & b, Opcode op, Rmode rmode = EVEN); // operate with registers extern float Exec(float a, float b, Opcode op, Rmode rmode = EVEN); //converts floats into registers and back @@ -86,11 +86,6 @@ namespace VFPU float m_value; }; - - inline Float pow(const Float & a, const Float & b) - { - return Float(pow(a.m_value, b.m_value)); - } } #endif //_VFPU_H