Mercurial > hg > truffle
comparison src/os_cpu/windows_x86/vm/os_windows_x86.cpp @ 6275:957c266d8bc5
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Aug 2012 10:39:19 +0200 |
parents | 897b7d18bebc da4be62fb889 |
children | e522a00b91aa |
comparison
equal
deleted
inserted
replaced
5891:fd8832ae511d | 6275:957c266d8bc5 |
---|---|
368 // we can use the StackWalk() API. | 368 // we can use the StackWalk() API. |
369 frame os::get_sender_for_C_frame(frame* fr) { | 369 frame os::get_sender_for_C_frame(frame* fr) { |
370 return frame(fr->sender_sp(), fr->link(), fr->sender_pc()); | 370 return frame(fr->sender_sp(), fr->link(), fr->sender_pc()); |
371 } | 371 } |
372 | 372 |
373 #ifndef AMD64 | |
374 // Returns an estimate of the current stack pointer. Result must be guaranteed | |
375 // to point into the calling threads stack, and be no lower than the current | |
376 // stack pointer. | |
377 address os::current_stack_pointer() { | |
378 int dummy; | |
379 address sp = (address)&dummy; | |
380 return sp; | |
381 } | |
382 #else | |
383 // Returns the current stack pointer. Accurate value needed for | |
384 // os::verify_stack_alignment(). | |
385 address os::current_stack_pointer() { | |
386 typedef address get_sp_func(); | |
387 get_sp_func* func = CAST_TO_FN_PTR(get_sp_func*, | |
388 StubRoutines::x86::get_previous_sp_entry()); | |
389 return (*func)(); | |
390 } | |
391 #endif | |
392 | |
373 | 393 |
374 #ifndef AMD64 | 394 #ifndef AMD64 |
375 intptr_t* _get_previous_fp() { | 395 intptr_t* _get_previous_fp() { |
376 intptr_t **frameptr; | 396 intptr_t **frameptr; |
377 __asm { | 397 __asm { |
544 #ifndef AMD64 | 564 #ifndef AMD64 |
545 int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std(); | 565 int fpu_cntrl_word = StubRoutines::fpu_cntrl_wrd_std(); |
546 __asm fldcw fpu_cntrl_word; | 566 __asm fldcw fpu_cntrl_word; |
547 #endif // !AMD64 | 567 #endif // !AMD64 |
548 } | 568 } |
569 | |
570 #ifndef PRODUCT | |
571 void os::verify_stack_alignment() { | |
572 #ifdef AMD64 | |
573 assert(((intptr_t)os::current_stack_pointer() & (StackAlignmentInBytes-1)) == 0, "incorrect stack alignment"); | |
574 #endif | |
575 } | |
576 #endif |