283 __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
284 return (address) esp;
285 #elif defined(SPARC_WORKS)
286 void *esp;
287 __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
288 return (address) ((char*)esp + sizeof(long)*2);
289 #else
290 register void *esp __asm__ (SPELL_REG_SP);
291 return (address) esp;
292 #endif
293 }
294
295 char* os::non_memory_address_word() {
296 // Must never look like an address returned by reserve_memory,
297 // even in its subfields (as defined by the CPU immediate fields,
298 // if the CPU splits constants across multiple instructions).
299
300 return (char*) -1;
301 }
302
303 void os::initialize_thread(Thread* thr) {
304 // Nothing to do.
305 }
306
307 address os::Bsd::ucontext_get_pc(const ucontext_t * uc) {
308 return (address)uc->context_pc;
309 }
310
311 void os::Bsd::ucontext_set_pc(ucontext_t * uc, address pc) {
312 uc->context_pc = (intptr_t)pc ;
313 }
314
315 intptr_t* os::Bsd::ucontext_get_sp(const ucontext_t * uc) {
316 return (intptr_t*)uc->context_sp;
317 }
318
319 intptr_t* os::Bsd::ucontext_get_fp(const ucontext_t * uc) {
320 return (intptr_t*)uc->context_fp;
321 }
322
323 // For Forte Analyzer AsyncGetCallTrace profiling support - thread
324 // is currently interrupted by SIGPROF.
325 // os::Solaris::fetch_frame_from_ucontext() tries to skip nested signal
326 // frames. Currently we don't do that on Bsd, so it's the same as
|
283 __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
284 return (address) esp;
285 #elif defined(SPARC_WORKS)
286 void *esp;
287 __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
288 return (address) ((char*)esp + sizeof(long)*2);
289 #else
290 register void *esp __asm__ (SPELL_REG_SP);
291 return (address) esp;
292 #endif
293 }
294
295 char* os::non_memory_address_word() {
296 // Must never look like an address returned by reserve_memory,
297 // even in its subfields (as defined by the CPU immediate fields,
298 // if the CPU splits constants across multiple instructions).
299
300 return (char*) -1;
301 }
302
303 address os::Bsd::ucontext_get_pc(const ucontext_t * uc) {
304 return (address)uc->context_pc;
305 }
306
307 void os::Bsd::ucontext_set_pc(ucontext_t * uc, address pc) {
308 uc->context_pc = (intptr_t)pc ;
309 }
310
311 intptr_t* os::Bsd::ucontext_get_sp(const ucontext_t * uc) {
312 return (intptr_t*)uc->context_sp;
313 }
314
315 intptr_t* os::Bsd::ucontext_get_fp(const ucontext_t * uc) {
316 return (intptr_t*)uc->context_fp;
317 }
318
319 // For Forte Analyzer AsyncGetCallTrace profiling support - thread
320 // is currently interrupted by SIGPROF.
321 // os::Solaris::fetch_frame_from_ucontext() tries to skip nested signal
322 // frames. Currently we don't do that on Bsd, so it's the same as
|