src/cpu/sparc/vm/assembler_sparc.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/sparc/vm/assembler_sparc.hpp Tue Jan 11 14:54:09 2011
--- new/src/cpu/sparc/vm/assembler_sparc.hpp Tue Jan 11 14:54:09 2011
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 826,839 ****
--- 826,847 ----
static bool is_simm(int x, int nbits) { return -( 1 << nbits-1 ) <= x && x < ( 1 << nbits-1 ); }
// test if -4096 <= x <= 4095
static bool is_simm13(int x) { return is_simm(x, 13); }
+ bool is_in_wdisp_range(address a, address b, int nbits) {
+ intptr_t d = intptr_t(b) - intptr_t(a);
+ return is_simm(d, nbits + 2);
+ }
+
// 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);
! return is_in_wdisp_range(target(L), pc(), 16);
+ }
+ // test if the distance between two addresses fits in simm30 range in words
+ bool is_in_wdisp30_range(address a, address b) {
+ return is_in_wdisp_range(a, b, 30);
}
enum ASIs { // page 72, v9
ASI_PRIMARY = 0x80,
ASI_PRIMARY_LITTLE = 0x88
src/cpu/sparc/vm/assembler_sparc.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File