equal
deleted
inserted
replaced
26 #include "incls/_assembler_solaris_sparc.cpp.incl" |
26 #include "incls/_assembler_solaris_sparc.cpp.incl" |
27 |
27 |
28 #include <sys/trap.h> // For trap numbers |
28 #include <sys/trap.h> // For trap numbers |
29 #include <v9/sys/psr_compat.h> // For V8 compatibility |
29 #include <v9/sys/psr_compat.h> // For V8 compatibility |
30 |
30 |
31 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { |
|
32 // The first page of virtual addresses is unmapped on SPARC. |
|
33 // Thus, any access the VM makes through a null pointer with an offset of |
|
34 // less than 4K will get a recognizable SIGSEGV, which the signal handler |
|
35 // will transform into a NullPointerException. |
|
36 // (Actually, the first 64K or so is unmapped, but it's simpler |
|
37 // to depend only on the first 4K or so.) |
|
38 |
|
39 bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size(); |
|
40 return !offset_in_first_page; |
|
41 } |
|
42 |
|
43 void MacroAssembler::read_ccr_trap(Register ccr_save) { |
31 void MacroAssembler::read_ccr_trap(Register ccr_save) { |
44 // Execute a trap to get the PSR, mask and shift |
32 // Execute a trap to get the PSR, mask and shift |
45 // to get the condition codes. |
33 // to get the condition codes. |
46 get_psr_trap(); |
34 get_psr_trap(); |
47 nop(); |
35 nop(); |