Index: src/compiler/arm64/code-generator-arm64.cc |
diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc |
index 1559c8062973c7db726f3b644a189fed9d22f622..fa3a04e55f285aee9d658f2dedeeff16457d6d27 100644 |
--- a/src/compiler/arm64/code-generator-arm64.cc |
+++ b/src/compiler/arm64/code-generator-arm64.cc |
@@ -302,6 +302,20 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { |
} while (0) |
+#define ASSEMBLE_CHECKED_LOAD_INTEGER_64(asm_instr) \ |
+ do { \ |
+ auto result = i.OutputRegister(); \ |
+ auto buffer = i.InputRegister(0); \ |
+ auto offset = i.InputRegister32(1); \ |
+ auto length = i.InputOperand32(2); \ |
+ __ Cmp(offset, length); \ |
+ auto ool = new (zone()) OutOfLineLoadZero(this, result); \ |
+ __ B(hs, ool->entry()); \ |
+ __ asm_instr(result, MemOperand(buffer, offset, UXTW)); \ |
+ __ Bind(ool->exit()); \ |
+ } while (0) |
+ |
+ |
#define ASSEMBLE_CHECKED_STORE_FLOAT(width) \ |
do { \ |
auto buffer = i.InputRegister(0); \ |
@@ -330,6 +344,20 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { |
} while (0) |
+#define ASSEMBLE_CHECKED_STORE_INTEGER_64(asm_instr) \ |
+ do { \ |
+ auto buffer = i.InputRegister(0); \ |
+ auto offset = i.InputRegister32(1); \ |
+ auto length = i.InputOperand32(2); \ |
+ auto value = i.InputRegister(3); \ |
+ __ Cmp(offset, length); \ |
+ Label done; \ |
+ __ B(hs, &done); \ |
+ __ asm_instr(value, MemOperand(buffer, offset, UXTW)); \ |
+ __ Bind(&done); \ |
+ } while (0) |
+ |
+ |
#define ASSEMBLE_SHIFT(asm_instr, width) \ |
do { \ |
if (instr->InputAt(1)->IsRegister()) { \ |
@@ -942,6 +970,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
case kCheckedLoadWord32: |
ASSEMBLE_CHECKED_LOAD_INTEGER(Ldr); |
break; |
+ case kCheckedLoadWord64: |
+ ASSEMBLE_CHECKED_LOAD_INTEGER_64(Ldr); |
+ break; |
case kCheckedLoadFloat32: |
ASSEMBLE_CHECKED_LOAD_FLOAT(32); |
break; |
@@ -957,6 +988,9 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
case kCheckedStoreWord32: |
ASSEMBLE_CHECKED_STORE_INTEGER(Str); |
break; |
+ case kCheckedStoreWord64: |
+ ASSEMBLE_CHECKED_STORE_INTEGER_64(Str); |
+ break; |
case kCheckedStoreFloat32: |
ASSEMBLE_CHECKED_STORE_FLOAT(32); |
break; |