Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp

Issue 738143002: Add flag to enable Dwarf exception handling on ARM (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@merge_35
Patch Set: also !isTargetEHABICompatible for SFI NaCl Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- ARMMCTargetDesc.cpp - ARM Target Descriptions ---------------------===// 1 //===-- ARMMCTargetDesc.cpp - ARM Target Descriptions ---------------------===//
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 provides ARM specific target descriptions. 10 // This file provides ARM specific target descriptions.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #include "ARMMCTargetDesc.h"
15 #include "ARMBaseInfo.h" 14 #include "ARMBaseInfo.h"
16 #include "ARMMCAsmInfo.h" 15 #include "ARMMCAsmInfo.h"
17 #include "ARMMCTargetDesc.h" 16 #include "ARMMCTargetDesc.h"
18 #include "InstPrinter/ARMInstPrinter.h" 17 #include "InstPrinter/ARMInstPrinter.h"
19 #include "llvm/ADT/Triple.h" 18 #include "llvm/ADT/Triple.h"
20 #include "llvm/MC/MCCodeGenInfo.h" 19 #include "llvm/MC/MCCodeGenInfo.h"
21 #include "llvm/MC/MCELFStreamer.h" 20 #include "llvm/MC/MCELFStreamer.h"
22 #include "llvm/MC/MCInstrAnalysis.h" 21 #include "llvm/MC/MCInstrAnalysis.h"
23 #include "llvm/MC/MCInstrInfo.h" 22 #include "llvm/MC/MCInstrInfo.h"
24 #include "llvm/MC/MCRegisterInfo.h" 23 #include "llvm/MC/MCRegisterInfo.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 case llvm::Triple::MSVC: 229 case llvm::Triple::MSVC:
231 MAI = new ARMCOFFMCAsmInfoMicrosoft(); 230 MAI = new ARMCOFFMCAsmInfoMicrosoft();
232 break; 231 break;
233 default: 232 default:
234 llvm_unreachable("invalid environment"); 233 llvm_unreachable("invalid environment");
235 } 234 }
236 break; 235 break;
237 default: 236 default:
238 if (TheTriple.isOSBinFormatMachO()) 237 if (TheTriple.isOSBinFormatMachO())
239 MAI = new ARMMCAsmInfoDarwin(TT); 238 MAI = new ARMMCAsmInfoDarwin(TT);
240 // @LOCALMOD-BEGIN 239 else
241 else { 240 MAI = new ARMELFMCAsmInfo(TT);
242 ARMELFMCAsmInfo *AEMAI = new ARMELFMCAsmInfo(TT);
243 if (TheTriple.isOSNaCl())
244 // NativeClient uses Dwarf exception handling
245 AEMAI->setExceptionsType(ExceptionHandling::DwarfCFI);
246 MAI = AEMAI;
247 }
248 // @LOCALMOD-END
249 break; 241 break;
250 } 242 }
251 243
252 unsigned Reg = MRI.getDwarfRegNum(ARM::SP, true); 244 unsigned Reg = MRI.getDwarfRegNum(ARM::SP, true);
253 MAI->addInitialFrameState(MCCFIInstruction::createDefCfa(nullptr, Reg, 0)); 245 MAI->addInitialFrameState(MCCFIInstruction::createDefCfa(nullptr, Reg, 0));
254 246
255 return MAI; 247 return MAI;
256 } 248 }
257 249
258 static MCCodeGenInfo *createARMMCCodeGenInfo(StringRef TT, Reloc::Model RM, 250 static MCCodeGenInfo *createARMMCCodeGenInfo(StringRef TT, Reloc::Model RM,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // Register the MC relocation info. 438 // Register the MC relocation info.
447 TargetRegistry::RegisterMCRelocationInfo(TheARMLETarget, 439 TargetRegistry::RegisterMCRelocationInfo(TheARMLETarget,
448 createARMMCRelocationInfo); 440 createARMMCRelocationInfo);
449 TargetRegistry::RegisterMCRelocationInfo(TheARMBETarget, 441 TargetRegistry::RegisterMCRelocationInfo(TheARMBETarget,
450 createARMMCRelocationInfo); 442 createARMMCRelocationInfo);
451 TargetRegistry::RegisterMCRelocationInfo(TheThumbLETarget, 443 TargetRegistry::RegisterMCRelocationInfo(TheThumbLETarget,
452 createARMMCRelocationInfo); 444 createARMMCRelocationInfo);
453 TargetRegistry::RegisterMCRelocationInfo(TheThumbBETarget, 445 TargetRegistry::RegisterMCRelocationInfo(TheThumbBETarget,
454 createARMMCRelocationInfo); 446 createARMMCRelocationInfo);
455 } 447 }
OLDNEW
« no previous file with comments | « lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698