diff src/share/vm/asm/codeBuffer.cpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents c7c777385a15
children d1605aabd0a1
line wrap: on
line diff
--- a/src/share/vm/asm/codeBuffer.cpp	Fri Apr 11 09:56:35 2008 -0400
+++ b/src/share/vm/asm/codeBuffer.cpp	Sun Apr 13 17:43:42 2008 -0400
@@ -281,8 +281,10 @@
 
     // Need to return a pc, doesn't matter what it is since it will be
     // replaced during resolution later.
-    // (Don't return NULL or badAddress, since branches shouldn't overflow.)
-    return base;
+    // Don't return NULL or badAddress, since branches shouldn't overflow.
+    // Don't return base either because that could overflow displacements
+    // for shorter branches.  It will get checked when bound.
+    return branch_pc;
   }
 }