diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-07-26 20:25:50 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-07-26 20:25:50 -0700 |
commit | 3168b8a9049d062192ea20e4b33fed6286e84220 (patch) | |
tree | 157217cb2107615c3c74fc8b0af6988f6f6f571c /pk/fp.c | |
parent | 80a4afcb47c0b82b36bd818b4c47e5dfd506ae77 (diff) | |
download | pk-3168b8a9049d062192ea20e4b33fed6286e84220.zip pk-3168b8a9049d062192ea20e4b33fed6286e84220.tar.gz pk-3168b8a9049d062192ea20e4b33fed6286e84220.tar.bz2 |
New supervisor mode
Diffstat (limited to 'pk/fp.c')
-rw-r--r-- | pk/fp.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -91,13 +91,13 @@ int emulate_fp(trapframe_t* tf) validate_address(tf, effective_address_store, 8, 1); *(uint64_t*)effective_address_store = frs2d; } - else if(IS_INSN(MFTX_S)) + else if(IS_INSN(FMV_X_S)) XRDR = frs1s; - else if(IS_INSN(MFTX_D)) + else if(IS_INSN(FMV_X_D)) XRDR = frs1d; - else if(IS_INSN(MXTF_S)) + else if(IS_INSN(FMV_S_X)) DO_WRITEBACK(0, XRS1); - else if(IS_INSN(MXTF_D)) + else if(IS_INSN(FMV_D_X)) DO_WRITEBACK(1, XRS1); else if(IS_INSN(FSGNJ_S)) DO_WRITEBACK(0, (frs1s &~ (uint32_t)INT32_MIN) | (frs2s & (uint32_t)INT32_MIN)); @@ -210,8 +210,8 @@ int emulate_fp(trapframe_t* tf) #define STR(x) XSTR(x) #define XSTR(x) #x -#define PUT_FP_REG(which, type, val) asm("mxtf." STR(type) " f" STR(which) ",%0" : : "r"(val)) -#define GET_FP_REG(which, type, val) asm("mftx." STR(type) " %0,f" STR(which) : "=r"(val)) +#define PUT_FP_REG(which, type, val) asm("fmv." STR(type) ".x f" STR(which) ",%0" : : "r"(val)) +#define GET_FP_REG(which, type, val) asm("fmv.x." STR(type) " %0,f" STR(which) : "=r"(val)) #define LOAD_FP_REG(which, type, val) asm("fl" STR(type) " f" STR(which) ",%0" : : "m"(val)) #define STORE_FP_REG(which, type, val) asm("fs" STR(type) " f" STR(which) ",%0" : "=m"(val) : : "memory") |