diff src/cpu/sparc/vm/graalCodeInstaller_sparc.hpp @ 10871:c3b09d69dfde

SPARC: fixes and more implementation; can now allocate objects
author twisti
date Wed, 24 Jul 2013 17:57:52 -0700
parents e1fcdda22831
children 5a9d68c3a7d7
line wrap: on
line diff
--- a/src/cpu/sparc/vm/graalCodeInstaller_sparc.hpp	Wed Jul 24 16:19:17 2013 -0700
+++ b/src/cpu/sparc/vm/graalCodeInstaller_sparc.hpp	Wed Jul 24 17:57:52 2013 -0700
@@ -119,14 +119,11 @@
     call->set_destination((address) foreign_call_destination);
     _instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec());
   } else if (inst->is_sethi()) {
-    NativeFarCall* call = nativeFarCall_at(pc);
-    call->set_destination((address) foreign_call_destination);
-    _instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec());
+    NativeJump* jump = nativeJump_at(pc);
+    jump->set_jump_destination((address) foreign_call_destination);
+    _instructions->relocate(jump->instruction_address(), runtime_call_Relocation::spec());
   } else {
-    NativeJump* jump = nativeJump_at((address) (inst));
-    jump->set_jump_destination((address) foreign_call_destination);
-    _instructions->relocate((address)inst, runtime_call_Relocation::spec());
-    fatal("CodeInstaller::pd_relocate_ForeignCall - verify me!");
+    fatal(err_msg("unknown call or jump instruction at %p", pc));
   }
   TRACE_graal_3("relocating (foreign call) at %p", inst);
 }