@@ -175,7 +175,7 @@ bool checkRegister(const ThumbRelocation &R, HalfWords Reg) {
175
175
template <EdgeKind_aarch32 Kind>
176
176
void writeRegister (WritableThumbRelocation &R, HalfWords Reg) {
177
177
static constexpr HalfWords Mask = FixupInfo<Kind>::RegMask;
178
- assert ((Mask.Hi & Reg.Hi ) == Reg.Hi && (Mask.Hi & Reg.Hi ) == Reg.Hi &&
178
+ assert ((Mask.Hi & Reg.Hi ) == Reg.Hi && (Mask.Lo & Reg.Lo ) == Reg.Lo &&
179
179
" Value bits exceed bit range of given mask" );
180
180
R.Hi = (R.Hi & ~Mask.Hi ) | Reg.Hi ;
181
181
R.Lo = (R.Lo & ~Mask.Lo ) | Reg.Lo ;
@@ -184,7 +184,7 @@ void writeRegister(WritableThumbRelocation &R, HalfWords Reg) {
184
184
template <EdgeKind_aarch32 Kind>
185
185
void writeImmediate (WritableThumbRelocation &R, HalfWords Imm) {
186
186
static constexpr HalfWords Mask = FixupInfo<Kind>::ImmMask;
187
- assert ((Mask.Hi & Imm.Hi ) == Imm.Hi && (Mask.Hi & Imm.Hi ) == Imm.Hi &&
187
+ assert ((Mask.Hi & Imm.Hi ) == Imm.Hi && (Mask.Lo & Imm.Lo ) == Imm.Lo &&
188
188
" Value bits exceed bit range of given mask" );
189
189
R.Hi = (R.Hi & ~Mask.Hi ) | Imm.Hi ;
190
190
R.Lo = (R.Lo & ~Mask.Lo ) | Imm.Lo ;
@@ -242,10 +242,6 @@ Expected<int64_t> readAddendThumb(LinkGraph &G, Block &B, const Edge &E,
242
242
case Thumb_Jump24:
243
243
if (!checkOpcode<Thumb_Jump24>(R))
244
244
return makeUnexpectedOpcodeError (G, R, Kind);
245
- if (R.Lo & FixupInfo<Thumb_Jump24>::LoBitConditional)
246
- return make_error<JITLinkError>(" Relocation expects an unconditional "
247
- " B.W branch instruction: " +
248
- StringRef (G.getEdgeKindName (Kind)));
249
245
return LLVM_LIKELY (ArmCfg.J1J2BranchEncoding )
250
246
? decodeImmBT4BlT1BlxT2_J1J2 (R.Hi , R.Lo )
251
247
: decodeImmBT4BlT1BlxT2 (R.Hi , R.Lo );
@@ -352,10 +348,6 @@ Error applyFixupThumb(LinkGraph &G, Block &B, const Edge &E,
352
348
case Thumb_Jump24: {
353
349
if (!checkOpcode<Thumb_Jump24>(R))
354
350
return makeUnexpectedOpcodeError (G, R, Kind);
355
- if (R.Lo & FixupInfo<Thumb_Jump24>::LoBitConditional)
356
- return make_error<JITLinkError>(" Relocation expects an unconditional "
357
- " B.W branch instruction: " +
358
- StringRef (G.getEdgeKindName (Kind)));
359
351
if (!(TargetSymbol.hasTargetFlags (ThumbSymbol)))
360
352
return make_error<JITLinkError>(" Branch relocation needs interworking "
361
353
" stub when bridging to ARM: " +
@@ -471,6 +463,7 @@ const char *getEdgeKindName(Edge::Kind K) {
471
463
472
464
switch (K) {
473
465
KIND_NAME_CASE (Data_Delta32)
466
+ KIND_NAME_CASE (Data_Pointer32)
474
467
KIND_NAME_CASE (Arm_Call)
475
468
KIND_NAME_CASE (Thumb_Call)
476
469
KIND_NAME_CASE (Thumb_Jump24)
0 commit comments