Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index d8878a83ee3890a5fa181c0c4124b2e195a6912c..38884aa65bc2924f50a8f076d9d6553e9104d72d 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -2852,6 +2852,21 @@ void MacroAssembler::LoadGlobalCell(Register dst, Handle<Cell> cell) { |
} |
+void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, |
+ Register scratch) { |
+ Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT); |
+ cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset)); |
+} |
+ |
+ |
+void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, |
+ Label* miss) { |
+ Move(value, cell, RelocInfo::EMBEDDED_OBJECT); |
+ movp(value, FieldOperand(value, WeakCell::kValueOffset)); |
+ JumpIfSmi(value, miss); |
+} |
+ |
+ |
void MacroAssembler::Drop(int stack_elements) { |
if (stack_elements > 0) { |
addp(rsp, Immediate(stack_elements * kPointerSize)); |