changeset 2498:55caa3034872

Fixed an issue in the HotSpot XIR generator. Benchmark "fop" now passing on all optimization levels.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 26 Apr 2011 14:46:28 +0200
parents 96ca0e1b8a1d
children ad9b14650e15
files graal/Runtime/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/Runtime/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Fri Apr 22 22:13:35 2011 +0200
+++ b/graal/Runtime/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Tue Apr 26 14:46:28 2011 +0200
@@ -74,7 +74,7 @@
     private final RiRegisterConfig registerConfig;
     private final Compiler compiler;
 
-    private CiXirAssembler asm;
+    private CiXirAssembler globalAsm;
 
     public HotSpotXirGenerator(HotSpotVMConfig config, CiTarget target, RiRegisterConfig registerConfig, Compiler compiler) {
         this.config = config;
@@ -771,7 +771,7 @@
         }
     };
 
-    private XirOperand genArrayLength(XirOperand array, boolean implicitNullException) {
+    private XirOperand genArrayLength(CiXirAssembler asm, XirOperand array, boolean implicitNullException) {
         XirOperand length = asm.createTemp("length", CiKind.Int);
         genArrayLength(asm, length, array, implicitNullException);
         return length;
@@ -779,7 +779,7 @@
 
     private void genArrayLength(CiXirAssembler asm, XirOperand length, XirOperand array, boolean implicitNullException) {
         if (implicitNullException) {
-            // asm.nop(1);
+            asm.nop(1);
             asm.mark(MARK_IMPLICIT_NULL);
         }
         asm.pload(CiKind.Int, length, array, asm.i(config.arrayLengthOffset), implicitNullException);
@@ -803,7 +803,7 @@
                 if (is(GIVEN_LENGTH, flags)) {
                     length = asm.createInputParameter("length", CiKind.Int, true);
                 } else {
-                    length = genArrayLength(array, implicitNullException);
+                    length = genArrayLength(asm, array, implicitNullException);
                 }
                 asm.jugteq(failBoundsCheck, index, length);
                 implicitNullException = false;
@@ -1317,7 +1317,7 @@
 
     @Override
     public List<XirTemplate> buildTemplates(CiXirAssembler asm) {
-        this.asm = asm;
+        this.globalAsm = asm;
         List<XirTemplate> templates = new ArrayList<XirTemplate>();
         return templates;
     }
@@ -1530,7 +1530,7 @@
             flags = flags & mask;
             XirTemplate template = templates.get(flags);
             if (template == null) {
-                template = create(HotSpotXirGenerator.this.asm.copy(), flags);
+                template = create(HotSpotXirGenerator.this.globalAsm.copy(), flags);
                 templates.put(flags, template);
             }
             return template;