File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -56,24 +56,23 @@ class Immediate {
56
56
}
57
57
58
58
// Test if x is within signed immediate range for nbits.
59
- static bool is_uimm (int64_t x, unsigned int nbits) {
59
+ static bool is_uimm (uint64_t x, unsigned int nbits) {
60
60
// nbits == 0 --> false
61
61
// nbits >= 64 --> true
62
62
assert (1 <= nbits && nbits < 64 , " don't call, use statically known result" );
63
- const uint64_t xu = (unsigned long )x;
64
63
const uint64_t maxplus1 = 1UL << nbits;
65
- return xu < maxplus1; // Unsigned comparison. Negative inputs appear to be very large.
64
+ return x < maxplus1; // Unsigned comparison. Negative inputs appear to be very large.
66
65
}
67
- static bool is_uimm32 (int64_t x) {
66
+ static bool is_uimm32 (uint64_t x) {
68
67
return is_uimm (x, 32 );
69
68
}
70
- static bool is_uimm16 (int64_t x) {
69
+ static bool is_uimm16 (uint64_t x) {
71
70
return is_uimm (x, 16 );
72
71
}
73
- static bool is_uimm12 (int64_t x) {
72
+ static bool is_uimm12 (uint64_t x) {
74
73
return is_uimm (x, 12 );
75
74
}
76
- static bool is_uimm8 (int64_t x) {
75
+ static bool is_uimm8 (uint64_t x) {
77
76
return is_uimm (x, 8 );
78
77
}
79
78
};
You can’t perform that action at this time.
0 commit comments