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 23 matching lines...) Expand all Loading... |
53 Data64bitsDirective = nullptr; | 62 Data64bitsDirective = nullptr; |
54 CommentString = "@"; | 63 CommentString = "@"; |
55 Code16Directive = ".code\t16"; | 64 Code16Directive = ".code\t16"; |
56 Code32Directive = ".code\t32"; | 65 Code32Directive = ".code\t32"; |
57 | 66 |
58 SupportsDebugInformation = true; | 67 SupportsDebugInformation = true; |
59 | 68 |
60 // Exceptions handling | 69 // Exceptions handling |
61 switch (TheTriple.getOS()) { | 70 switch (TheTriple.getOS()) { |
62 case Triple::NetBSD: | 71 case Triple::NetBSD: |
| 72 case Triple::NaCl: // @LOCALMOD: NaCl uses DWARF EH |
63 ExceptionsType = ExceptionHandling::DwarfCFI; | 73 ExceptionsType = ExceptionHandling::DwarfCFI; |
64 break; | 74 break; |
65 default: | 75 default: |
66 ExceptionsType = ExceptionHandling::ARM; | 76 ExceptionsType = ExceptionHandling::ARM; |
67 break; | 77 break; |
68 } | 78 } |
| 79 // @LOCALMOD: NonSFI mode uses DWARF EH |
| 80 if (EnableARMDwarfEH) |
| 81 ExceptionsType = ExceptionHandling::DwarfCFI; |
69 | 82 |
70 // foo(plt) instead of foo@plt | 83 // foo(plt) instead of foo@plt |
71 UseParensForSymbolVariant = true; | 84 UseParensForSymbolVariant = true; |
72 | 85 |
73 UseIntegratedAssembler = true; | 86 UseIntegratedAssembler = true; |
74 } | 87 } |
75 | 88 |
76 void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) { | 89 void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) { |
77 UseIntegratedAssembler = Value; | 90 UseIntegratedAssembler = Value; |
78 if (!UseIntegratedAssembler) { | 91 if (!UseIntegratedAssembler) { |
(...skipping 23 matching lines...) Expand all Loading... |
102 Code32Directive = ".code\t32"; | 115 Code32Directive = ".code\t32"; |
103 PrivateGlobalPrefix = ".L"; | 116 PrivateGlobalPrefix = ".L"; |
104 | 117 |
105 SupportsDebugInformation = true; | 118 SupportsDebugInformation = true; |
106 ExceptionsType = ExceptionHandling::None; | 119 ExceptionsType = ExceptionHandling::None; |
107 UseParensForSymbolVariant = true; | 120 UseParensForSymbolVariant = true; |
108 | 121 |
109 UseIntegratedAssembler = false; | 122 UseIntegratedAssembler = false; |
110 DwarfRegNumForCFI = true; | 123 DwarfRegNumForCFI = true; |
111 } | 124 } |
112 | |
OLD | NEW |