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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 1777913002: [x64] Fix crashes in CheckAccessGlobalProxy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index b47a54118c714b80d21dcd13b9ec0d6cfdbff93a..81017b39e17fe6499400ddb37e0c495582a0e3d0 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4579,10 +4579,9 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
movp(scratch, rbp);
bind(&load_context);
DCHECK(SmiValuesAre32Bits());
- int smi_tag_offset = kSmiShift / kBitsPerByte;
- cmpl(MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset +
- smi_tag_offset),
- Immediate(StackFrame::STUB));
+ // This is "JumpIfNotSmi" but without loading the value into a register.
+ cmpl(MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset),
+ Immediate(0));
j(not_equal, &has_context);
movp(scratch, MemOperand(scratch, CommonFrameConstants::kCallerFPOffset));
jmp(&load_context);
« 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