OLD | NEW |
1 //===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===// | 1 //===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file contains the declarations of the ARMMCAsmInfo properties. | 10 // This file contains the declarations of the ARMMCAsmInfo properties. |
11 // | 11 // |
12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
13 | 13 |
14 #include "ARMMCAsmInfo.h" | 14 #include "ARMMCAsmInfo.h" |
15 #include "llvm/Support/CommandLine.h" | 15 #include "llvm/Support/CommandLine.h" |
16 #include "llvm/ADT/Triple.h" | 16 #include "llvm/ADT/Triple.h" |
17 | 17 |
18 using namespace llvm; | 18 using namespace llvm; |
19 | 19 |
| 20 // @LOCALMOD-BEGIN |
| 21 namespace llvm { |
| 22 cl::opt<bool> |
| 23 EnableARMDwarfEH("arm-enable-dwarf-eh", |
| 24 cl::desc("Use DWARF EH instead of EABI EH on ARM"), |
| 25 cl::init(false)); |
| 26 } |
| 27 // @LOCALMOD-END |
| 28 |
20 void ARMMCAsmInfoDarwin::anchor() { } | 29 void ARMMCAsmInfoDarwin::anchor() { } |
21 | 30 |
22 ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(StringRef TT) { | 31 ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(StringRef TT) { |
23 Triple TheTriple(TT); | 32 Triple TheTriple(TT); |
24 if ((TheTriple.getArch() == Triple::armeb) || | 33 if ((TheTriple.getArch() == Triple::armeb) || |
25 (TheTriple.getArch() == Triple::thumbeb)) | 34 (TheTriple.getArch() == Triple::thumbeb)) |
26 IsLittleEndian = false; | 35 IsLittleEndian = false; |
27 | 36 |
28 Data64bitsDirective = nullptr; | 37 Data64bitsDirective = nullptr; |
29 CommentString = "@"; | 38 CommentString = "@"; |
(...skipping 24 matching lines...) Expand all Loading... |
54 CommentString = "@"; | 63 CommentString = "@"; |
55 Code16Directive = ".code\t16"; | 64 Code16Directive = ".code\t16"; |
56 Code32Directive = ".code\t32"; | 65 Code32Directive = ".code\t32"; |
57 | 66 |
58 HasLEB128 = true; | 67 HasLEB128 = true; |
59 SupportsDebugInformation = true; | 68 SupportsDebugInformation = true; |
60 | 69 |
61 // Exceptions handling | 70 // Exceptions handling |
62 switch (TheTriple.getOS()) { | 71 switch (TheTriple.getOS()) { |
63 case Triple::NetBSD: | 72 case Triple::NetBSD: |
| 73 case Triple::NaCl: // @LOCALMOD: NaCl uses DWARF EH |
64 ExceptionsType = ExceptionHandling::DwarfCFI; | 74 ExceptionsType = ExceptionHandling::DwarfCFI; |
65 break; | 75 break; |
66 default: | 76 default: |
67 ExceptionsType = ExceptionHandling::ARM; | 77 ExceptionsType = ExceptionHandling::ARM; |
68 break; | 78 break; |
69 } | 79 } |
| 80 // @LOCALMOD: NonSFI mode uses DWARF EH |
| 81 if (EnableARMDwarfEH) |
| 82 ExceptionsType = ExceptionHandling::DwarfCFI; |
70 | 83 |
71 // foo(plt) instead of foo@plt | 84 // foo(plt) instead of foo@plt |
72 UseParensForSymbolVariant = true; | 85 UseParensForSymbolVariant = true; |
73 | 86 |
74 UseIntegratedAssembler = true; | 87 UseIntegratedAssembler = true; |
75 } | 88 } |
76 | 89 |
77 void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) { | 90 void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) { |
78 UseIntegratedAssembler = Value; | 91 UseIntegratedAssembler = Value; |
79 if (!UseIntegratedAssembler) { | 92 if (!UseIntegratedAssembler) { |
(...skipping 24 matching lines...) Expand all Loading... |
104 PrivateGlobalPrefix = ".L"; | 117 PrivateGlobalPrefix = ".L"; |
105 | 118 |
106 HasLEB128 = true; | 119 HasLEB128 = true; |
107 SupportsDebugInformation = true; | 120 SupportsDebugInformation = true; |
108 ExceptionsType = ExceptionHandling::None; | 121 ExceptionsType = ExceptionHandling::None; |
109 UseParensForSymbolVariant = true; | 122 UseParensForSymbolVariant = true; |
110 | 123 |
111 UseIntegratedAssembler = false; | 124 UseIntegratedAssembler = false; |
112 DwarfRegNumForCFI = true; | 125 DwarfRegNumForCFI = true; |
113 } | 126 } |
114 | |
OLD | NEW |