89 #define REG_FP 29
90 #define REG_LR 30
91
92 #define SPELL_REG_SP "sp"
93 #define SPELL_REG_FP "x29"
94 #endif
95
96 address os::current_stack_pointer() {
97 register void *esp __asm__ (SPELL_REG_SP);
98 return (address) esp;
99 }
100
101 char* os::non_memory_address_word() {
102 // Must never look like an address returned by reserve_memory,
103 // even in its subfields (as defined by the CPU immediate fields,
104 // if the CPU splits constants across multiple instructions).
105
106 return (char*) 0xffffffffffff;
107 }
108
109 void os::initialize_thread(Thread *thr) {
110 }
111
112 address os::Linux::ucontext_get_pc(const ucontext_t * uc) {
113 #ifdef BUILTIN_SIM
114 return (address)uc->uc_mcontext.gregs[REG_PC];
115 #else
116 return (address)uc->uc_mcontext.pc;
117 #endif
118 }
119
120 void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) {
121 #ifdef BUILTIN_SIM
122 uc->uc_mcontext.gregs[REG_PC] = (intptr_t)pc;
123 #else
124 uc->uc_mcontext.pc = (intptr_t)pc;
125 #endif
126 }
127
128 intptr_t* os::Linux::ucontext_get_sp(const ucontext_t * uc) {
129 #ifdef BUILTIN_SIM
130 return (intptr_t*)uc->uc_mcontext.gregs[REG_SP];
131 #else
|
89 #define REG_FP 29
90 #define REG_LR 30
91
92 #define SPELL_REG_SP "sp"
93 #define SPELL_REG_FP "x29"
94 #endif
95
96 address os::current_stack_pointer() {
97 register void *esp __asm__ (SPELL_REG_SP);
98 return (address) esp;
99 }
100
101 char* os::non_memory_address_word() {
102 // Must never look like an address returned by reserve_memory,
103 // even in its subfields (as defined by the CPU immediate fields,
104 // if the CPU splits constants across multiple instructions).
105
106 return (char*) 0xffffffffffff;
107 }
108
109 address os::Linux::ucontext_get_pc(const ucontext_t * uc) {
110 #ifdef BUILTIN_SIM
111 return (address)uc->uc_mcontext.gregs[REG_PC];
112 #else
113 return (address)uc->uc_mcontext.pc;
114 #endif
115 }
116
117 void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) {
118 #ifdef BUILTIN_SIM
119 uc->uc_mcontext.gregs[REG_PC] = (intptr_t)pc;
120 #else
121 uc->uc_mcontext.pc = (intptr_t)pc;
122 #endif
123 }
124
125 intptr_t* os::Linux::ucontext_get_sp(const ucontext_t * uc) {
126 #ifdef BUILTIN_SIM
127 return (intptr_t*)uc->uc_mcontext.gregs[REG_SP];
128 #else
|