I'm attempting to cause floating point exceptions (divide by zero, odd-register, etc.) and handle them in custom handlers. If I include handlers and step into the kernel code, (cause) and (epc) are 0x00000000. If I don't include a handler, the exception is correctly identified but I can't step into the kernel.
Tried all the combinations I could think of plus many hours searching but can find almost nothing about handling floating point exceptions in MARS. Not all that much for MIPS either.
.include "exceptions-s.asm"
.data :
Pi : .double 3.141592653589793238462643383279502884
.globl main
.text
main :
ldc1 $f5, Pi
Without custom handler, "line 18: Runtime exception at 0x00400004: first register must be even-numbered" but can't step into kernel code.
With custom handler, (custom) and (epc) are 0x00000000. Can step into kernel but results are useless.
User contributions licensed under CC BY-SA 3.0