Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index e24c7bd0785a594fbba195f3fff3f28a0340ecd6..0e089070615cca9d41a2c253750a2fe7ccff6222 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -1988,8 +1988,9 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) { |
Register caller_fp = x10; |
__ Ldr(caller_fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
// Load and untag the context. |
- __ Ldr(w11, UntagSmiMemOperand(caller_fp, |
- StandardFrameConstants::kContextOffset)); |
+ STATIC_ASSERT((kSmiShift / kBitsPerByte) == 4); |
+ __ Ldr(w11, MemOperand(caller_fp, StandardFrameConstants::kContextOffset + |
+ (kSmiShift / kBitsPerByte))); |
__ Cmp(w11, StackFrame::ARGUMENTS_ADAPTOR); |
__ B(ne, &runtime); |
@@ -2837,8 +2838,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { |
// Store the smi values in the last match info. |
__ SmiTag(x10, current_offset); |
// Clearing the 32 bottom bits gives us a Smi. |
- STATIC_ASSERT(kSmiTag == 0); |
- __ Bic(x11, current_offset, kSmiShiftMask); |
+ STATIC_ASSERT(kSmiShift == 32); |
+ __ And(x11, current_offset, ~kWRegMask); |
__ Stp(x10, |
x11, |
MemOperand(last_match_offsets, kXRegSize * 2, PostIndex)); |
@@ -3477,7 +3478,8 @@ void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) { |
__ LoadRoot(result_, Heap::kSingleCharacterStringCacheRootIndex); |
// At this point code register contains smi tagged ASCII char code. |
- __ Add(result_, result_, Operand::UntagSmiAndScale(code_, kPointerSizeLog2)); |
+ STATIC_ASSERT(kSmiShift > kPointerSizeLog2); |
+ __ Add(result_, result_, Operand(code_, LSR, kSmiShift - kPointerSizeLog2)); |
__ Ldr(result_, FieldMemOperand(result_, FixedArray::kHeaderSize)); |
__ JumpIfRoot(result_, Heap::kUndefinedValueRootIndex, &slow_case_); |
__ Bind(&exit_); |
@@ -3846,7 +3848,7 @@ void StringHelper::GenerateHashInit(MacroAssembler* masm, |
// hash = character + (character << 10); |
__ LoadRoot(hash, Heap::kHashSeedRootIndex); |
// Untag smi seed and add the character. |
- __ Add(hash, character, Operand::UntagSmi(hash)); |
+ __ Add(hash, character, Operand(hash, LSR, kSmiShift)); |
// Compute hashes modulo 2^32 using a 32-bit W register. |
Register hash_w = hash.W(); |