Mercurial > hg > truffle
comparison src/cpu/x86/vm/stubGenerator_x86_64.cpp @ 5903:da4be62fb889
7147740: add assertions to check stack alignment on VM entry from generated code (x64)
Summary: check stack alignment on VM entry on x64.
Reviewed-by: kvn, never
author | roland |
---|---|
date | Mon, 27 Feb 2012 09:17:44 +0100 |
parents | b522995d91f0 |
children | 6759698e3140 |
comparison
equal
deleted
inserted
replaced
5902:c7987cbaf2ca | 5903:da4be62fb889 |
---|---|
708 __ ret(0); | 708 __ ret(0); |
709 | 709 |
710 return start; | 710 return start; |
711 } | 711 } |
712 | 712 |
713 // Support for intptr_t get_previous_sp() | |
714 // | |
715 // This routine is used to find the previous stack pointer for the | |
716 // caller. | |
717 address generate_get_previous_sp() { | |
718 StubCodeMark mark(this, "StubRoutines", "get_previous_sp"); | |
719 address start = __ pc(); | |
720 | |
721 __ movptr(rax, rsp); | |
722 __ addptr(rax, 8); // return address is at the top of the stack. | |
723 __ ret(0); | |
724 | |
725 return start; | |
726 } | |
727 | |
713 //---------------------------------------------------------------------------------------------------- | 728 //---------------------------------------------------------------------------------------------------- |
714 // Support for void verify_mxcsr() | 729 // Support for void verify_mxcsr() |
715 // | 730 // |
716 // This routine is used with -Xcheck:jni to verify that native | 731 // This routine is used with -Xcheck:jni to verify that native |
717 // JNI code does not return to Java code without restoring the | 732 // JNI code does not return to Java code without restoring the |
3058 StubRoutines::_handler_for_unsafe_access_entry = | 3073 StubRoutines::_handler_for_unsafe_access_entry = |
3059 generate_handler_for_unsafe_access(); | 3074 generate_handler_for_unsafe_access(); |
3060 | 3075 |
3061 // platform dependent | 3076 // platform dependent |
3062 StubRoutines::x86::_get_previous_fp_entry = generate_get_previous_fp(); | 3077 StubRoutines::x86::_get_previous_fp_entry = generate_get_previous_fp(); |
3078 StubRoutines::x86::_get_previous_sp_entry = generate_get_previous_sp(); | |
3063 | 3079 |
3064 StubRoutines::x86::_verify_mxcsr_entry = generate_verify_mxcsr(); | 3080 StubRoutines::x86::_verify_mxcsr_entry = generate_verify_mxcsr(); |
3065 | 3081 |
3066 // Build this early so it's available for the interpreter. Stub | 3082 // Build this early so it's available for the interpreter. Stub |
3067 // expects the required and actual types as register arguments in | 3083 // expects the required and actual types as register arguments in |