comparison src/cpu/ppc/vm/sharedRuntime_ppc.cpp @ 23660:b5f3a471e646

Merge.
author Doug Simon <doug.simon@oracle.com>
date Wed, 01 Jun 2016 00:11:44 +0200
parents 48fde4d03767 e9e252c83b2b
children
comparison
equal deleted inserted replaced
23411:d7cf78885a3a 23660:b5f3a471e646
764 // are passed in registers (not the float args among the first 13 args). 764 // are passed in registers (not the float args among the first 13 args).
765 // Thus argument i is NOT passed in farg_reg[i] if it is float. It is passed 765 // Thus argument i is NOT passed in farg_reg[i] if it is float. It is passed
766 // in farg_reg[j] if argument i is the j-th float argument of this call. 766 // in farg_reg[j] if argument i is the j-th float argument of this call.
767 // 767 //
768 case T_FLOAT: 768 case T_FLOAT:
769 #if defined(LINUX)
770 // Linux uses ELF ABI. Both original ELF and ELFv2 ABIs have float
771 // in the least significant word of an argument slot.
772 #if defined(VM_LITTLE_ENDIAN)
773 #define FLOAT_WORD_OFFSET_IN_SLOT 0
774 #else
775 #define FLOAT_WORD_OFFSET_IN_SLOT 1
776 #endif
777 #elif defined(AIX)
778 // Although AIX runs on big endian CPU, float is in the most
779 // significant word of an argument slot.
780 #define FLOAT_WORD_OFFSET_IN_SLOT 0
781 #else
782 #error "unknown OS"
783 #endif
769 if (freg < Argument::n_float_register_parameters_c) { 784 if (freg < Argument::n_float_register_parameters_c) {
770 // Put float in register ... 785 // Put float in register ...
771 reg = farg_reg[freg]; 786 reg = farg_reg[freg];
772 ++freg; 787 ++freg;
773 788
777 // a register. This is not documented, but we follow this 792 // a register. This is not documented, but we follow this
778 // convention, too. 793 // convention, too.
779 if (arg >= Argument::n_regs_not_on_stack_c) { 794 if (arg >= Argument::n_regs_not_on_stack_c) {
780 // ... and on the stack. 795 // ... and on the stack.
781 guarantee(regs2 != NULL, "must pass float in register and stack slot"); 796 guarantee(regs2 != NULL, "must pass float in register and stack slot");
782 VMReg reg2 = VMRegImpl::stack2reg(stk LINUX_ONLY(+1)); 797 VMReg reg2 = VMRegImpl::stack2reg(stk + FLOAT_WORD_OFFSET_IN_SLOT);
783 regs2[i].set1(reg2); 798 regs2[i].set1(reg2);
784 stk += inc_stk_for_intfloat; 799 stk += inc_stk_for_intfloat;
785 } 800 }
786 801
787 } else { 802 } else {
788 // Put float on stack. 803 // Put float on stack.
789 reg = VMRegImpl::stack2reg(stk LINUX_ONLY(+1)); 804 reg = VMRegImpl::stack2reg(stk + FLOAT_WORD_OFFSET_IN_SLOT);
790 stk += inc_stk_for_intfloat; 805 stk += inc_stk_for_intfloat;
791 } 806 }
792 regs[i].set1(reg); 807 regs[i].set1(reg);
793 break; 808 break;
794 case T_DOUBLE: 809 case T_DOUBLE: