Commit ac320205 authored by ager@chromium.org's avatar ager@chromium.org

ARM: Fix ARM safepoint tables by ensuring that constant pools are not

emitted as part of the safepoint tables.

Always emit the constant pool as part of generating deferred code
(whether or not there actually is any deferred code) and ASSERT that
there is no pending relocation info while using db and dd to write
tables.

Review URL: http://codereview.chromium.org/6360003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 87e82b04
...@@ -2495,6 +2495,10 @@ void Assembler::GrowBuffer() { ...@@ -2495,6 +2495,10 @@ void Assembler::GrowBuffer() {
void Assembler::db(uint8_t data) { void Assembler::db(uint8_t data) {
// No relocation info should be pending while using db. db is used
// to write pure data with no pointers and the constant pool should
// be emitted before using db.
ASSERT(num_prinfo_ == 0);
CheckBuffer(); CheckBuffer();
*reinterpret_cast<uint8_t*>(pc_) = data; *reinterpret_cast<uint8_t*>(pc_) = data;
pc_ += sizeof(uint8_t); pc_ += sizeof(uint8_t);
...@@ -2502,6 +2506,10 @@ void Assembler::db(uint8_t data) { ...@@ -2502,6 +2506,10 @@ void Assembler::db(uint8_t data) {
void Assembler::dd(uint32_t data) { void Assembler::dd(uint32_t data) {
// No relocation info should be pending while using dd. dd is used
// to write pure data with no pointers and the constant pool should
// be emitted before using dd.
ASSERT(num_prinfo_ == 0);
CheckBuffer(); CheckBuffer();
*reinterpret_cast<uint32_t*>(pc_) = data; *reinterpret_cast<uint32_t*>(pc_) = data;
pc_ += sizeof(uint32_t); pc_ += sizeof(uint32_t);
......
...@@ -1240,8 +1240,10 @@ class Assembler : public Malloced { ...@@ -1240,8 +1240,10 @@ class Assembler : public Malloced {
// Use --code-comments to enable. // Use --code-comments to enable.
void RecordComment(const char* msg); void RecordComment(const char* msg);
// Writes a single byte or word of data in the code stream. Used for // Writes a single byte or word of data in the code stream. Used
// inline tables, e.g., jump-tables. // for inline tables, e.g., jump-tables. The constant pool should be
// emitted before any use of db and dd to ensure that constant pools
// are not emitted as part of the tables generated.
void db(uint8_t data); void db(uint8_t data);
void dd(uint32_t data); void dd(uint32_t data);
......
...@@ -341,6 +341,11 @@ bool LCodeGen::GenerateDeferredCode() { ...@@ -341,6 +341,11 @@ bool LCodeGen::GenerateDeferredCode() {
__ jmp(code->exit()); __ jmp(code->exit());
} }
// Force constant pool emission at the end of deferred code to make
// sure that no constant pools are emitted after the official end of
// the instruction sequence.
masm()->CheckConstPool(true, false);
// Deferred code is the last part of the instruction sequence. Mark // Deferred code is the last part of the instruction sequence. Mark
// the generated code as done unless we bailed out. // the generated code as done unless we bailed out.
if (!is_aborted()) status_ = DONE; if (!is_aborted()) status_ = DONE;
......
...@@ -842,14 +842,6 @@ js1_5/GC/regress-203278-2: PASS || TIMEOUT ...@@ -842,14 +842,6 @@ js1_5/GC/regress-203278-2: PASS || TIMEOUT
js1_5/Regress/regress-416628: CRASH js1_5/Regress/regress-416628: CRASH
js1_5/Regress/regress-96128-n: PASS || CRASH js1_5/Regress/regress-96128-n: PASS || CRASH
# BUG(1032): test crashes.
ecma/Date/15.9.3.1-1: PASS || CRASH
ecma/Date/15.9.3.1-2: PASS || CRASH
ecma/Date/15.9.3.1-3: PASS || CRASH
ecma/Date/15.9.3.1-4: PASS || CRASH
ecma/Date/15.9.3.1-5: PASS || CRASH
[ $fast == yes && $arch == arm ] [ $fast == yes && $arch == arm ]
# In fast mode on arm we try to skip all tests that would time out, # In fast mode on arm we try to skip all tests that would time out,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment