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

Unified Diff: src/IceAssemblerX86BaseImpl.h

Issue 1506653002: Subzero: Add Non-SFI support for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Refactor the link commands Created 4 years, 12 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
Index: src/IceAssemblerX86BaseImpl.h
diff --git a/src/IceAssemblerX86BaseImpl.h b/src/IceAssemblerX86BaseImpl.h
index a32d97c14a76273d5d32408fdd34f28759f00a63..8919c23c78feb258fb8b5fd055978d2213c0d973 100644
--- a/src/IceAssemblerX86BaseImpl.h
+++ b/src/IceAssemblerX86BaseImpl.h
@@ -123,7 +123,7 @@ void AssemblerX86Base<Machine>::call(const ConstantRelocatable *label) {
AssemblerBuffer::EnsureCapacity ensured(&Buffer);
intptr_t call_start = Buffer.getPosition();
emitUint8(0xE8);
- emitFixup(this->createFixup(Traits::PcRelFixup, label));
+ emitFixup(this->createFixup(Traits::FK_PcRel, label));
emitInt32(-4);
assert((Buffer.getPosition() - call_start) == kCallExternalLabelSize);
(void)call_start;
@@ -134,7 +134,7 @@ void AssemblerX86Base<Machine>::call(const Immediate &abs_address) {
AssemblerBuffer::EnsureCapacity ensured(&Buffer);
intptr_t call_start = Buffer.getPosition();
emitUint8(0xE8);
- emitFixup(this->createFixup(Traits::PcRelFixup, AssemblerFixup::NullSymbol));
+ emitFixup(this->createFixup(Traits::FK_PcRel, AssemblerFixup::NullSymbol));
emitInt32(abs_address.value() - 4);
assert((Buffer.getPosition() - call_start) == kCallExternalLabelSize);
(void)call_start;
@@ -3224,7 +3224,8 @@ void AssemblerX86Base<Machine>::j(typename Traits::Cond::BrCond condition,
AssemblerBuffer::EnsureCapacity ensured(&Buffer);
emitUint8(0x0F);
emitUint8(0x80 + condition);
- emitFixup(this->createFixup(Traits::PcRelFixup, label));
+ assert(0 && "Untested - please verify and then remove this assert.");
John 2016/01/04 21:33:51 Why isn't this codepath exercised yet? If this ins
Jim Stichnoth 2016/01/04 23:32:12 We don't (yet) have a way to produce a conditional
+ emitFixup(this->createFixup(Traits::FK_PcRel, label));
emitInt32(-4);
}
@@ -3264,7 +3265,8 @@ template <class Machine>
void AssemblerX86Base<Machine>::jmp(const ConstantRelocatable *label) {
AssemblerBuffer::EnsureCapacity ensured(&Buffer);
emitUint8(0xE9);
- emitFixup(this->createFixup(Traits::PcRelFixup, label));
+ assert(0 && "Untested - please verify and then remove this assert.");
+ emitFixup(this->createFixup(Traits::FK_PcRel, label));
emitInt32(-4);
}

Powered by Google App Engine
This is Rietveld 408576698