aboutsummaryrefslogtreecommitdiff
path: root/pk
diff options
context:
space:
mode:
authorDarius Rad <darius@bluespec.com>2015-09-21 08:58:01 -0400
committerDarius Rad <darius@bluespec.com>2015-11-18 08:33:45 -0500
commit6300bfbbf81bae92a89b085454898313703acd99 (patch)
treeb928e4c04778ff569fd638bd1c746f1126d41ee7 /pk
parent197a8b81e4bbf61c497c93c0ac4630a33ab11b1c (diff)
downloadriscv-pk-6300bfbbf81bae92a89b085454898313703acd99.zip
riscv-pk-6300bfbbf81bae92a89b085454898313703acd99.tar.gz
riscv-pk-6300bfbbf81bae92a89b085454898313703acd99.tar.bz2
Fix --disable-fp-emulation.
Diffstat (limited to 'pk')
-rw-r--r--pk/mtrap.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/pk/mtrap.c b/pk/mtrap.c
index d5aafd6..88a8a46 100644
--- a/pk/mtrap.c
+++ b/pk/mtrap.c
@@ -9,7 +9,11 @@ uintptr_t illegal_insn_trap(uintptr_t mcause, uintptr_t* regs)
asm (".pushsection .rodata\n"
"illegal_insn_trap_table:\n"
" .word truly_illegal_insn\n"
+#ifdef PK_ENABLE_FP_EMULATION
" .word emulate_float_load\n"
+#else
+ " .word truly_illegal_insn\n"
+#endif
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
@@ -17,26 +21,42 @@ uintptr_t illegal_insn_trap(uintptr_t mcause, uintptr_t* regs)
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
+#ifdef PK_ENABLE_FP_EMULATION
" .word emulate_float_store\n"
+#else
+ " .word truly_illegal_insn\n"
+#endif
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word emulate_mul_div\n"
" .word truly_illegal_insn\n"
" .word emulate_mul_div32\n"
" .word truly_illegal_insn\n"
+#ifdef PK_ENABLE_FP_EMULATION
" .word emulate_fmadd\n"
" .word emulate_fmsub\n"
" .word emulate_fnmsub\n"
" .word emulate_fnmadd\n"
" .word emulate_fp\n"
+#else
+ " .word truly_illegal_insn\n"
+ " .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
+#endif
+ " .word truly_illegal_insn\n"
+ " .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
+ " .word truly_illegal_insn\n"
+#ifdef PK_ENABLE_FP_EMULATION
" .word emulate_system\n"
+#else
+ " .word truly_illegal_insn\n"
+#endif
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"
" .word truly_illegal_insn\n"