| OLD | NEW |
| 1 //===-- ARMSubtarget.h - Define Subtarget for the ARM ----------*- C++ -*--===// | 1 //===-- ARMSubtarget.h - Define Subtarget for the ARM ----------*- C++ -*--===// |
| 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 declares the ARM specific subclass of TargetSubtargetInfo. | 10 // This file declares the ARM specific subclass of TargetSubtargetInfo. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include <string> | 31 #include <string> |
| 32 | 32 |
| 33 #define GET_SUBTARGETINFO_HEADER | 33 #define GET_SUBTARGETINFO_HEADER |
| 34 #include "ARMGenSubtargetInfo.inc" | 34 #include "ARMGenSubtargetInfo.inc" |
| 35 | 35 |
| 36 namespace llvm { | 36 namespace llvm { |
| 37 class GlobalValue; | 37 class GlobalValue; |
| 38 class StringRef; | 38 class StringRef; |
| 39 class TargetOptions; | 39 class TargetOptions; |
| 40 | 40 |
| 41 extern cl::opt<bool> EnableARMDwarfEH; // @LOCALMOD |
| 42 |
| 41 class ARMSubtarget : public ARMGenSubtargetInfo { | 43 class ARMSubtarget : public ARMGenSubtargetInfo { |
| 42 protected: | 44 protected: |
| 43 enum ARMProcFamilyEnum { | 45 enum ARMProcFamilyEnum { |
| 44 Others, CortexA5, CortexA7, CortexA8, CortexA9, CortexA12, CortexA15, | 46 Others, CortexA5, CortexA7, CortexA8, CortexA9, CortexA12, CortexA15, |
| 45 CortexA17, CortexR5, Swift, CortexA53, CortexA57, Krait, | 47 CortexA17, CortexR5, Swift, CortexA53, CortexA57, Krait, |
| 46 }; | 48 }; |
| 47 enum ARMProcClassEnum { | 49 enum ARMProcClassEnum { |
| 48 None, AClass, RClass, MClass | 50 None, AClass, RClass, MClass |
| 49 }; | 51 }; |
| 50 | 52 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 101 |
| 100 /// HasThumb2 - True if Thumb2 instructions are supported. | 102 /// HasThumb2 - True if Thumb2 instructions are supported. |
| 101 bool HasThumb2; | 103 bool HasThumb2; |
| 102 | 104 |
| 103 /// NoARM - True if subtarget does not support ARM mode execution. | 105 /// NoARM - True if subtarget does not support ARM mode execution. |
| 104 bool NoARM; | 106 bool NoARM; |
| 105 | 107 |
| 106 /// IsR9Reserved - True if R9 is a not available as general purpose register. | 108 /// IsR9Reserved - True if R9 is a not available as general purpose register. |
| 107 bool IsR9Reserved; | 109 bool IsR9Reserved; |
| 108 | 110 |
| 111 // @LOCALMOD-START |
| 112 /// UseInlineJumpTables - True if jump tables should be in-line in the code. |
| 113 bool UseInlineJumpTables; |
| 114 |
| 115 /// UseConstIslands - True if constant islands should be used. |
| 116 bool UseConstIslands; |
| 117 // @LOCALMOD-END |
| 118 |
| 109 /// UseMovt - True if MOVT / MOVW pairs are used for materialization of 32-bit | 119 /// UseMovt - True if MOVT / MOVW pairs are used for materialization of 32-bit |
| 110 /// imms (including global addresses). | 120 /// imms (including global addresses). |
| 111 bool UseMovt; | 121 bool UseMovt; |
| 112 | 122 |
| 113 /// SupportsTailCall - True if the OS supports tail call. The dynamic linker | 123 /// SupportsTailCall - True if the OS supports tail call. The dynamic linker |
| 114 /// must be able to synthesize call stubs for interworking between ARM and | 124 /// must be able to synthesize call stubs for interworking between ARM and |
| 115 /// Thumb. | 125 /// Thumb. |
| 116 bool SupportsTailCall; | 126 bool SupportsTailCall; |
| 117 | 127 |
| 118 /// HasFP16 - True if subtarget supports half-precision FP (We support VFP+HF | 128 /// HasFP16 - True if subtarget supports half-precision FP (We support VFP+HF |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 378 } |
| 369 | 379 |
| 370 // ARM Targets that support EHABI exception handling standard | 380 // ARM Targets that support EHABI exception handling standard |
| 371 // Darwin uses SjLj. Other targets might need more checks. | 381 // Darwin uses SjLj. Other targets might need more checks. |
| 372 bool isTargetEHABICompatible() const { | 382 bool isTargetEHABICompatible() const { |
| 373 return (TargetTriple.getEnvironment() == Triple::EABI || | 383 return (TargetTriple.getEnvironment() == Triple::EABI || |
| 374 TargetTriple.getEnvironment() == Triple::GNUEABI || | 384 TargetTriple.getEnvironment() == Triple::GNUEABI || |
| 375 TargetTriple.getEnvironment() == Triple::EABIHF || | 385 TargetTriple.getEnvironment() == Triple::EABIHF || |
| 376 TargetTriple.getEnvironment() == Triple::GNUEABIHF || | 386 TargetTriple.getEnvironment() == Triple::GNUEABIHF || |
| 377 TargetTriple.getEnvironment() == Triple::Android) && | 387 TargetTriple.getEnvironment() == Triple::Android) && |
| 378 !isTargetDarwin() && !isTargetWindows(); | 388 !isTargetDarwin() && !isTargetWindows() && |
| 389 !isTargetNaCl() && !EnableARMDwarfEH; // @LOCALMOD |
| 379 } | 390 } |
| 380 | 391 |
| 381 bool isTargetHardFloat() const { | 392 bool isTargetHardFloat() const { |
| 382 // FIXME: this is invalid for WindowsCE | 393 // FIXME: this is invalid for WindowsCE |
| 383 return TargetTriple.getEnvironment() == Triple::GNUEABIHF || | 394 return TargetTriple.getEnvironment() == Triple::GNUEABIHF || |
| 384 TargetTriple.getEnvironment() == Triple::EABIHF || | 395 TargetTriple.getEnvironment() == Triple::EABIHF || |
| 385 isTargetWindows(); | 396 isTargetWindows(); |
| 386 } | 397 } |
| 387 bool isTargetAndroid() const { | 398 bool isTargetAndroid() const { |
| 388 return TargetTriple.getEnvironment() == Triple::Android; | 399 return TargetTriple.getEnvironment() == Triple::Android; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 408 bool isV6M() const { | 419 bool isV6M() const { |
| 409 return isThumb1Only() && isMClass(); | 420 return isThumb1Only() && isMClass(); |
| 410 } | 421 } |
| 411 | 422 |
| 412 bool isR9Reserved() const { return IsR9Reserved; } | 423 bool isR9Reserved() const { return IsR9Reserved; } |
| 413 | 424 |
| 414 bool useMovt(const MachineFunction &MF) const; | 425 bool useMovt(const MachineFunction &MF) const; |
| 415 | 426 |
| 416 bool supportsTailCall() const { return SupportsTailCall; } | 427 bool supportsTailCall() const { return SupportsTailCall; } |
| 417 | 428 |
| 429 // @LOCALMOD |
| 430 bool useConstIslands() const { return UseConstIslands; } |
| 431 |
| 418 bool allowsUnalignedMem() const { return AllowsUnalignedMem; } | 432 bool allowsUnalignedMem() const { return AllowsUnalignedMem; } |
| 419 | 433 |
| 420 bool restrictIT() const { return RestrictIT; } | 434 bool restrictIT() const { return RestrictIT; } |
| 421 | 435 |
| 422 const std::string & getCPUString() const { return CPUString; } | 436 const std::string & getCPUString() const { return CPUString; } |
| 423 | 437 |
| 424 bool isLittle() const { return IsLittle; } | 438 bool isLittle() const { return IsLittle; } |
| 425 | 439 |
| 426 unsigned getMispredictionPenalty() const; | 440 unsigned getMispredictionPenalty() const; |
| 427 | 441 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 443 | 457 |
| 444 /// getStackAlignment - Returns the minimum alignment known to hold of the | 458 /// getStackAlignment - Returns the minimum alignment known to hold of the |
| 445 /// stack frame on entry to the function and which must be maintained by every | 459 /// stack frame on entry to the function and which must be maintained by every |
| 446 /// function for this subtarget. | 460 /// function for this subtarget. |
| 447 unsigned getStackAlignment() const { return stackAlignment; } | 461 unsigned getStackAlignment() const { return stackAlignment; } |
| 448 | 462 |
| 449 /// GVIsIndirectSymbol - true if the GV will be accessed via an indirect | 463 /// GVIsIndirectSymbol - true if the GV will be accessed via an indirect |
| 450 /// symbol. | 464 /// symbol. |
| 451 bool GVIsIndirectSymbol(const GlobalValue *GV, Reloc::Model RelocM) const; | 465 bool GVIsIndirectSymbol(const GlobalValue *GV, Reloc::Model RelocM) const; |
| 452 | 466 |
| 467 bool useInlineJumpTables() const {return UseInlineJumpTables;} // @LOCALMOD |
| 453 }; | 468 }; |
| 454 } // End llvm namespace | 469 } // End llvm namespace |
| 455 | 470 |
| 456 #endif // ARMSUBTARGET_H | 471 #endif // ARMSUBTARGET_H |
| OLD | NEW |