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

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

Issue 203443003: A64: Force emission of the veneer pool emission when required. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/a64/assembler-a64.h ('k') | src/a64/assembler-a64-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/assembler-a64.cc
diff --git a/src/a64/assembler-a64.cc b/src/a64/assembler-a64.cc
index 51542b27da0d1cdc5230cc5a6d3f8c149644cdfe..2bffc587f28e8069457c3c08a1d0751beaa66217 100644
--- a/src/a64/assembler-a64.cc
+++ b/src/a64/assembler-a64.cc
@@ -2548,7 +2548,7 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
// Emit veneers for branches that would go out of range during emission of the
// constant pool.
- CheckVeneerPool(require_jump, kVeneerDistanceMargin + pool_size);
+ CheckVeneerPool(false, require_jump, kVeneerDistanceMargin + pool_size);
Label size_check;
bind(&size_check);
@@ -2641,7 +2641,7 @@ void Assembler::RecordVeneerPool(int location_offset, int size) {
}
-void Assembler::EmitVeneers(bool need_protection, int margin) {
+void Assembler::EmitVeneers(bool force_emit, bool need_protection, int margin) {
BlockPoolsScope scope(this);
RecordComment("[ Veneers");
@@ -2667,7 +2667,7 @@ void Assembler::EmitVeneers(bool need_protection, int margin) {
it = unresolved_branches_.begin();
while (it != unresolved_branches_.end()) {
- if (ShouldEmitVeneer(it->first, margin)) {
+ if (force_emit || ShouldEmitVeneer(it->first, margin)) {
Instruction* branch = InstructionAt(it->second.pc_offset_);
Label* label = it->second.label_;
@@ -2710,7 +2710,7 @@ void Assembler::EmitVeneers(bool need_protection, int margin) {
}
-void Assembler::CheckVeneerPool(bool require_jump,
+void Assembler::CheckVeneerPool(bool force_emit, bool require_jump,
int margin) {
// There is nothing to do if there are no pending veneer pool entries.
if (unresolved_branches_.empty()) {
@@ -2724,6 +2724,7 @@ void Assembler::CheckVeneerPool(bool require_jump,
// emission, such sequences are protected by calls to BlockVeneerPoolFor and
// BlockVeneerPoolScope.
if (is_veneer_pool_blocked()) {
+ ASSERT(!force_emit);
return;
}
@@ -2731,8 +2732,8 @@ void Assembler::CheckVeneerPool(bool require_jump,
// Prefer emitting veneers protected by an existing instruction.
margin *= kVeneerNoProtectionFactor;
}
- if (ShouldEmitVeneers(margin)) {
- EmitVeneers(require_jump, margin);
+ if (force_emit || ShouldEmitVeneers(margin)) {
+ EmitVeneers(force_emit, require_jump, margin);
} else {
next_veneer_pool_check_ =
unresolved_branches_first_limit() - kVeneerDistanceCheckMargin;
« no previous file with comments | « src/a64/assembler-a64.h ('k') | src/a64/assembler-a64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698