src/cpu/sparc/vm/assembler_sparc.hpp

changeset 2203
c393f046f4c5
parent 2201
d55217dc206f
child 2266
fff777a71346
equal deleted inserted replaced
2202:a932f331ef90 2203:c393f046f4c5
823 static bool is_simm(int x, int nbits) { return -( 1 << nbits-1 ) <= x && x < ( 1 << nbits-1 ); } 823 static bool is_simm(int x, int nbits) { return -( 1 << nbits-1 ) <= x && x < ( 1 << nbits-1 ); }
824 824
825 // test if -4096 <= x <= 4095 825 // test if -4096 <= x <= 4095
826 static bool is_simm13(int x) { return is_simm(x, 13); } 826 static bool is_simm13(int x) { return is_simm(x, 13); }
827 827
828 // test if label is in simm16 range in words (wdisp16).
829 bool is_in_wdisp16_range(Label& L) {
830 intptr_t d = intptr_t(pc()) - intptr_t(target(L));
831 return is_simm(d, 18);
832 }
833
828 enum ASIs { // page 72, v9 834 enum ASIs { // page 72, v9
829 ASI_PRIMARY = 0x80, 835 ASI_PRIMARY = 0x80,
830 ASI_PRIMARY_LITTLE = 0x88 836 ASI_PRIMARY_LITTLE = 0x88
831 // add more from book as needed 837 // add more from book as needed
832 }; 838 };

mercurial