| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 Register temp = scope.AcquireX(); | 413 Register temp = scope.AcquireX(); |
| 414 __ Ldr(temp, FieldMemOperand(func, JSFunction::kContextOffset)); | 414 __ Ldr(temp, FieldMemOperand(func, JSFunction::kContextOffset)); |
| 415 __ cmp(cp, temp); | 415 __ cmp(cp, temp); |
| 416 __ Assert(eq, kWrongFunctionContext); | 416 __ Assert(eq, kWrongFunctionContext); |
| 417 } | 417 } |
| 418 AssembleDeconstructActivationRecord(); | 418 AssembleDeconstructActivationRecord(); |
| 419 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); | 419 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); |
| 420 __ Jump(x10); | 420 __ Jump(x10); |
| 421 break; | 421 break; |
| 422 } | 422 } |
| 423 case kArchPrepareCallCFunction: |
| 424 // We don't need kArchPrepareCallCFunction on arm64 as the instruction |
| 425 // selector already perform a Claim to reserve space on the stack and |
| 426 // guarantee correct alignment of stack pointer. |
| 427 UNREACHABLE(); |
| 428 break; |
| 429 case kArchCallCFunction: { |
| 430 int const num_parameters = MiscField::decode(instr->opcode()); |
| 431 Register func = i.InputRegister(0); |
| 432 __ CallCFunction(func, num_parameters, 0); |
| 433 break; |
| 434 } |
| 423 case kArchJmp: | 435 case kArchJmp: |
| 424 AssembleArchJump(i.InputRpo(0)); | 436 AssembleArchJump(i.InputRpo(0)); |
| 425 break; | 437 break; |
| 426 case kArchTableSwitch: | 438 case kArchTableSwitch: |
| 427 AssembleArchTableSwitch(instr); | 439 AssembleArchTableSwitch(instr); |
| 428 break; | 440 break; |
| 429 case kArchLookupSwitch: | 441 case kArchLookupSwitch: |
| 430 AssembleArchLookupSwitch(instr); | 442 AssembleArchLookupSwitch(instr); |
| 431 break; | 443 break; |
| 432 case kArchNop: | 444 case kArchNop: |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 } | 1341 } |
| 1330 } | 1342 } |
| 1331 } | 1343 } |
| 1332 } | 1344 } |
| 1333 | 1345 |
| 1334 #undef __ | 1346 #undef __ |
| 1335 | 1347 |
| 1336 } // namespace compiler | 1348 } // namespace compiler |
| 1337 } // namespace internal | 1349 } // namespace internal |
| 1338 } // namespace v8 | 1350 } // namespace v8 |
| OLD | NEW |