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

Unified Diff: src/assembler.cc

Issue 1155673005: Fix issues with Arm's use of embedded constant pools (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move DataAlign implementation to common code Created 5 years, 6 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/arm64/assembler-arm64.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 90d08bb6821177d179fbc0c161c5e7eae448a698..acce223582e75fb98cbe220947d2760211d15c07 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -1814,7 +1814,7 @@ int ConstantPoolBuilder::Emit(Assembler* assm) {
if (!emitted) {
// Mark start of constant pool. Align if necessary.
- if (!empty) assm->Align(kDoubleSize);
+ if (!empty) assm->DataAlign(kDoubleSize);
assm->bind(&emitted_label_);
if (!empty) {
// Emit in groups based on access and type.
@@ -1822,7 +1822,7 @@ int ConstantPoolBuilder::Emit(Assembler* assm) {
EmitGroup(assm, ConstantPoolEntry::REGULAR, ConstantPoolEntry::DOUBLE);
EmitGroup(assm, ConstantPoolEntry::REGULAR, ConstantPoolEntry::INTPTR);
if (info_[ConstantPoolEntry::DOUBLE].overflow()) {
- assm->Align(kDoubleSize);
+ assm->DataAlign(kDoubleSize);
EmitGroup(assm, ConstantPoolEntry::OVERFLOWED,
ConstantPoolEntry::DOUBLE);
}
@@ -1871,5 +1871,13 @@ void Assembler::RecordDebugBreakSlot() {
EnsureSpace ensure_space(this);
RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
}
+
+
+void Assembler::DataAlign(int m) {
+ DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
+ while ((pc_offset() & (m - 1)) != 0) {
+ db(0);
+ }
+}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698