Print this page
rev 1838 : 6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/cpu/x86/vm/assembler_x86.cpp
          +++ new/src/cpu/x86/vm/assembler_x86.cpp
↓ open down ↓ 2625 lines elided ↑ open up ↑
2626 2626    // HMM Table D-1 says sse2
2627 2627    // NOT_LP64(assert(VM_Version::supports_sse(), ""));
2628 2628    NOT_LP64(assert(VM_Version::supports_sse2(), ""));
2629 2629    emit_byte(0xF2);
2630 2630    int encode = prefix_and_encode(dst->encoding(), src->encoding());
2631 2631    emit_byte(0x0F);
2632 2632    emit_byte(0x51);
2633 2633    emit_byte(0xC0 | encode);
2634 2634  }
2635 2635  
     2636 +void Assembler::sqrtsd(XMMRegister dst, Address src) {
     2637 +  NOT_LP64(assert(VM_Version::supports_sse2(), ""));
     2638 +  InstructionMark im(this);
     2639 +  emit_byte(0xF2);
     2640 +  prefix(src, dst);
     2641 +  emit_byte(0x0F);
     2642 +  emit_byte(0x51);
     2643 +  emit_operand(dst, src);
     2644 +}
     2645 +
     2646 +void Assembler::sqrtss(XMMRegister dst, XMMRegister src) {
     2647 +  // HMM Table D-1 says sse2
     2648 +  // NOT_LP64(assert(VM_Version::supports_sse(), ""));
     2649 +  NOT_LP64(assert(VM_Version::supports_sse2(), ""));
     2650 +  emit_byte(0xF3);
     2651 +  int encode = prefix_and_encode(dst->encoding(), src->encoding());
     2652 +  emit_byte(0x0F);
     2653 +  emit_byte(0x51);
     2654 +  emit_byte(0xC0 | encode);
     2655 +}
     2656 +
     2657 +void Assembler::sqrtss(XMMRegister dst, Address src) {
     2658 +  NOT_LP64(assert(VM_Version::supports_sse2(), ""));
     2659 +  InstructionMark im(this);
     2660 +  emit_byte(0xF3);
     2661 +  prefix(src, dst);
     2662 +  emit_byte(0x0F);
     2663 +  emit_byte(0x51);
     2664 +  emit_operand(dst, src);
     2665 +}
     2666 +
2636 2667  void Assembler::stmxcsr( Address dst) {
2637 2668    NOT_LP64(assert(VM_Version::supports_sse(), ""));
2638 2669    InstructionMark im(this);
2639 2670    prefix(dst);
2640 2671    emit_byte(0x0F);
2641 2672    emit_byte(0xAE);
2642 2673    emit_operand(as_Register(3), dst);
2643 2674  }
2644 2675  
2645 2676  void Assembler::subl(Address dst, int32_t imm32) {
↓ open down ↓ 1689 lines elided ↑ open up ↑
4335 4366    emit_byte(0xE8 | encode);
4336 4367    emit_byte(imm8);
4337 4368  }
4338 4369  
4339 4370  void Assembler::shrq(Register dst) {
4340 4371    int encode = prefixq_and_encode(dst->encoding());
4341 4372    emit_byte(0xD3);
4342 4373    emit_byte(0xE8 | encode);
4343 4374  }
4344 4375  
4345      -void Assembler::sqrtsd(XMMRegister dst, Address src) {
4346      -  NOT_LP64(assert(VM_Version::supports_sse2(), ""));
4347      -  InstructionMark im(this);
4348      -  emit_byte(0xF2);
4349      -  prefix(src, dst);
4350      -  emit_byte(0x0F);
4351      -  emit_byte(0x51);
4352      -  emit_operand(dst, src);
4353      -}
4354      -
4355 4376  void Assembler::subq(Address dst, int32_t imm32) {
4356 4377    InstructionMark im(this);
4357 4378    prefixq(dst);
4358 4379    if (is8bit(imm32)) {
4359 4380      emit_byte(0x83);
4360 4381      emit_operand(rbp, dst, 1);
4361 4382      emit_byte(imm32 & 0xFF);
4362 4383    } else {
4363 4384      emit_byte(0x81);
4364 4385      emit_operand(rbp, dst, 4);
↓ open down ↓ 541 lines elided ↑ open up ↑
4906 4927  void MacroAssembler::movptr(Register dst, ArrayAddress src) {
4907 4928    movl(dst, as_Address(src));
4908 4929  }
4909 4930  
4910 4931  // src should NEVER be a real pointer. Use AddressLiteral for true pointers
4911 4932  void MacroAssembler::movptr(Address dst, intptr_t src) {
4912 4933    movl(dst, src);
4913 4934  }
4914 4935  
4915 4936  
4916      -void MacroAssembler::movsd(XMMRegister dst, AddressLiteral src) {
4917      -  movsd(dst, as_Address(src));
4918      -}
4919      -
4920 4937  void MacroAssembler::pop_callee_saved_registers() {
4921 4938    pop(rcx);
4922 4939    pop(rdx);
4923 4940    pop(rdi);
4924 4941    pop(rsi);
4925 4942  }
4926 4943  
4927 4944  void MacroAssembler::pop_fTOS() {
4928 4945    fld_d(Address(rsp, 0));
4929 4946    addl(rsp, 2 * wordSize);
↓ open down ↓ 4079 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX