forked from OSchip/llvm-project
parent
159fac4970
commit
3ab352292c
|
@ -76,25 +76,6 @@ private:
|
|||
|
||||
/// Operations
|
||||
|
||||
// Width is the width in bytes of the extend.
|
||||
RelocToApply zeroExtend(RelocToApply r, char Width) {
|
||||
if (Width == r.Width)
|
||||
return r;
|
||||
r.Value &= (1LL << ((Width * 8))) - 1;
|
||||
return r;
|
||||
}
|
||||
RelocToApply signExtend(RelocToApply r, char Width) {
|
||||
if (Width == r.Width)
|
||||
return r;
|
||||
bool SignBit = r.Value & (1LL << ((Width * 8) - 1));
|
||||
if (SignBit) {
|
||||
r.Value |= ~((1LL << (Width * 8)) - 1);
|
||||
} else {
|
||||
r.Value &= (1LL << (Width * 8)) - 1;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/// X86-64 ELF
|
||||
RelocToApply visitELF_X86_64_NONE(RelocationRef R) {
|
||||
return RelocToApply(0, 0);
|
||||
|
|
Loading…
Reference in New Issue