@@ -16,27 +16,33 @@ MCAsmBackend::MCAsmBackend() : HasDataInCodeSupport(false) {}
16
16
17
17
MCAsmBackend::~MCAsmBackend () {}
18
18
19
- const MCFixupKindInfo &
20
- MCAsmBackend::getFixupKindInfo (MCFixupKind Kind) const {
19
+ const MCFixupKindInfo &MCAsmBackend::getFixupKindInfo (MCFixupKind Kind) const {
21
20
static const MCFixupKindInfo Builtins[] = {
22
- { " FK_Data_1" , 0 , 8 , 0 },
23
- { " FK_Data_2" , 0 , 16 , 0 },
24
- { " FK_Data_4" , 0 , 32 , 0 },
25
- { " FK_Data_8" , 0 , 64 , 0 },
26
- { " FK_PCRel_1" , 0 , 8 , MCFixupKindInfo::FKF_IsPCRel },
27
- { " FK_PCRel_2" , 0 , 16 , MCFixupKindInfo::FKF_IsPCRel },
28
- { " FK_PCRel_4" , 0 , 32 , MCFixupKindInfo::FKF_IsPCRel },
29
- { " FK_PCRel_8" , 0 , 64 , MCFixupKindInfo::FKF_IsPCRel },
30
- { " FK_GPRel_1" , 0 , 8 , 0 },
31
- { " FK_GPRel_2" , 0 , 16 , 0 },
32
- { " FK_GPRel_4" , 0 , 32 , 0 },
33
- { " FK_GPRel_8" , 0 , 64 , 0 },
34
- { " FK_SecRel_1" , 0 , 8 , 0 },
35
- { " FK_SecRel_2" , 0 , 16 , 0 },
36
- { " FK_SecRel_4" , 0 , 32 , 0 },
37
- { " FK_SecRel_8" , 0 , 64 , 0 }
38
- };
21
+ {" FK_Data_1" , 0 , 8 , 0 },
22
+ {" FK_Data_2" , 0 , 16 , 0 },
23
+ {" FK_Data_4" , 0 , 32 , 0 },
24
+ {" FK_Data_8" , 0 , 64 , 0 },
25
+ {" FK_PCRel_1" , 0 , 8 , MCFixupKindInfo::FKF_IsPCRel},
26
+ {" FK_PCRel_2" , 0 , 16 , MCFixupKindInfo::FKF_IsPCRel},
27
+ {" FK_PCRel_4" , 0 , 32 , MCFixupKindInfo::FKF_IsPCRel},
28
+ {" FK_PCRel_8" , 0 , 64 , MCFixupKindInfo::FKF_IsPCRel},
29
+ {" FK_GPRel_1" , 0 , 8 , 0 },
30
+ {" FK_GPRel_2" , 0 , 16 , 0 },
31
+ {" FK_GPRel_4" , 0 , 32 , 0 },
32
+ {" FK_GPRel_8" , 0 , 64 , 0 },
33
+ {" FK_SecRel_1" , 0 , 8 , 0 },
34
+ {" FK_SecRel_2" , 0 , 16 , 0 },
35
+ {" FK_SecRel_4" , 0 , 32 , 0 },
36
+ {" FK_SecRel_8" , 0 , 64 , 0 }};
39
37
40
38
assert ((size_t )Kind <= array_lengthof (Builtins) && " Unknown fixup kind" );
41
39
return Builtins[Kind];
42
40
}
41
+
42
+ bool MCAsmBackend::fixupNeedsRelaxationAdvanced (
43
+ const MCFixup &Fixup, bool Resolved, uint64_t Value,
44
+ const MCRelaxableFragment *DF, const MCAsmLayout &Layout) const {
45
+ if (!Resolved)
46
+ return true ;
47
+ return fixupNeedsRelaxation (Fixup, Value, DF, Layout);
48
+ }
0 commit comments