8071818: Incorrect addressing mode used for ldf in SPARC assembler
authorzmajo
Fri, 30 Jan 2015 10:40:08 +0100
changeset 28915 66ed75a5c945
parent 28913 252f7d579300
child 28916 9e4da5f6abe5
8071818: Incorrect addressing mode used for ldf in SPARC assembler Summary: Update MacroAssembler::ldf to select addressing mode depending on Address parameter. Reviewed-by: kvn, dlong
hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp	Thu Jan 29 10:26:02 2015 -0800
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.inline.hpp	Fri Jan 30 10:40:08 2015 +0100
@@ -630,7 +630,12 @@
 
 inline void MacroAssembler::ldf(FloatRegisterImpl::Width w, const Address& a, FloatRegister d, int offset) {
   relocate(a.rspec(offset));
-  ldf(w, a.base(), a.disp() + offset, d);
+  if (a.has_index()) {
+    assert(offset == 0, "");
+    ldf(w, a.base(), a.index(), d);
+  } else {
+    ldf(w, a.base(), a.disp() + offset, d);
+  }
 }
 
 // returns if membar generates anything, obviously this code should mirror