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

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

Issue 1227403006: Use a label-branch in CheckConstPool. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/assembler-arm.cc
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc
index 96bdf79facedebfecd39c57e2cda0668f1f7c006..6f67a7031d339797aaf913b0f160dfdbdf403d31 100644
--- a/src/arm/assembler-arm.cc
+++ b/src/arm/assembler-arm.cc
@@ -1325,7 +1325,8 @@ int Assembler::branch_offset(Label* L) {
// Block the emission of the constant pool, since the branch instruction must
// be emitted at the pc offset recorded by the label.
- BlockConstPoolFor(1);
+ if (!is_const_pool_blocked()) BlockConstPoolFor(1);
+
return target_pos - (pc_offset() + kPcLoadDelta);
}
@@ -3838,7 +3839,10 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
bind(&size_check);
// Emit jump over constant pool if necessary.
- if (require_jump) b(size - kPcLoadDelta);
+ Label after_pool;
+ if (require_jump) {
+ b(&after_pool);
+ }
// Put down constant pool marker "Undefined instruction".
// The data size helps disassembly know what to print.
@@ -3922,6 +3926,10 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
RecordComment("]");
DCHECK_EQ(size, SizeOfCodeGeneratedSince(&size_check));
+
+ if (after_pool.is_linked()) {
+ bind(&after_pool);
+ }
}
// Since a constant pool was just emitted, move the check offset forward by
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698