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

Unified Diff: src/assembler_ia32.h

Issue 837553009: Make fixups reference any constant (allow const float/double pool literals). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: go back to one arenaallocator type alias 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/assembler.cpp ('k') | src/assembler_ia32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler_ia32.h
diff --git a/src/assembler_ia32.h b/src/assembler_ia32.h
index d38dca78b897a3fa3ab9e6b8c9d7203cc2a33109..08347c460d3142c2e621a3ec2fcd4876222b1852 100644
--- a/src/assembler_ia32.h
+++ b/src/assembler_ia32.h
@@ -51,13 +51,13 @@ class DisplacementRelocation : public AssemblerFixup {
public:
static DisplacementRelocation *create(Assembler *Asm, FixupKind Kind,
- const ConstantRelocatable *Sym) {
+ const Constant *Sym) {
return new (Asm->Allocate<DisplacementRelocation>())
DisplacementRelocation(Kind, Sym);
}
private:
- DisplacementRelocation(FixupKind Kind, const ConstantRelocatable *Sym)
+ DisplacementRelocation(FixupKind Kind, const Constant *Sym)
: AssemblerFixup(Kind, Sym) {}
};
@@ -68,8 +68,8 @@ class Immediate {
public:
explicit Immediate(int32_t value) : value_(value), fixup_(nullptr) {}
- explicit Immediate(AssemblerFixup *fixup)
- : value_(fixup->value()->getOffset()), fixup_(fixup) {
+ Immediate(RelocOffsetT offset, AssemblerFixup *fixup)
+ : value_(offset), fixup_(fixup) {
// Use the Offset in the "value" for now. If the symbol is part of
// ".bss", then the relocation's symbol will be plain ".bss" and
// the value will need to be adjusted further to be sym's
@@ -250,20 +250,19 @@ public:
return result;
}
- static Address Absolute(AssemblerFixup *fixup) {
+ static Address Absolute(RelocOffsetT Offset, AssemblerFixup *fixup) {
Address result;
result.SetModRM(0, RegX8632::Encoded_Reg_ebp);
// Use the Offset in the displacement for now. If the symbol is part of
// ".bss", then the relocation's symbol will be plain .bss and the
// displacement will need to be adjusted further to be sym's
// bss offset + Offset.
- result.SetDisp32(fixup->value()->getOffset());
+ result.SetDisp32(Offset);
result.SetFixup(fixup);
return result;
}
- static Address ofConstPool(GlobalContext *Ctx, Assembler *Asm,
- const Constant *Imm);
+ static Address ofConstPool(Assembler *Asm, const Constant *Imm);
private:
Address() {} // Needed by Address::Absolute.
« no previous file with comments | « src/assembler.cpp ('k') | src/assembler_ia32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698