comparison src/cpu/x86/vm/sharedRuntime_x86_32.cpp @ 524:c9004fe53695

6792301: StackAlignmentInBytes not honored for compiled native methods Summary: Fixed the stack misalignment when generate_native_wrapper is called. Reviewed-by: never, kamg, kvn, phh
author xlu
date Tue, 13 Jan 2009 17:39:03 -0800
parents db4caa99ef11
children 0fbdb4381b99 afa80fa86d22
comparison
equal deleted inserted replaced
523:2ddbaf7b8e1c 524:c9004fe53695
36 RuntimeStub* SharedRuntime::_wrong_method_blob; 36 RuntimeStub* SharedRuntime::_wrong_method_blob;
37 RuntimeStub* SharedRuntime::_ic_miss_blob; 37 RuntimeStub* SharedRuntime::_ic_miss_blob;
38 RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob; 38 RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
39 RuntimeStub* SharedRuntime::_resolve_virtual_call_blob; 39 RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
40 RuntimeStub* SharedRuntime::_resolve_static_call_blob; 40 RuntimeStub* SharedRuntime::_resolve_static_call_blob;
41
42 const int StackAlignmentInSlots = StackAlignmentInBytes / VMRegImpl::stack_slot_size;
41 43
42 class RegisterSaver { 44 class RegisterSaver {
43 enum { FPU_regs_live = 8 /*for the FPU stack*/+8/*eight more for XMM registers*/ }; 45 enum { FPU_regs_live = 8 /*for the FPU stack*/+8/*eight more for XMM registers*/ };
44 // Capture info about frame layout 46 // Capture info about frame layout
45 enum layout { 47 enum layout {
1297 // **************************************************************************** 1299 // ****************************************************************************
1298 1300
1299 1301
1300 // Now compute actual number of stack words we need rounding to make 1302 // Now compute actual number of stack words we need rounding to make
1301 // stack properly aligned. 1303 // stack properly aligned.
1302 stack_slots = round_to(stack_slots, 2 * VMRegImpl::slots_per_word); 1304 stack_slots = round_to(stack_slots, StackAlignmentInSlots);
1303 1305
1304 int stack_size = stack_slots * VMRegImpl::stack_slot_size; 1306 int stack_size = stack_slots * VMRegImpl::stack_slot_size;
1305 1307
1306 intptr_t start = (intptr_t)__ pc(); 1308 intptr_t start = (intptr_t)__ pc();
1307 1309