diff src/cpu/sparc/vm/assembler_sparc.hpp @ 1848:c393f046f4c5

6991512: G1 barriers fail with 64bit C1 Summary: Fix compare-and-swap intrinsic problem with G1 post-barriers and issue with branch ranges in G1 stubs on sparc Reviewed-by: never, kvn
author iveresov
date Tue, 12 Oct 2010 23:51:20 -0700
parents d55217dc206f
children fff777a71346
line wrap: on
line diff
--- a/src/cpu/sparc/vm/assembler_sparc.hpp	Tue Oct 12 02:21:06 2010 -0700
+++ b/src/cpu/sparc/vm/assembler_sparc.hpp	Tue Oct 12 23:51:20 2010 -0700
@@ -825,6 +825,12 @@
   // test if -4096 <= x <= 4095
   static bool is_simm13(int x) { return is_simm(x, 13); }
 
+  // test if label is in simm16 range in words (wdisp16).
+  bool is_in_wdisp16_range(Label& L) {
+    intptr_t d = intptr_t(pc()) - intptr_t(target(L));
+    return is_simm(d, 18);
+  }
+
   enum ASIs { // page 72, v9
     ASI_PRIMARY        = 0x80,
     ASI_PRIMARY_LITTLE = 0x88