Mercurial > hg > icedtea7-forest > hotspot
changeset 6226:ff951d54a4de
Merge
author | asaha |
---|---|
date | Mon, 27 Oct 2014 15:15:45 -0700 |
parents | 81a072ca6739 (current diff) 7df3393c9f20 (diff) |
children | defb5d88168c |
files | .hgtags make/hotspot_version |
diffstat | 4 files changed, 74 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Mon Oct 27 15:07:06 2014 -0700 +++ b/.hgtags Mon Oct 27 15:15:45 2014 -0700 @@ -758,11 +758,13 @@ 6c1a8b7ed616311a932715428620e262076bb68a jdk7u75-b03 2480d9d778301a3f88b0ab8ee35a585df82528e5 jdk7u75-b04 d81faf9016ce5c9f98264b1f724b3d6d85b12c07 jdk7u75-b05 +2ec4b796b1de3cfe58f051111dfd70ab367e553e jdk7u75-b06 3c01618f40c059bf192c0b16176b144113965ea7 jdk7u76-b00 7b5d132c3a70f3c0667fe9df4cae045b46673267 jdk7u76-b01 10c2cb5743cac7d6fedc9307af8450283367e5e2 jdk7u76-b02 99a8d8e3f1c6311853bfc0a86de503830cd3db1a jdk7u76-b03 15079dd9fd20f252d4c6dc6972508d3375cf5af2 jdk7u76-b04 0ac38b5b642738fb27b446b0c1bc6108f31f197c jdk7u76-b05 +8580db8e38a232978f69fe627f3373e12c467803 jdk7u76-b06 2480d9d778301a3f88b0ab8ee35a585df82528e5 jdk7u79-b00
--- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Mon Oct 27 15:07:06 2014 -0700 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Mon Oct 27 15:15:45 2014 -0700 @@ -1142,50 +1142,81 @@ // Hoist any int/ptr/long's in the first 6 to int regs. // Hoist any flt/dbl's in the first 16 dbl regs. int j = 0; // Count of actual args, not HALVES - for( int i=0; i<total_args_passed; i++, j++ ) { - switch( sig_bt[i] ) { + VMRegPair param_array_reg; // location of the argument in the parameter array + for (int i = 0; i < total_args_passed; i++, j++) { + param_array_reg.set_bad(); + switch (sig_bt[i]) { case T_BOOLEAN: case T_BYTE: case T_CHAR: case T_INT: case T_SHORT: - regs[i].set1( int_stk_helper( j ) ); break; + regs[i].set1(int_stk_helper(j)); + break; case T_LONG: - assert( sig_bt[i+1] == T_VOID, "expecting half" ); + assert(sig_bt[i+1] == T_VOID, "expecting half"); case T_ADDRESS: // raw pointers, like current thread, for VM calls case T_ARRAY: case T_OBJECT: - regs[i].set2( int_stk_helper( j ) ); + regs[i].set2(int_stk_helper(j)); break; case T_FLOAT: - if ( j < 16 ) { - // V9ism: floats go in ODD registers - regs[i].set1(as_FloatRegister(1 + (j<<1))->as_VMReg()); - } else { - // V9ism: floats go in ODD stack slot - regs[i].set1(VMRegImpl::stack2reg(1 + (j<<1))); + // Per SPARC Compliance Definition 2.4.1, page 3P-12 available here + // http://www.sparc.org/wp-content/uploads/2014/01/SCD.2.4.1.pdf.gz + // + // "When a callee prototype exists, and does not indicate variable arguments, + // floating-point values assigned to locations %sp+BIAS+128 through %sp+BIAS+248 + // will be promoted to floating-point registers" + // + // By "promoted" it means that the argument is located in two places, an unused + // spill slot in the "parameter array" (starts at %sp+BIAS+128), and a live + // float register. In most cases, there are 6 or fewer arguments of any type, + // and the standard parameter array slots (%sp+BIAS+128 to %sp+BIAS+176 exclusive) + // serve as shadow slots. Per the spec floating point registers %d6 to %d16 + // require slots beyond that (up to %sp+BIAS+248). + // + { + // V9ism: floats go in ODD registers and stack slots + int float_index = 1 + (j << 1); + param_array_reg.set1(VMRegImpl::stack2reg(float_index)); + if (j < 16) { + regs[i].set1(as_FloatRegister(float_index)->as_VMReg()); + } else { + regs[i] = param_array_reg; + } } break; case T_DOUBLE: - assert( sig_bt[i+1] == T_VOID, "expecting half" ); - if ( j < 16 ) { - // V9ism: doubles go in EVEN/ODD regs - regs[i].set2(as_FloatRegister(j<<1)->as_VMReg()); - } else { - // V9ism: doubles go in EVEN/ODD stack slots - regs[i].set2(VMRegImpl::stack2reg(j<<1)); + { + assert(sig_bt[i + 1] == T_VOID, "expecting half"); + // V9ism: doubles go in EVEN/ODD regs and stack slots + int double_index = (j << 1); + param_array_reg.set2(VMRegImpl::stack2reg(double_index)); + if (j < 16) { + regs[i].set2(as_FloatRegister(double_index)->as_VMReg()); + } else { + // V9ism: doubles go in EVEN/ODD stack slots + regs[i] = param_array_reg; + } } break; - case T_VOID: regs[i].set_bad(); j--; break; // Do not count HALVES + case T_VOID: + regs[i].set_bad(); + j--; + break; // Do not count HALVES default: ShouldNotReachHere(); } - if (regs[i].first()->is_stack()) { - int off = regs[i].first()->reg2stack(); + // Keep track of the deepest parameter array slot. + if (!param_array_reg.first()->is_valid()) { + param_array_reg = regs[i]; + } + if (param_array_reg.first()->is_stack()) { + int off = param_array_reg.first()->reg2stack(); if (off > max_stack_slots) max_stack_slots = off; } - if (regs[i].second()->is_stack()) { - int off = regs[i].second()->reg2stack(); + if (param_array_reg.second()->is_stack()) { + int off = param_array_reg.second()->reg2stack(); if (off > max_stack_slots) max_stack_slots = off; } } @@ -1193,8 +1224,8 @@ #else // _LP64 // V8 convention: first 6 things in O-regs, rest on stack. // Alignment is willy-nilly. - for( int i=0; i<total_args_passed; i++ ) { - switch( sig_bt[i] ) { + for (int i = 0; i < total_args_passed; i++) { + switch (sig_bt[i]) { case T_ADDRESS: // raw pointers, like current thread, for VM calls case T_ARRAY: case T_BOOLEAN: @@ -1204,23 +1235,23 @@ case T_INT: case T_OBJECT: case T_SHORT: - regs[i].set1( int_stk_helper( i ) ); + regs[i].set1(int_stk_helper(i)); break; case T_DOUBLE: case T_LONG: - assert( sig_bt[i+1] == T_VOID, "expecting half" ); - regs[i].set_pair( int_stk_helper( i+1 ), int_stk_helper( i ) ); + assert(sig_bt[i + 1] == T_VOID, "expecting half"); + regs[i].set_pair(int_stk_helper(i + 1), int_stk_helper(i)); break; case T_VOID: regs[i].set_bad(); break; default: ShouldNotReachHere(); } if (regs[i].first()->is_stack()) { - int off = regs[i].first()->reg2stack(); + int off = regs[i].first()->reg2stack(); if (off > max_stack_slots) max_stack_slots = off; } if (regs[i].second()->is_stack()) { - int off = regs[i].second()->reg2stack(); + int off = regs[i].second()->reg2stack(); if (off > max_stack_slots) max_stack_slots = off; } } @@ -1369,11 +1400,10 @@ const Register rOop = src.first()->as_Register(); const Register rHandle = L5; int oop_slot = rOop->input_number() * VMRegImpl::slots_per_word + oop_handle_offset; - int offset = oop_slot*VMRegImpl::stack_slot_size; - Label skip; + int offset = oop_slot * VMRegImpl::stack_slot_size; __ st_ptr(rOop, SP, offset + STACK_BIAS); if (is_receiver) { - *receiver_offset = oop_slot * VMRegImpl::stack_slot_size; + *receiver_offset = offset; } map->set_oop(VMRegImpl::stack2reg(oop_slot)); __ add(SP, offset + STACK_BIAS, rHandle);
--- a/src/cpu/sparc/vm/sparc.ad Mon Oct 27 15:07:06 2014 -0700 +++ b/src/cpu/sparc/vm/sparc.ad Mon Oct 27 15:15:45 2014 -0700 @@ -1978,7 +1978,7 @@ // to implement the UseStrictFP mode. const bool Matcher::strict_fp_requires_explicit_rounding = false; -// Are floats conerted to double when stored to stack during deoptimization? +// Are floats converted to double when stored to stack during deoptimization? // Sparc does not handle callee-save floats. bool Matcher::float_in_double() { return false; } @@ -3216,7 +3216,7 @@ // are owned by the CALLEE. Holes should not be nessecary in the // incoming area, as the Java calling convention is completely under // the control of the AD file. Doubles can be sorted and packed to -// avoid holes. Holes in the outgoing arguments may be nessecary for +// avoid holes. Holes in the outgoing arguments may be necessary for // varargs C calling conventions. // Note 3: Region 0-3 is even aligned, with pad2 as needed. Region 3-5 is // even aligned with pad0 as needed. @@ -3282,7 +3282,7 @@ %} // Body of function which returns an OptoRegs array locating - // arguments either in registers or in stack slots for callin + // arguments either in registers or in stack slots for calling // C. c_calling_convention %{ // This is obviously always outgoing
--- a/src/share/vm/oops/objArrayOop.hpp Mon Oct 27 15:07:06 2014 -0700 +++ b/src/share/vm/oops/objArrayOop.hpp Mon Oct 27 15:15:45 2014 -0700 @@ -45,9 +45,10 @@ private: // Give size of objArrayOop in HeapWords minus the header static int array_size(int length) { - const int OopsPerHeapWord = HeapWordSize/heapOopSize; + const uint OopsPerHeapWord = HeapWordSize/heapOopSize; assert(OopsPerHeapWord >= 1 && (HeapWordSize % heapOopSize == 0), "Else the following (new) computation would be in error"); + uint res = ((uint)length + OopsPerHeapWord - 1)/OopsPerHeapWord; #ifdef ASSERT // The old code is left in for sanity-checking; it'll // go away pretty soon. XXX @@ -55,16 +56,15 @@ // oop->length() * HeapWordsPerOop; // With narrowOops, HeapWordsPerOop is 1/2 or equal 0 as an integer. // The oop elements are aligned up to wordSize - const int HeapWordsPerOop = heapOopSize/HeapWordSize; - int old_res; + const uint HeapWordsPerOop = heapOopSize/HeapWordSize; + uint old_res; if (HeapWordsPerOop > 0) { old_res = length * HeapWordsPerOop; } else { - old_res = align_size_up(length, OopsPerHeapWord)/OopsPerHeapWord; + old_res = align_size_up((uint)length, OopsPerHeapWord)/OopsPerHeapWord; } + assert(res == old_res, "Inconsistency between old and new."); #endif // ASSERT - int res = ((uint)length + OopsPerHeapWord - 1)/OopsPerHeapWord; - assert(res == old_res, "Inconsistency between old and new."); return res; }