< prev index next >

src/hotspot/cpu/s390/sharedRuntime_s390.cpp

Print this page

 738         if (freg < z_num_farg_registers) {
 739           // Put double in register.
 740           regs[i].set2(z_farg_reg[freg]);
 741           ++freg;
 742         } else {
 743           // Put double on stack and align to 2 slots.
 744           if (stk & 0x1) { ++stk; }
 745           regs[i].set2(VMRegImpl::stack2reg(stk));
 746           stk += inc_stk_for_longdouble;
 747         }
 748         break;
 749       case T_VOID:
 750         assert(i != 0 && (sig_bt[i - 1] == T_LONG || sig_bt[i - 1] == T_DOUBLE), "expecting half");
 751         // Do not count halves.
 752         regs[i].set_bad();
 753         break;
 754       default:
 755         ShouldNotReachHere();
 756     }
 757   }
 758   return align_up(stk, 2);
 759 }
 760 
 761 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
 762                                         VMRegPair *regs,
 763                                         VMRegPair *regs2,
 764                                         int total_args_passed) {
 765   assert(regs2 == nullptr, "second VMRegPair array not used on this platform");
 766 
 767   // Calling conventions for C runtime calls and calls to JNI native methods.
 768   const VMReg z_iarg_reg[5] = {
 769     Z_R2->as_VMReg(),
 770     Z_R3->as_VMReg(),
 771     Z_R4->as_VMReg(),
 772     Z_R5->as_VMReg(),
 773     Z_R6->as_VMReg()
 774   };
 775   const VMReg z_farg_reg[4] = {
 776     Z_F0->as_VMReg(),
 777     Z_F2->as_VMReg(),
 778     Z_F4->as_VMReg(),

 738         if (freg < z_num_farg_registers) {
 739           // Put double in register.
 740           regs[i].set2(z_farg_reg[freg]);
 741           ++freg;
 742         } else {
 743           // Put double on stack and align to 2 slots.
 744           if (stk & 0x1) { ++stk; }
 745           regs[i].set2(VMRegImpl::stack2reg(stk));
 746           stk += inc_stk_for_longdouble;
 747         }
 748         break;
 749       case T_VOID:
 750         assert(i != 0 && (sig_bt[i - 1] == T_LONG || sig_bt[i - 1] == T_DOUBLE), "expecting half");
 751         // Do not count halves.
 752         regs[i].set_bad();
 753         break;
 754       default:
 755         ShouldNotReachHere();
 756     }
 757   }
 758   return stk;
 759 }
 760 
 761 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
 762                                         VMRegPair *regs,
 763                                         VMRegPair *regs2,
 764                                         int total_args_passed) {
 765   assert(regs2 == nullptr, "second VMRegPair array not used on this platform");
 766 
 767   // Calling conventions for C runtime calls and calls to JNI native methods.
 768   const VMReg z_iarg_reg[5] = {
 769     Z_R2->as_VMReg(),
 770     Z_R3->as_VMReg(),
 771     Z_R4->as_VMReg(),
 772     Z_R5->as_VMReg(),
 773     Z_R6->as_VMReg()
 774   };
 775   const VMReg z_farg_reg[4] = {
 776     Z_F0->as_VMReg(),
 777     Z_F2->as_VMReg(),
 778     Z_F4->as_VMReg(),
< prev index next >