Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Unified Diff: src/IceInstX8632.cpp

Issue 828873002: Subzero: Start writing out some relocation sections (text) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review fixes Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.cpp
diff --git a/src/IceInstX8632.cpp b/src/IceInstX8632.cpp
index 77f54efb242128eb6df0488d284e8fa444042442..491e9c1b7b7c95a9ce3a68ea7582e840e66a37e0 100644
--- a/src/IceInstX8632.cpp
+++ b/src/IceInstX8632.cpp
@@ -585,8 +585,7 @@ void emitIASRegOpTyGPR(const Cfg *Func, Type Ty, const Variable *Var,
} else if (const auto Imm = llvm::dyn_cast<ConstantInteger32>(Src)) {
(Asm->*(Emitter.GPRImm))(Ty, VarReg, x86::Immediate(Imm->getValue()));
} else if (const auto Reloc = llvm::dyn_cast<ConstantRelocatable>(Src)) {
- AssemblerFixup *Fixup =
- x86::DisplacementRelocation::create(Asm, FK_Abs_4, Reloc);
+ AssemblerFixup *Fixup = Asm->createFixup(llvm::ELF::R_386_32, Reloc);
(Asm->*(Emitter.GPRImm))(Ty, VarReg,
x86::Immediate(Reloc->getOffset(), Fixup));
} else if (const auto Split = llvm::dyn_cast<VariableSplit>(Src)) {
@@ -609,8 +608,7 @@ void emitIASAddrOpTyGPR(const Cfg *Func, Type Ty, const x86::Address &Addr,
} else if (const auto Imm = llvm::dyn_cast<ConstantInteger32>(Src)) {
(Asm->*(Emitter.AddrImm))(Ty, Addr, x86::Immediate(Imm->getValue()));
} else if (const auto Reloc = llvm::dyn_cast<ConstantRelocatable>(Src)) {
- AssemblerFixup *Fixup =
- x86::DisplacementRelocation::create(Asm, FK_Abs_4, Reloc);
+ AssemblerFixup *Fixup = Asm->createFixup(llvm::ELF::R_386_32, Reloc);
(Asm->*(Emitter.AddrImm))(Ty, Addr,
x86::Immediate(Reloc->getOffset(), Fixup));
} else {
@@ -2851,7 +2849,7 @@ x86::Address OperandX8632Mem::toAsmAddress(Assembler *Asm) const {
} else if (const auto CR =
llvm::dyn_cast<ConstantRelocatable>(getOffset())) {
Disp = CR->getOffset();
- Fixup = x86::DisplacementRelocation::create(Asm, FK_Abs_4, CR);
+ Fixup = Asm->createFixup(llvm::ELF::R_386_32, CR);
} else {
llvm_unreachable("Unexpected offset type");
}
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698