comparison src/cpu/x86/vm/sharedRuntime_x86_64.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 52a431267315
children 0fbdb4381b99 98cb887364d3 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 #define __ masm-> 44 #define __ masm->
43 45
44 class SimpleRuntimeFrame { 46 class SimpleRuntimeFrame {
45 47
1284 // 1286 //
1285 1287
1286 1288
1287 // Now compute actual number of stack words we need rounding to make 1289 // Now compute actual number of stack words we need rounding to make
1288 // stack properly aligned. 1290 // stack properly aligned.
1289 stack_slots = round_to(stack_slots, 4 * VMRegImpl::slots_per_word); 1291 stack_slots = round_to(stack_slots, StackAlignmentInSlots);
1290 1292
1291 int stack_size = stack_slots * VMRegImpl::stack_slot_size; 1293 int stack_size = stack_slots * VMRegImpl::stack_slot_size;
1292 1294
1293 1295
1294 // First thing make an ic check to see if we should even be here 1296 // First thing make an ic check to see if we should even be here