diff options
author | Andrew Waterman <waterman@s141.Millennium.Berkeley.EDU> | 2011-01-10 16:35:20 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@s141.Millennium.Berkeley.EDU> | 2011-01-10 16:35:20 -0800 |
commit | 0cf0242c3bb3fbd9aba37ca21325ea4d11b83f1b (patch) | |
tree | 38d355d9b28f003ab682e9b75c7552366f37cca8 /pk/fp.c | |
parent | b83d64df0179835678c54401ec88bd37e03e19ba (diff) | |
download | pk-0cf0242c3bb3fbd9aba37ca21325ea4d11b83f1b.zip pk-0cf0242c3bb3fbd9aba37ca21325ea4d11b83f1b.tar.gz pk-0cf0242c3bb3fbd9aba37ca21325ea4d11b83f1b.tar.bz2 |
[pk] added --disable-fp-emulation option for code size
Diffstat (limited to 'pk/fp.c')
-rw-r--r-- | pk/fp.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1,8 +1,13 @@ +#include "pk.h" #include "pcr.h" +#include "fp.h" + +static fp_state_t fp_state; + +#ifdef PK_ENABLE_FP_EMULATION + #include "softfloat.h" #include "riscv-opc.h" -#include "pk.h" -#include "fp.h" #include <stdint.h> #define noisy 0 @@ -10,8 +15,6 @@ static void set_fp_reg(unsigned int which, unsigned int dp, uint64_t val); static uint64_t get_fp_reg(unsigned int which, unsigned int dp); -static fp_state_t fp_state; - static inline void validate_address(trapframe_t* tf, long addr, int size, int store) { @@ -252,6 +255,8 @@ get_fp_reg(unsigned int which, unsigned int dp) return val; } +#endif + void init_fp_regs() { long sr = mfpcr(PCR_SR); @@ -259,4 +264,3 @@ void init_fp_regs() put_fp_state(fp_state.fpr,fp_state.fsr); mtpcr(sr, PCR_SR); } - |