diff graal/GraalCompiler/src/com/sun/c1x/target/Backend.java @ 2677:0ea5f12e873a

use com.oracle.max.asm project for assembler
author Christian.Wimmer@Oracle.com
date Fri, 13 May 2011 17:09:20 -0700
parents 16b9a8b5ad39
children
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/target/Backend.java	Fri May 13 14:03:03 2011 -0700
+++ b/graal/GraalCompiler/src/com/sun/c1x/target/Backend.java	Fri May 13 17:09:20 2011 -0700
@@ -24,8 +24,8 @@
 
 import java.lang.reflect.*;
 
+import com.oracle.max.asm.*;
 import com.sun.c1x.*;
-import com.sun.c1x.asm.*;
 import com.sun.c1x.gen.*;
 import com.sun.c1x.globalstub.*;
 import com.sun.c1x.lir.*;
@@ -46,13 +46,13 @@
     }
 
     public static Backend create(CiArchitecture arch, C1XCompiler compiler) {
-        String className = arch.getClass().getName() + "Backend";
+        String className = arch.getClass().getName().replace("com.oracle.max.asm", "com.sun.c1x") + "Backend";
         try {
             Class<?> c = Class.forName(className);
             Constructor<?> cons = c.getDeclaredConstructor(C1XCompiler.class);
             return (Backend) cons.newInstance(compiler);
         } catch (Exception e) {
-            throw new Error("Could instantiate " + className, e);
+            throw new Error("Could not instantiate " + className, e);
         }
     }