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

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

Issue 1378563002: [arm] Fix a double-register push operation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/arm/assembler-arm.h ('k') | src/arm/lithium-gap-resolver-arm.cc » ('j') | 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 b5910d05be5de63c9092aedecdec05ec9e487239..50c707d2a0741c88c1b9efc3a8db6183be147fed 100644
--- a/src/arm/assembler-arm.cc
+++ b/src/arm/assembler-arm.cc
@@ -302,6 +302,13 @@ MemOperand::MemOperand(Register rn, int32_t offset, AddrMode am) {
rm_ = no_reg;
offset_ = offset;
am_ = am;
+
+ // Accesses below the stack pointer are not safe, and are prohibited by the
+ // ABI. We can check obvious violations here.
+ if (rn.is(sp)) {
+ if (am == Offset) DCHECK_LE(0, offset);
+ if (am == NegOffset) DCHECK_GE(0, offset);
+ }
}
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/lithium-gap-resolver-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698