@@ -269,14 +269,11 @@ AArch64MCCodeEmitter::getAdrLabelOpValue(const MCInst &MI, unsigned OpIdx,
269
269
assert (MO.isExpr () && " Unexpected target type!" );
270
270
const MCExpr *Expr = MO.getExpr ();
271
271
272
- MCFixupKind Kind = MI.getOpcode () == AArch64::ADR
273
- ? MCFixupKind (AArch64::fixup_aarch64_pcrel_adr_imm21)
274
- : MCFixupKind (AArch64::fixup_aarch64_pcrel_adrp_imm21);
275
- Fixups.push_back (MCFixup::create (0 , Expr, Kind));
276
-
272
+ unsigned Kind = MI.getOpcode () == AArch64::ADR
273
+ ? AArch64::fixup_aarch64_pcrel_adr_imm21
274
+ : AArch64::fixup_aarch64_pcrel_adrp_imm21;
275
+ Fixups.push_back (MCFixup::create (0 , Expr, Kind, true ));
277
276
MCNumFixups += 1 ;
278
-
279
- // All of the information is in the fixup.
280
277
return 0 ;
281
278
}
282
279
@@ -329,12 +326,9 @@ uint32_t AArch64MCCodeEmitter::getCondBranchTargetOpValue(
329
326
return MO.getImm ();
330
327
assert (MO.isExpr () && " Unexpected target type!" );
331
328
332
- MCFixupKind Kind = MCFixupKind (AArch64::fixup_aarch64_pcrel_branch19);
333
- Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind));
334
-
329
+ Fixups.push_back (MCFixup::create (
330
+ 0 , MO.getExpr (), AArch64::fixup_aarch64_pcrel_branch19, true ));
335
331
++MCNumFixups;
336
-
337
- // All of the information is in the fixup.
338
332
return 0 ;
339
333
}
340
334
@@ -350,12 +344,9 @@ uint32_t AArch64MCCodeEmitter::getCondCompBranchTargetOpValue(
350
344
return MO.getImm ();
351
345
assert (MO.isExpr () && " Unexpected target type!" );
352
346
353
- MCFixupKind Kind = MCFixupKind (AArch64::fixup_aarch64_pcrel_branch9);
354
- Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind));
355
-
347
+ Fixups.push_back (MCFixup::create (0 , MO.getExpr (),
348
+ AArch64::fixup_aarch64_pcrel_branch9, true ));
356
349
++MCNumFixups;
357
-
358
- // All of the information is in the fixup.
359
350
return 0 ;
360
351
}
361
352
@@ -373,12 +364,9 @@ AArch64MCCodeEmitter::getPAuthPCRelOpValue(const MCInst &MI, unsigned OpIdx,
373
364
return -(MO.getImm ());
374
365
assert (MO.isExpr () && " Unexpected target type!" );
375
366
376
- MCFixupKind Kind = MCFixupKind (AArch64::fixup_aarch64_pcrel_branch16);
377
- Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind));
378
-
367
+ Fixups.push_back (MCFixup::create (
368
+ 0 , MO.getExpr (), AArch64::fixup_aarch64_pcrel_branch16, true ));
379
369
++MCNumFixups;
380
-
381
- // All of the information is in the fixup.
382
370
return 0 ;
383
371
}
384
372
@@ -395,12 +383,9 @@ AArch64MCCodeEmitter::getLoadLiteralOpValue(const MCInst &MI, unsigned OpIdx,
395
383
return MO.getImm ();
396
384
assert (MO.isExpr () && " Unexpected target type!" );
397
385
398
- MCFixupKind Kind = MCFixupKind (AArch64::fixup_aarch64_ldr_pcrel_imm19);
399
- Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind));
400
-
386
+ Fixups.push_back (MCFixup::create (
387
+ 0 , MO.getExpr (), AArch64::fixup_aarch64_ldr_pcrel_imm19, true ));
401
388
++MCNumFixups;
402
-
403
- // All of the information is in the fixup.
404
389
return 0 ;
405
390
}
406
391
@@ -443,12 +428,9 @@ uint32_t AArch64MCCodeEmitter::getTestBranchTargetOpValue(
443
428
return MO.getImm ();
444
429
assert (MO.isExpr () && " Unexpected ADR target type!" );
445
430
446
- MCFixupKind Kind = MCFixupKind (AArch64::fixup_aarch64_pcrel_branch14);
447
- Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind));
448
-
431
+ Fixups.push_back (MCFixup::create (
432
+ 0 , MO.getExpr (), AArch64::fixup_aarch64_pcrel_branch14, true ));
449
433
++MCNumFixups;
450
-
451
- // All of the information is in the fixup.
452
434
return 0 ;
453
435
}
454
436
@@ -465,10 +447,10 @@ AArch64MCCodeEmitter::getBranchTargetOpValue(const MCInst &MI, unsigned OpIdx,
465
447
return MO.getImm ();
466
448
assert (MO.isExpr () && " Unexpected ADR target type!" );
467
449
468
- MCFixupKind Kind = MI.getOpcode () == AArch64::BL
469
- ? MCFixupKind ( AArch64::fixup_aarch64_pcrel_call26)
470
- : MCFixupKind ( AArch64::fixup_aarch64_pcrel_branch26) ;
471
- Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind));
450
+ unsigned Kind = MI.getOpcode () == AArch64::BL
451
+ ? AArch64::fixup_aarch64_pcrel_call26
452
+ : AArch64::fixup_aarch64_pcrel_branch26;
453
+ Fixups.push_back (MCFixup::create (0 , MO.getExpr (), Kind, true ));
472
454
473
455
++MCNumFixups;
474
456
0 commit comments