| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/snapshot.h" | 5 #include "vm/snapshot.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 assembly_stream_.Print(".fnstart\n"); | 985 assembly_stream_.Print(".fnstart\n"); |
| 986 assembly_stream_.Print(".save {r7, lr}\n"); | 986 assembly_stream_.Print(".save {r7, lr}\n"); |
| 987 assembly_stream_.Print(".setfp r7, sp, #0\n"); | 987 assembly_stream_.Print(".setfp r7, sp, #0\n"); |
| 988 #else | 988 #else |
| 989 COMPILE_ASSERT(FP == R11); | 989 COMPILE_ASSERT(FP == R11); |
| 990 assembly_stream_.Print(".fnstart\n"); | 990 assembly_stream_.Print(".fnstart\n"); |
| 991 assembly_stream_.Print(".save {r11, lr}\n"); | 991 assembly_stream_.Print(".save {r11, lr}\n"); |
| 992 assembly_stream_.Print(".setfp r11, sp, #0\n"); | 992 assembly_stream_.Print(".setfp r11, sp, #0\n"); |
| 993 #endif | 993 #endif |
| 994 | 994 |
| 995 #elif defined(TARGET_ARCH_MIPS) | |
| 996 COMPILE_ASSERT(FP == R30); | |
| 997 COMPILE_ASSERT(RA == R31); | |
| 998 assembly_stream_.Print(".cfi_def_cfa r30, 0\n"); // CFA is fp+0 | |
| 999 assembly_stream_.Print(".cfi_offset r30, 0\n"); // saved fp is *(CFA+0) | |
| 1000 assembly_stream_.Print(".cfi_offset r31, 4\n"); // saved pc is *(CFA+4) | |
| 1001 // saved sp is CFA+16 | |
| 1002 // Should be ".cfi_value_offset sp, 8", but requires gcc newer than late | |
| 1003 // 2016 and not supported by Android's libunwind. | |
| 1004 // DW_CFA_expression 0x10 | |
| 1005 // uleb128 register (sp) 29 | |
| 1006 // uleb128 size of operation 2 | |
| 1007 // DW_OP_plus_uconst 0x23 | |
| 1008 // uleb128 addend 8 | |
| 1009 assembly_stream_.Print(".cfi_escape 0x10, 29, 2, 0x23, 8\n"); | |
| 1010 #endif | 995 #endif |
| 1011 } | 996 } |
| 1012 | 997 |
| 1013 | 998 |
| 1014 void AssemblyImageWriter::FrameUnwindEpilogue() { | 999 void AssemblyImageWriter::FrameUnwindEpilogue() { |
| 1015 #if defined(TARGET_ARCH_ARM) | 1000 #if defined(TARGET_ARCH_ARM) |
| 1016 assembly_stream_.Print(".fnend\n"); | 1001 assembly_stream_.Print(".fnend\n"); |
| 1017 #endif | 1002 #endif |
| 1018 assembly_stream_.Print(".cfi_endproc\n"); | 1003 assembly_stream_.Print(".cfi_endproc\n"); |
| 1019 } | 1004 } |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2066 *buffer_len_ = BytesWritten(); | 2051 *buffer_len_ = BytesWritten(); |
| 2067 } | 2052 } |
| 2068 } else { | 2053 } else { |
| 2069 FreeBuffer(); | 2054 FreeBuffer(); |
| 2070 ThrowException(exception_type(), exception_msg()); | 2055 ThrowException(exception_type(), exception_msg()); |
| 2071 } | 2056 } |
| 2072 } | 2057 } |
| 2073 | 2058 |
| 2074 | 2059 |
| 2075 } // namespace dart | 2060 } // namespace dart |
| OLD | NEW |