RFR (XS): 8146100: compiler/jvmci/code/SimpleCodeInstallationTest.java JUnit Failure: expected:<12> but was:<109710641>

Christian Thalinger christian.thalinger at oracle.com
Wed Dec 23 21:00:56 UTC 2015


https://bugs.openjdk.java.net/browse/JDK-8146100

Windows uses different argument registers so we have to get them from the RegisterConfig.  Tested with a JPRT job that ran all JVMCI tests.

diff -r 46122d93612d test/compiler/jvmci/code/amd64/AMD64TestAssembler.java
--- a/test/compiler/jvmci/code/amd64/AMD64TestAssembler.java	Mon Dec 21 22:17:23 2015 +0100
+++ b/test/compiler/jvmci/code/amd64/AMD64TestAssembler.java	Tue Dec 22 23:32:01 2015 -0800
@@ -34,8 +34,10 @@ import jdk.vm.ci.code.DebugInfo;
 import jdk.vm.ci.code.InfopointReason;
 import jdk.vm.ci.code.Register;
 import jdk.vm.ci.code.StackSlot;
+import jdk.vm.ci.code.CallingConvention.Type;
 import jdk.vm.ci.hotspot.HotSpotConstant;
 import jdk.vm.ci.meta.JavaConstant;
+import jdk.vm.ci.meta.JavaKind;
 import jdk.vm.ci.meta.LIRKind;
 import jdk.vm.ci.meta.VMConstant;
 
@@ -61,11 +63,11 @@ public class AMD64TestAssembler extends 
     }
 
     public Register emitIntArg0() {
-        return AMD64.rsi;
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(Type.JavaCall, JavaKind.Int)[0];
     }
 
     public Register emitIntArg1() {
-        return AMD64.rdx;
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(Type.JavaCall, JavaKind.Int)[1];
     }
 
     private void emitREX(boolean w, int r, int x, int b) {
diff -r 46122d93612d test/compiler/jvmci/code/sparc/SPARCTestAssembler.java
--- a/test/compiler/jvmci/code/sparc/SPARCTestAssembler.java	Mon Dec 21 22:17:23 2015 +0100
+++ b/test/compiler/jvmci/code/sparc/SPARCTestAssembler.java	Tue Dec 22 23:32:01 2015 -0800
@@ -32,8 +32,10 @@ import jdk.vm.ci.code.DebugInfo;
 import jdk.vm.ci.code.InfopointReason;
 import jdk.vm.ci.code.Register;
 import jdk.vm.ci.code.StackSlot;
+import jdk.vm.ci.code.CallingConvention.Type;
 import jdk.vm.ci.hotspot.HotSpotConstant;
 import jdk.vm.ci.meta.JavaConstant;
+import jdk.vm.ci.meta.JavaKind;
 import jdk.vm.ci.meta.LIRKind;
 import jdk.vm.ci.meta.VMConstant;
 import jdk.vm.ci.sparc.SPARC;
@@ -80,11 +82,11 @@ public class SPARCTestAssembler extends 
     }
 
     public Register emitIntArg0() {
-        return SPARC.i0;
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(Type.JavaCallee, JavaKind.Int)[0];
     }
 
     public Register emitIntArg1() {
-        return SPARC.i1;
+        return codeCache.getRegisterConfig().getCallingConventionRegisters(Type.JavaCallee, JavaKind.Int)[1];
     }
 
     public Register emitLoadInt(int c) {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151223/c338b365/attachment.html>


More information about the hotspot-compiler-dev mailing list