added trap_math and trap_illegal