diff graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterConfig.java @ 20149:b1a8928fc4b9

[SPARC] Implement new instructions in assembler/enhance assertion error-message in MoveResolver
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Thu, 02 Apr 2015 18:45:28 +0200
parents 9299e71df12a
children 9b6ea36013c4
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterConfig.java	Thu Apr 02 17:32:26 2015 +0200
+++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterConfig.java	Thu Apr 02 18:45:28 2015 +0200
@@ -90,6 +90,7 @@
     private final Register[] cpuCalleeParameterRegisters = {i0, i1, i2, i3, i4, i5};
 
     private final Register[] fpuParameterRegisters = {f0, f1, f2, f3, f4, f5, f6, f7};
+    private final Register[] fpuDoubleParameterRegisters = {d0, null, d2, null, d4, null, d6, null};
     // @formatter:off
     private final Register[] callerSaveRegisters =
                    {g1, g2, g3, g4, g5, g6, g7,
@@ -208,7 +209,7 @@
     }
 
     public Register[] getCallingConventionRegisters(Type type, Kind kind) {
-        if (architecture.canStoreValue(FPU, kind)) {
+        if (architecture.canStoreValue(FPUs, kind) || architecture.canStoreValue(FPUd, kind)) {
             return fpuParameterRegisters;
         }
         assert architecture.canStoreValue(CPU, kind);
@@ -244,7 +245,7 @@
                             // Make register number even to be a double reg
                             currentFloating++;
                         }
-                        Register register = fpuParameterRegisters[currentFloating];
+                        Register register = fpuDoubleParameterRegisters[currentFloating];
                         currentFloating += 2; // Only every second is a double register
                         locations[i] = register.asValue(target.getLIRKind(kind));
                     }
@@ -289,8 +290,9 @@
             case Object:
                 return type == Type.JavaCallee ? i0 : o0;
             case Float:
+                return f0;
             case Double:
-                return f0;
+                return d0;
             case Void:
             case Illegal:
                 return null;