@@ -152,10 +152,11 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
152
152
// Note that the halfwords are stored high first, low second; so we need
153
153
// to transpose the fixup value here to map properly.
154
154
unsigned isNeg = (int64_t (Value) < 0 ) ? 1 : 0 ;
155
- uint32_t Binary = 0x3fffff & ((Value - 4 ) >> 1 );
156
- Binary = (Binary & 0x7ff ) << 16 ; // Low imm11 value.
157
- Binary |= (Binary & 0x1ffc00 ) >> 11 ; // High imm10 value.
158
- Binary |= isNeg << 10 ; // Sign bit.
155
+ uint32_t Binary = 0 ;
156
+ Value = 0x3fffff & ((Value - 4 ) >> 1 );
157
+ Binary = (Value & 0x7ff ) << 16 ; // Low imm11 value.
158
+ Binary |= (Value & 0x1ffc00 ) >> 11 ; // High imm10 value.
159
+ Binary |= isNeg << 10 ; // Sign bit.
159
160
return Binary;
160
161
}
161
162
case ARM::fixup_arm_thumb_blx: {
@@ -169,10 +170,11 @@ static unsigned adjustFixupValue(unsigned Kind, uint64_t Value) {
169
170
// Note that the halfwords are stored high first, low second; so we need
170
171
// to transpose the fixup value here to map properly.
171
172
unsigned isNeg = (int64_t (Value) < 0 ) ? 1 : 0 ;
172
- uint32_t Binary = 0xfffff & ((Value - 2 ) >> 2 );
173
- Binary = (Binary & 0x3ff ) << 17 ; // Low imm10L value.
174
- Binary |= (Binary & 0xffc00 ) >> 10 ; // High imm10H value.
175
- Binary |= isNeg << 10 ; // Sign bit.
173
+ uint32_t Binary = 0 ;
174
+ Value = 0xfffff & ((Value - 2 ) >> 2 );
175
+ Binary = (Value & 0x3ff ) << 17 ; // Low imm10L value.
176
+ Binary |= (Value & 0xffc00 ) >> 10 ; // High imm10H value.
177
+ Binary |= isNeg << 10 ; // Sign bit.
176
178
return Binary;
177
179
}
178
180
case ARM::fixup_arm_thumb_cp:
0 commit comments