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

Unified Diff: src/ia32/assembler-ia32.cc

Issue 12638011: Revert r13901 to reland with proper credit to external contributor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/assembler-ia32.cc
diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc
index b48906e70614ac930327856b8eec9afb3822a3f3..d9263163fefb97dee052b7009969edc563354d07 100644
--- a/src/ia32/assembler-ia32.cc
+++ b/src/ia32/assembler-ia32.cc
@@ -1425,11 +1425,7 @@ void Assembler::call(byte* entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
ASSERT(!RelocInfo::IsCodeTarget(rmode));
EMIT(0xE8);
- if (RelocInfo::IsRuntimeEntry(rmode)) {
- emit(reinterpret_cast<uint32_t>(entry), rmode);
- } else {
- emit(entry - (pc_ + sizeof(int32_t)), rmode);
- }
+ emit(entry - (pc_ + sizeof(int32_t)), rmode);
}
@@ -1494,11 +1490,7 @@ void Assembler::jmp(byte* entry, RelocInfo::Mode rmode) {
EnsureSpace ensure_space(this);
ASSERT(!RelocInfo::IsCodeTarget(rmode));
EMIT(0xE9);
- if (RelocInfo::IsRuntimeEntry(rmode)) {
- emit(reinterpret_cast<uint32_t>(entry), rmode);
- } else {
- emit(entry - (pc_ + sizeof(int32_t)), rmode);
- }
+ emit(entry - (pc_ + sizeof(int32_t)), rmode);
}
@@ -1555,11 +1547,7 @@ void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode) {
// 0000 1111 1000 tttn #32-bit disp.
EMIT(0x0F);
EMIT(0x80 | cc);
- if (RelocInfo::IsRuntimeEntry(rmode)) {
- emit(reinterpret_cast<uint32_t>(entry), rmode);
- } else {
- emit(entry - (pc_ + sizeof(int32_t)), rmode);
- }
+ emit(entry - (pc_ + sizeof(int32_t)), rmode);
}
@@ -2576,7 +2564,10 @@ void Assembler::GrowBuffer() {
// Relocate runtime entries.
for (RelocIterator it(desc); !it.done(); it.next()) {
RelocInfo::Mode rmode = it.rinfo()->rmode();
- if (rmode == RelocInfo::INTERNAL_REFERENCE) {
+ if (rmode == RelocInfo::RUNTIME_ENTRY) {
+ int32_t* p = reinterpret_cast<int32_t*>(it.rinfo()->pc());
+ *p -= pc_delta; // relocate entry
+ } else if (rmode == RelocInfo::INTERNAL_REFERENCE) {
int32_t* p = reinterpret_cast<int32_t*>(it.rinfo()->pc());
if (*p != 0) { // 0 means uninitialized.
*p += pc_delta;
« no previous file with comments | « src/assembler.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698