changeset 1435:20a3896518ac

Initial adjustments to make C1X4HotSpot compile and run with latest Maxine version.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Fri, 22 Oct 2010 17:31:38 +0200
parents 72cfb36c6bb2
children 9dae1aae168a
files c1x4hotspotsrc/HotSpotTest/src/C1XTest.java c1x4hotspotsrc/HotSpotTest/src/JavaTester.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java domake src/share/vm/c1x/c1x_CodeInstaller.cpp src/share/vm/c1x/c1x_TargetMethod.cpp src/share/vm/c1x/c1x_TargetMethod.hpp
diffstat 10 files changed, 48 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotTest/src/C1XTest.java	Thu Sep 30 17:19:48 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotTest/src/C1XTest.java	Fri Oct 22 17:31:38 2010 +0200
@@ -25,18 +25,6 @@
 		}
 		System.out.println("exit");
 	}
-	
-	public static void main2(String[] args) {
-		Other.I[] array = new Other.I[] { new Other.A(), new Other.B(),
-				new Other.C(), new Other.A(), new Other.B(), new Other.C() };
-
-		int sum = 0;
-		for (int i = 0; i < 20; i++)
-			for (Other.I o : array) {
-				sum += o.v();
-			}
-		System.out.println(sum);
-	}
 
 	public static void main(String[] args) throws IOException, Exception {
 		for (int i = 0; i < 10000; i++) {
--- a/c1x4hotspotsrc/HotSpotTest/src/JavaTester.java	Thu Sep 30 17:19:48 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotTest/src/JavaTester.java	Fri Oct 22 17:31:38 2010 +0200
@@ -3,8 +3,22 @@
 
 public class JavaTester {
 
+	/**
+	 * Call with start and end test number as parameters.
+	 */
 	public static void main(String[] args) {
-		runTests(0, 0);
+		int start = 0;
+		int end = 10000;
+		
+		if (args.length > 0) {
+			start = Integer.parseInt(args[0]);
+		}
+		
+		if (args.length > 1) {
+			end = Integer.parseInt(args[1]);
+		}
+		
+		runTests(start, end);
 		Logger.info("total: " + executed + " tests executed, " + passed + " passed, " + failed + " failed");
 	}
 
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java	Thu Sep 30 17:19:48 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java	Fri Oct 22 17:31:38 2010 +0200
@@ -60,12 +60,6 @@
     }
 
     @Override
-    public boolean isConstant() {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
     public boolean isResolved() {
         return offset != -1;
     }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java	Thu Sep 30 17:19:48 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java	Fri Oct 22 17:31:38 2010 +0200
@@ -165,4 +165,16 @@
         return "HotSpotMethod<" + name + ">";
     }
 
+    @Override
+    public Class<?> accessor() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int intrinsic() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java	Thu Sep 30 17:19:48 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java	Fri Oct 22 17:31:38 2010 +0200
@@ -135,4 +135,16 @@
         return "HotSpotMethod<" + name + ", unresolved>";
     }
 
+    @Override
+    public Class<?> accessor() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int intrinsic() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java	Thu Sep 30 17:19:48 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypeResolved.java	Fri Oct 22 17:31:38 2010 +0200
@@ -165,7 +165,7 @@
 
     @Override
     public Class<?> javaClass() {
-        throw new RuntimeException("javaClass not implemented");
+        return null;
     }
 
     @Override
--- a/domake	Thu Sep 30 17:19:48 2010 -0700
+++ b/domake	Fri Oct 22 17:31:38 2010 +0200
@@ -1,6 +1,6 @@
 #!/bin/bash
 pushd make
-ALT_BOOTDIR=/usr/lib/jvm/java-6-sun LANG=C ARCH_DATA_MODEL=64 HOTSPOT_BUILD_JOBS=2 make jvmg1
+ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk/ LANG=C ARCH_DATA_MODEL=64 HOTSPOT_BUILD_JOBS=2 make jvmg1
 cp ../build/linux/linux_amd64_compiler1/jvmg/libjvm.so ../../jre1.7.0/lib/amd64/client
 cp ../build/linux/linux_amd64_compiler1/jvmg/libjsig.so ../../jre1.7.0/lib/amd64/client
 popd
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Thu Sep 30 17:19:48 2010 -0700
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Fri Oct 22 17:31:38 2010 +0200
@@ -92,7 +92,7 @@
 
   BasicType type = C1XCompiler::kindToBasicType(CiKind::typeChar(CiValue::kind(value)));
   if (value->is_a(CiRegisterValue::klass())) {
-    jint number = CiRegister::number(CiRegisterValue::_register(value));
+    jint number = CiRegister::number(CiRegisterValue::reg(value));
 
     if (number < 16) {
       return new LocationValue(Location::new_reg_loc(Location::normal, as_Register(number)->as_VMReg()));
--- a/src/share/vm/c1x/c1x_TargetMethod.cpp	Thu Sep 30 17:19:48 2010 -0700
+++ b/src/share/vm/c1x/c1x_TargetMethod.cpp	Fri Oct 22 17:31:38 2010 +0200
@@ -31,6 +31,11 @@
 static void compute_offset(int &dest_offset, klassOop klass_oop, const char* name, const char* signature, bool static_field) {
   symbolOop name_symbol = SymbolTable::probe(name, strlen(name));
   symbolOop signature_symbol = SymbolTable::probe(signature, strlen(signature));
+#ifdef DEBUG
+  if (name_symbol == NULL) {
+    tty->print_cr("symbol with name %s was not found in symbol table (klass=%s)", name, klass_oop->klass_part()->name()->as_C_string());
+  }
+#endif
   assert(name_symbol != NULL, "symbol not found - class layout changed?");
   assert(signature_symbol != NULL, "symbol not found - class layout changed?");
 
--- a/src/share/vm/c1x/c1x_TargetMethod.hpp	Thu Sep 30 17:19:48 2010 -0700
+++ b/src/share/vm/c1x/c1x_TargetMethod.hpp	Fri Oct 22 17:31:38 2010 +0200
@@ -162,7 +162,7 @@
     static_oop_field(CiValue, IllegalValue, "Lcom/sun/cri/ci/CiValue;");                \
   end_class                                                                             \
   start_class(CiRegisterValue)                                                          \
-    oop_field(CiRegisterValue, _register, "Lcom/sun/cri/ci/CiRegister;")                \
+    oop_field(CiRegisterValue, reg, "Lcom/sun/cri/ci/CiRegister;")                      \
   end_class                                                                             \
   start_class(CiRegister)                                                               \
     int_field(CiRegister, number)                                                       \