| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <cmath> | 6 #include <cmath> |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #if V8_TARGET_ARCH_ARM64 | 10 #if V8_TARGET_ARCH_ARM64 |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 DCHECK_EQ(current->type(), type); | 483 DCHECK_EQ(current->type(), type); |
| 484 return current; | 484 return current; |
| 485 } | 485 } |
| 486 } | 486 } |
| 487 return new Redirection(external_function, type); | 487 return new Redirection(external_function, type); |
| 488 } | 488 } |
| 489 | 489 |
| 490 static Redirection* FromHltInstruction(Instruction* redirect_call) { | 490 static Redirection* FromHltInstruction(Instruction* redirect_call) { |
| 491 char* addr_of_hlt = reinterpret_cast<char*>(redirect_call); | 491 char* addr_of_hlt = reinterpret_cast<char*>(redirect_call); |
| 492 char* addr_of_redirection = | 492 char* addr_of_redirection = |
| 493 addr_of_hlt - OFFSET_OF(Redirection, redirect_call_); | 493 addr_of_hlt - offsetof(Redirection, redirect_call_); |
| 494 return reinterpret_cast<Redirection*>(addr_of_redirection); | 494 return reinterpret_cast<Redirection*>(addr_of_redirection); |
| 495 } | 495 } |
| 496 | 496 |
| 497 static void* ReverseRedirection(int64_t reg) { | 497 static void* ReverseRedirection(int64_t reg) { |
| 498 Redirection* redirection = | 498 Redirection* redirection = |
| 499 FromHltInstruction(reinterpret_cast<Instruction*>(reg)); | 499 FromHltInstruction(reinterpret_cast<Instruction*>(reg)); |
| 500 return redirection->external_function<void*>(); | 500 return redirection->external_function<void*>(); |
| 501 } | 501 } |
| 502 | 502 |
| 503 static void DeleteChain(Redirection* redirection) { | 503 static void DeleteChain(Redirection* redirection) { |
| (...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3834 delete[] format; | 3834 delete[] format; |
| 3835 } | 3835 } |
| 3836 | 3836 |
| 3837 | 3837 |
| 3838 #endif // USE_SIMULATOR | 3838 #endif // USE_SIMULATOR |
| 3839 | 3839 |
| 3840 } // namespace internal | 3840 } // namespace internal |
| 3841 } // namespace v8 | 3841 } // namespace v8 |
| 3842 | 3842 |
| 3843 #endif // V8_TARGET_ARCH_ARM64 | 3843 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |