CACAO
Macros | Enumerations
md-trap.hpp File Reference

Go to the source code of this file.

Macros

#define TRAP_INSTRUCTION_IS_LOAD   0
 Trap number defines. More...
 
#define MD_TRAP_COMPILER_FIXUP(xpc, ra, sp, pv)
 Macro to fixup a compiler stub. More...
 

Enumerations

enum  {
  TRAP_NullPointerException = 0, TRAP_ArithmeticException = 2, TRAP_ArrayIndexOutOfBoundsException = 3, TRAP_ArrayStoreException = 4,
  TRAP_ClassCastException = 5, TRAP_CHECK_EXCEPTION = 6, TRAP_PATCHER = 7, TRAP_COMPILER = 8,
  TRAP_COUNTDOWN = 9, TRAP_AbstractMethodError = 10, TRAP_THROW = 11, TRAP_NAT_EXCEPTION = 12,
  TRAP_END
}
 

Macro Definition Documentation

#define MD_TRAP_COMPILER_FIXUP (   xpc,
  ra,
  sp,
  pv 
)
Value:
do { \
(xpc) = (void*) (((uintptr_t) (ra)) - 4); \
} while(0)
#define ra
Definition: md-asm.hpp:62
#define xpc
Definition: md-asm.hpp:51

Macro to fixup a compiler stub.

The XPC is the RA minus 4, because the RA points to the instruction after the call.

Definition at line 66 of file md-trap.hpp.

#define TRAP_INSTRUCTION_IS_LOAD   0

Trap number defines.

On this architecture (Aarch64) we use illegal instructions as trap instructions. Since the illegal instruction with the value 1 is used by the kernel to generate a SIGTRAP, we skip this one.

Definition at line 40 of file md-trap.hpp.

Enumeration Type Documentation

anonymous enum
Enumerator
TRAP_NullPointerException 
TRAP_ArithmeticException 
TRAP_ArrayIndexOutOfBoundsException 
TRAP_ArrayStoreException 
TRAP_ClassCastException 
TRAP_CHECK_EXCEPTION 
TRAP_PATCHER 
TRAP_COMPILER 
TRAP_COUNTDOWN 
TRAP_AbstractMethodError 
TRAP_THROW 
TRAP_NAT_EXCEPTION 
TRAP_END 

Definition at line 42 of file md-trap.hpp.