diff src/share/vm/graal/graalCompiler.hpp @ 10567:7cd21876c116

Revert bytecode indexes back to Java endianess.
author twisti
date Thu, 27 Jun 2013 22:18:52 -0700
parents 4720f96a15b7
children 359f7e70ae7f
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.hpp	Thu Jun 27 19:57:43 2013 -0400
+++ b/src/share/vm/graal/graalCompiler.hpp	Thu Jun 27 22:18:52 2013 -0700
@@ -85,23 +85,13 @@
 
   static int to_cp_index_u2(int index) {
     // Tag.
-    return to_index_u2(index) + ConstantPool::CPCACHE_INDEX_TAG;
-  }
-
-  static int to_index_u2(int index) {
-    // Swap.
-    return ((index & 0xFF) << 8) | (index >> 8);
-  }
-
-  static int to_index_u4(int index) {
-    // Swap.
-    return ((index & 0xFF) << 24) | ((index & 0xFF00) << 8) | ((index & 0xFF0000) >> 8) | ((index & 0xFF000000) >> 24);
+    return index + ConstantPool::CPCACHE_INDEX_TAG;
   }
 
   static int to_cp_index(int raw_index, Bytecodes::Code bc) {
     int cp_index;
     if (bc == Bytecodes::_invokedynamic) {
-      cp_index = to_index_u4(raw_index);
+      cp_index = raw_index;
       assert(ConstantPool::is_invokedynamic_index(cp_index), "not an invokedynamic constant pool index");
     } else {
       assert(bc == Bytecodes::_getfield        || bc == Bytecodes::_putfield  ||