diff graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java @ 22131:6b4469fe86c9

[SPARC] Use correct position in SPARCAssembler.insertNopAfterCBCond
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Tue, 30 Jun 2015 16:43:18 +0200
parents 5f622eadfa5b
children dd52addb374d
line wrap: on
line diff
--- a/graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java	Tue Jun 30 12:32:51 2015 +0200
+++ b/graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java	Tue Jun 30 16:43:18 2015 +0200
@@ -166,12 +166,7 @@
         }
 
         public static Op2s byValue(int value) {
-            for (Op2s op : values()) {
-                if (op.getValue() == value) {
-                    return op;
-                }
-            }
-            return null;
+            return OP2S[value];
         }
     }
 
@@ -992,7 +987,7 @@
     }
 
     public void insertNopAfterCBCond() {
-        int pos = position();
+        int pos = position() - INSTRUCTION_SIZE;
         if (pos == 0) {
             return;
         }