forked from OSchip/llvm-project
Remove useless cast and update a comment.
llvm-svn: 293089
This commit is contained in:
parent
470f070b7d
commit
6ec3b468dd
|
@ -512,16 +512,14 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type,
|
||||||
uint64_t Val) const {
|
uint64_t Val) const {
|
||||||
checkInt<32>(Loc, Val, Type);
|
checkInt<32>(Loc, Val, Type);
|
||||||
|
|
||||||
// R_386_PC16/R_386_16/R_386_PC8/R_386_8 are not part of the current i386
|
// R_386_{PC,}{8,16} are not part of the i386 psABI, but they are
|
||||||
// psABI. They are used by 16-bit x86 objects, like boot loaders.
|
// being used for some 16-bit programs such as boot loaders, so
|
||||||
if (Type == R_386_8 || Type == R_386_PC8) {
|
// we want to support them.
|
||||||
*Loc = (uint8_t)Val;
|
if (Type == R_386_8 || Type == R_386_PC8)
|
||||||
return;
|
*Loc = Val;
|
||||||
}
|
else if (Type == R_386_16 || Type == R_386_PC16)
|
||||||
if (Type == R_386_16 || Type == R_386_PC16) {
|
|
||||||
write16le(Loc, Val);
|
write16le(Loc, Val);
|
||||||
return;
|
else
|
||||||
}
|
|
||||||
write32le(Loc, Val);
|
write32le(Loc, Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue