comparison src/cpu/x86/vm/sharedRuntime_x86_32.cpp @ 14416:6a936747b569

8024344: PPC64 (part 112): C argument in register AND stack slot. Summary: On PPC, the first 13 floating point arguments to C calls are passed in floating point registers. Also, all but the first 8 arguments are passed on the stack. So there can be floating point arguments that are passed on the stack and in a register. We duplicate the regs datastructure in c_calling_convention() to represent this. Reviewed-by: kvn, cjplummer
author goetz
date Thu, 12 Sep 2013 13:51:13 -0700
parents e961c11b85fe
children 1174c8abbdb6
comparison
equal deleted inserted replaced
14415:666e6ce3976c 14416:6a936747b569
975 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); 975 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);
976 } 976 }
977 977
978 int SharedRuntime::c_calling_convention(const BasicType *sig_bt, 978 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
979 VMRegPair *regs, 979 VMRegPair *regs,
980 VMRegPair *regs2,
980 int total_args_passed) { 981 int total_args_passed) {
982 assert(regs2 == NULL, "not needed on x86");
981 // We return the amount of VMRegImpl stack slots we need to reserve for all 983 // We return the amount of VMRegImpl stack slots we need to reserve for all
982 // the arguments NOT counting out_preserve_stack_slots. 984 // the arguments NOT counting out_preserve_stack_slots.
983 985
984 uint stack = 0; // All arguments on stack 986 uint stack = 0; // All arguments on stack
985 987
1622 } 1624 }
1623 1625
1624 // Now figure out where the args must be stored and how much stack space 1626 // Now figure out where the args must be stored and how much stack space
1625 // they require. 1627 // they require.
1626 int out_arg_slots; 1628 int out_arg_slots;
1627 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args); 1629 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args);
1628 1630
1629 // Compute framesize for the wrapper. We need to handlize all oops in 1631 // Compute framesize for the wrapper. We need to handlize all oops in
1630 // registers a max of 2 on x86. 1632 // registers a max of 2 on x86.
1631 1633
1632 // Calculate the total number of stack slots we will need. 1634 // Calculate the total number of stack slots we will need.
2493 2495
2494 // Now figure out where the args must be stored and how much stack space 2496 // Now figure out where the args must be stored and how much stack space
2495 // they require (neglecting out_preserve_stack_slots). 2497 // they require (neglecting out_preserve_stack_slots).
2496 2498
2497 int out_arg_slots; 2499 int out_arg_slots;
2498 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, total_c_args); 2500 out_arg_slots = c_calling_convention(out_sig_bt, out_regs, NULL, total_c_args);
2499 2501
2500 // Calculate the total number of stack slots we will need. 2502 // Calculate the total number of stack slots we will need.
2501 2503
2502 // First count the abi requirement plus all of the outgoing args 2504 // First count the abi requirement plus all of the outgoing args
2503 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots; 2505 int stack_slots = SharedRuntime::out_preserve_stack_slots() + out_arg_slots;