OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 | 1867 |
1868 | 1868 |
1869 // Jump to the error handler. | 1869 // Jump to the error handler. |
1870 // TOS + 0: return address | 1870 // TOS + 0: return address |
1871 // RDI: program_counter | 1871 // RDI: program_counter |
1872 // RSI: stack_pointer | 1872 // RSI: stack_pointer |
1873 // RDX: frame_pointer | 1873 // RDX: frame_pointer |
1874 // RCX: error object | 1874 // RCX: error object |
1875 // No Result. | 1875 // No Result. |
1876 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { | 1876 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { |
| 1877 ASSERT(kExceptionObjectReg == RAX); |
1877 __ movq(RAX, RCX); // error object. | 1878 __ movq(RAX, RCX); // error object. |
1878 __ movq(RBP, RDX); // target frame_pointer. | 1879 __ movq(RBP, RDX); // target frame_pointer. |
1879 __ movq(RSP, RSI); // target stack_pointer. | 1880 __ movq(RSP, RSI); // target stack_pointer. |
1880 __ jmp(RDI); // Jump to the exception handler code. | 1881 __ jmp(RDI); // Jump to the exception handler code. |
1881 } | 1882 } |
1882 | 1883 |
1883 | 1884 |
1884 // Implements equality operator when one of the arguments is null | 1885 // Implements equality operator when one of the arguments is null |
1885 // (identity check) and updates ICData if necessary. | 1886 // (identity check) and updates ICData if necessary. |
1886 // TOS + 0: return address | 1887 // TOS + 0: return address |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 __ cmpq(left, right); | 2073 __ cmpq(left, right); |
2073 __ Bind(&done); | 2074 __ Bind(&done); |
2074 __ popq(right); | 2075 __ popq(right); |
2075 __ popq(left); | 2076 __ popq(left); |
2076 __ ret(); | 2077 __ ret(); |
2077 } | 2078 } |
2078 | 2079 |
2079 } // namespace dart | 2080 } // namespace dart |
2080 | 2081 |
2081 #endif // defined TARGET_ARCH_X64 | 2082 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |