555 } else { |
555 } else { |
556 assert(!UseInlineCaches, "expect vtable calls only if not using ICs"); |
556 assert(!UseInlineCaches, "expect vtable calls only if not using ICs"); |
557 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); |
557 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); |
558 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); |
558 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); |
559 int klass_load_size; |
559 int klass_load_size; |
560 if (UseCompressedKlassPointers) { |
560 if (UseCompressedClassPointers) { |
561 assert(Universe::heap() != NULL, "java heap should be initialized"); |
561 assert(Universe::heap() != NULL, "java heap should be initialized"); |
562 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; |
562 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; |
563 } else { |
563 } else { |
564 klass_load_size = 1*BytesPerInstWord; |
564 klass_load_size = 1*BytesPerInstWord; |
565 } |
565 } |
1655 //============================================================================= |
1655 //============================================================================= |
1656 #ifndef PRODUCT |
1656 #ifndef PRODUCT |
1657 void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const { |
1657 void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const { |
1658 st->print_cr("\nUEP:"); |
1658 st->print_cr("\nUEP:"); |
1659 #ifdef _LP64 |
1659 #ifdef _LP64 |
1660 if (UseCompressedKlassPointers) { |
1660 if (UseCompressedClassPointers) { |
1661 assert(Universe::heap() != NULL, "java heap should be initialized"); |
1661 assert(Universe::heap() != NULL, "java heap should be initialized"); |
1662 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); |
1662 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); |
1663 st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base"); |
1663 if (Universe::narrow_klass_base() != 0) { |
1664 if (Universe::narrow_klass_shift() != 0) { |
1664 st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base"); |
1665 st->print_cr("\tSLL R_G5,3,R_G5"); |
1665 if (Universe::narrow_klass_shift() != 0) { |
|
1666 st->print_cr("\tSLL R_G5,Universe::narrow_klass_shift,R_G5"); |
|
1667 } |
|
1668 st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); |
|
1669 st->print_cr("\tSET Universe::narrow_ptrs_base,R_G6_heap_base"); |
|
1670 } else { |
|
1671 st->print_cr("\tSLL R_G5,Universe::narrow_klass_shift,R_G5"); |
1666 } |
1672 } |
1667 st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); |
|
1668 st->print_cr("\tSET Universe::narrow_ptrs_base,R_G6_heap_base"); |
|
1669 } else { |
1673 } else { |
1670 st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check"); |
1674 st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check"); |
1671 } |
1675 } |
1672 st->print_cr("\tCMP R_G5,R_G3" ); |
1676 st->print_cr("\tCMP R_G5,R_G3" ); |
1673 st->print ("\tTne xcc,R_G0+ST_RESERVED_FOR_USER_0+2"); |
1677 st->print ("\tTne xcc,R_G0+ST_RESERVED_FOR_USER_0+2"); |
1895 return false; |
1899 return false; |
1896 } |
1900 } |
1897 |
1901 |
1898 bool Matcher::narrow_klass_use_complex_address() { |
1902 bool Matcher::narrow_klass_use_complex_address() { |
1899 NOT_LP64(ShouldNotCallThis()); |
1903 NOT_LP64(ShouldNotCallThis()); |
1900 assert(UseCompressedKlassPointers, "only for compressed klass code"); |
1904 assert(UseCompressedClassPointers, "only for compressed klass code"); |
1901 return false; |
1905 return false; |
1902 } |
1906 } |
1903 |
1907 |
1904 // Is it better to copy float constants, or load them directly from memory? |
1908 // Is it better to copy float constants, or load them directly from memory? |
1905 // Intel can load a float constant from a direct address, requiring no |
1909 // Intel can load a float constant from a direct address, requiring no |
2015 } |
2019 } |
2016 |
2020 |
2017 const RegMask Matcher::method_handle_invoke_SP_save_mask() { |
2021 const RegMask Matcher::method_handle_invoke_SP_save_mask() { |
2018 return L7_REGP_mask(); |
2022 return L7_REGP_mask(); |
2019 } |
2023 } |
|
2024 |
|
2025 const RegMask Matcher::mathExactI_result_proj_mask() { |
|
2026 return G1_REGI_mask(); |
|
2027 } |
|
2028 |
|
2029 const RegMask Matcher::mathExactL_result_proj_mask() { |
|
2030 return G1_REGL_mask(); |
|
2031 } |
|
2032 |
|
2033 const RegMask Matcher::mathExactI_flags_proj_mask() { |
|
2034 return INT_FLAGS_mask(); |
|
2035 } |
|
2036 |
2020 |
2037 |
2021 %} |
2038 %} |
2022 |
2039 |
2023 |
2040 |
2024 // The intptr_t operand types, defined by textual substitution. |
2041 // The intptr_t operand types, defined by textual substitution. |
2559 // get receiver klass (receiver already checked for non-null) |
2576 // get receiver klass (receiver already checked for non-null) |
2560 // If we end up going thru a c2i adapter interpreter expects method in G5 |
2577 // If we end up going thru a c2i adapter interpreter expects method in G5 |
2561 int off = __ offset(); |
2578 int off = __ offset(); |
2562 __ load_klass(O0, G3_scratch); |
2579 __ load_klass(O0, G3_scratch); |
2563 int klass_load_size; |
2580 int klass_load_size; |
2564 if (UseCompressedKlassPointers) { |
2581 if (UseCompressedClassPointers) { |
2565 assert(Universe::heap() != NULL, "java heap should be initialized"); |
2582 assert(Universe::heap() != NULL, "java heap should be initialized"); |
2566 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; |
2583 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; |
2567 } else { |
2584 } else { |
2568 klass_load_size = 1*BytesPerInstWord; |
2585 klass_load_size = 1*BytesPerInstWord; |
2569 } |
2586 } |
4243 not_equal(0x9); |
4260 not_equal(0x9); |
4244 less(0x3); |
4261 less(0x3); |
4245 greater_equal(0xB); |
4262 greater_equal(0xB); |
4246 less_equal(0x2); |
4263 less_equal(0x2); |
4247 greater(0xA); |
4264 greater(0xA); |
|
4265 overflow(0x7); |
|
4266 no_overflow(0xF); |
4248 %} |
4267 %} |
4249 %} |
4268 %} |
4250 |
4269 |
4251 // Comparison Op, unsigned |
4270 // Comparison Op, unsigned |
4252 operand cmpOpU() %{ |
4271 operand cmpOpU() %{ |
4253 match(Bool); |
4272 match(Bool); |
|
4273 predicate(n->as_Bool()->_test._test != BoolTest::overflow && |
|
4274 n->as_Bool()->_test._test != BoolTest::no_overflow); |
4254 |
4275 |
4255 format %{ "u" %} |
4276 format %{ "u" %} |
4256 interface(COND_INTER) %{ |
4277 interface(COND_INTER) %{ |
4257 equal(0x1); |
4278 equal(0x1); |
4258 not_equal(0x9); |
4279 not_equal(0x9); |
4259 less(0x5); |
4280 less(0x5); |
4260 greater_equal(0xD); |
4281 greater_equal(0xD); |
4261 less_equal(0x4); |
4282 less_equal(0x4); |
4262 greater(0xC); |
4283 greater(0xC); |
|
4284 overflow(0x7); |
|
4285 no_overflow(0xF); |
4263 %} |
4286 %} |
4264 %} |
4287 %} |
4265 |
4288 |
4266 // Comparison Op, pointer (same as unsigned) |
4289 // Comparison Op, pointer (same as unsigned) |
4267 operand cmpOpP() %{ |
4290 operand cmpOpP() %{ |
4268 match(Bool); |
4291 match(Bool); |
|
4292 predicate(n->as_Bool()->_test._test != BoolTest::overflow && |
|
4293 n->as_Bool()->_test._test != BoolTest::no_overflow); |
4269 |
4294 |
4270 format %{ "p" %} |
4295 format %{ "p" %} |
4271 interface(COND_INTER) %{ |
4296 interface(COND_INTER) %{ |
4272 equal(0x1); |
4297 equal(0x1); |
4273 not_equal(0x9); |
4298 not_equal(0x9); |
4274 less(0x5); |
4299 less(0x5); |
4275 greater_equal(0xD); |
4300 greater_equal(0xD); |
4276 less_equal(0x4); |
4301 less_equal(0x4); |
4277 greater(0xC); |
4302 greater(0xC); |
|
4303 overflow(0x7); |
|
4304 no_overflow(0xF); |
4278 %} |
4305 %} |
4279 %} |
4306 %} |
4280 |
4307 |
4281 // Comparison Op, branch-register encoding |
4308 // Comparison Op, branch-register encoding |
4282 operand cmpOp_reg() %{ |
4309 operand cmpOp_reg() %{ |
4283 match(Bool); |
4310 match(Bool); |
|
4311 predicate(n->as_Bool()->_test._test != BoolTest::overflow && |
|
4312 n->as_Bool()->_test._test != BoolTest::no_overflow); |
4284 |
4313 |
4285 format %{ "" %} |
4314 format %{ "" %} |
4286 interface(COND_INTER) %{ |
4315 interface(COND_INTER) %{ |
4287 equal (0x1); |
4316 equal (0x1); |
4288 not_equal (0x5); |
4317 not_equal (0x5); |
4289 less (0x3); |
4318 less (0x3); |
4290 greater_equal(0x7); |
4319 greater_equal(0x7); |
4291 less_equal (0x2); |
4320 less_equal (0x2); |
4292 greater (0x6); |
4321 greater (0x6); |
|
4322 overflow(0x7); // not supported |
|
4323 no_overflow(0xF); // not supported |
4293 %} |
4324 %} |
4294 %} |
4325 %} |
4295 |
4326 |
4296 // Comparison Code, floating, unordered same as less |
4327 // Comparison Code, floating, unordered same as less |
4297 operand cmpOpF() %{ |
4328 operand cmpOpF() %{ |
4298 match(Bool); |
4329 match(Bool); |
|
4330 predicate(n->as_Bool()->_test._test != BoolTest::overflow && |
|
4331 n->as_Bool()->_test._test != BoolTest::no_overflow); |
4299 |
4332 |
4300 format %{ "fl" %} |
4333 format %{ "fl" %} |
4301 interface(COND_INTER) %{ |
4334 interface(COND_INTER) %{ |
4302 equal(0x9); |
4335 equal(0x9); |
4303 not_equal(0x1); |
4336 not_equal(0x1); |
4304 less(0x3); |
4337 less(0x3); |
4305 greater_equal(0xB); |
4338 greater_equal(0xB); |
4306 less_equal(0xE); |
4339 less_equal(0xE); |
4307 greater(0x6); |
4340 greater(0x6); |
|
4341 |
|
4342 overflow(0x7); // not supported |
|
4343 no_overflow(0xF); // not supported |
4308 %} |
4344 %} |
4309 %} |
4345 %} |
4310 |
4346 |
4311 // Used by long compare |
4347 // Used by long compare |
4312 operand cmpOp_commute() %{ |
4348 operand cmpOp_commute() %{ |
4313 match(Bool); |
4349 match(Bool); |
|
4350 predicate(n->as_Bool()->_test._test != BoolTest::overflow && |
|
4351 n->as_Bool()->_test._test != BoolTest::no_overflow); |
4314 |
4352 |
4315 format %{ "" %} |
4353 format %{ "" %} |
4316 interface(COND_INTER) %{ |
4354 interface(COND_INTER) %{ |
4317 equal(0x1); |
4355 equal(0x1); |
4318 not_equal(0x9); |
4356 not_equal(0x9); |
4319 less(0xA); |
4357 less(0xA); |
4320 greater_equal(0x2); |
4358 greater_equal(0x2); |
4321 less_equal(0xB); |
4359 less_equal(0xB); |
4322 greater(0x3); |
4360 greater(0x3); |
|
4361 overflow(0x7); |
|
4362 no_overflow(0xF); |
4323 %} |
4363 %} |
4324 %} |
4364 %} |
4325 |
4365 |
4326 //----------OPERAND CLASSES---------------------------------------------------- |
4366 //----------OPERAND CLASSES---------------------------------------------------- |
4327 // Operand Classes are groups of operands that are used to simplify |
4367 // Operand Classes are groups of operands that are used to simplify |