diff graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2537:4a016ff4d2df

Clean up on LIRGenerator and related.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 19:53:46 +0200
parents 3fca504f28ba
children e1ba5a93e997
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed Apr 27 19:30:56 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed Apr 27 19:53:46 2011 +0200
@@ -667,7 +667,12 @@
             if (canBeConstant) {
                 return item.instruction.operand();
             } else {
-                item.loadItem(var.kind);
+                CiKind kind = var.kind;
+                if (kind == CiKind.Byte || kind == CiKind.Boolean) {
+                    item.loadByteItem();
+                } else {
+                    item.loadItem();
+                }
                 return item.result();
             }
         }
@@ -1516,6 +1521,9 @@
      * @param instruction an instruction that produces a result value
      */
     protected CiValue makeOperand(Value instruction) {
+        if (instruction == null) {
+            return CiValue.IllegalValue;
+        }
         assert instruction.isLive();
         CiValue operand = instruction.operand();
         if (operand.isIllegal()) {