comparison src/share/vm/graal/graalCodeInstaller.cpp @ 7813:c58f8f4cda69

Remove last usage of VmIds.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 18 Feb 2013 19:16:59 -0800
parents 5aa05e6f9dee
children bab2a51f8dbe
comparison
equal deleted inserted replaced
7812:a42dc71ad051 7813:c58f8f4cda69
27 #include "graal/graalEnv.hpp" 27 #include "graal/graalEnv.hpp"
28 #include "graal/graalCompiler.hpp" 28 #include "graal/graalCompiler.hpp"
29 #include "graal/graalCodeInstaller.hpp" 29 #include "graal/graalCodeInstaller.hpp"
30 #include "graal/graalJavaAccess.hpp" 30 #include "graal/graalJavaAccess.hpp"
31 #include "graal/graalCompilerToVM.hpp" 31 #include "graal/graalCompilerToVM.hpp"
32 #include "graal/graalVmIds.hpp"
33 #include "graal/graalRuntime.hpp" 32 #include "graal/graalRuntime.hpp"
34 #include "asm/register.hpp" 33 #include "asm/register.hpp"
35 #include "classfile/vmSymbols.hpp" 34 #include "classfile/vmSymbols.hpp"
36 #include "code/vmreg.hpp" 35 #include "code/vmreg.hpp"
37 36
659 } 658 }
660 659
661 if (global_stub != NULL) { 660 if (global_stub != NULL) {
662 assert(java_lang_boxing_object::is_instance(global_stub, T_LONG), "global_stub needs to be of type Long"); 661 assert(java_lang_boxing_object::is_instance(global_stub, T_LONG), "global_stub needs to be of type Long");
663 662
663 jlong global_stub_destination = global_stub->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG));
664 if (inst->is_call()) { 664 if (inst->is_call()) {
665 // NOTE: for call without a mov, the offset must fit a 32-bit immediate 665 // NOTE: for call without a mov, the offset must fit a 32-bit immediate
666 // see also CompilerToVM.getMaxCallTargetOffset() 666 // see also CompilerToVM.getMaxCallTargetOffset()
667 NativeCall* call = nativeCall_at((address) (inst)); 667 NativeCall* call = nativeCall_at((address) (inst));
668 call->set_destination(VmIds::getStub(global_stub)); 668 call->set_destination((address) global_stub_destination);
669 _instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec(), Assembler::call32_operand); 669 _instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec(), Assembler::call32_operand);
670 } else if (inst->is_mov_literal64()) { 670 } else if (inst->is_mov_literal64()) {
671 NativeMovConstReg* mov = nativeMovConstReg_at((address) (inst)); 671 NativeMovConstReg* mov = nativeMovConstReg_at((address) (inst));
672 mov->set_data((intptr_t) VmIds::getStub(global_stub)); 672 mov->set_data((intptr_t) global_stub_destination);
673 _instructions->relocate(mov->instruction_address(), runtime_call_Relocation::spec(), Assembler::imm_operand); 673 _instructions->relocate(mov->instruction_address(), runtime_call_Relocation::spec(), Assembler::imm_operand);
674 } else { 674 } else {
675 NativeJump* jump = nativeJump_at((address) (inst)); 675 NativeJump* jump = nativeJump_at((address) (inst));
676 jump->set_jump_destination(VmIds::getStub(global_stub)); 676 jump->set_jump_destination((address) global_stub_destination);
677 _instructions->relocate((address)inst, runtime_call_Relocation::spec(), Assembler::call32_operand); 677 _instructions->relocate((address)inst, runtime_call_Relocation::spec(), Assembler::call32_operand);
678 } 678 }
679 TRACE_graal_3("relocating (stub) at %p", inst); 679 TRACE_graal_3("relocating (stub) at %p", inst);
680 } else { // method != NULL 680 } else { // method != NULL
681 assert(hotspot_method != NULL, "unexpected JavaMethod"); 681 assert(hotspot_method != NULL, "unexpected JavaMethod");