LLVM: lib/Target/CSKY/CSKYSubtarget.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

15

16using namespace llvm;

17

18#define DEBUG_TYPE "csky-subtarget"

19#define GET_SUBTARGETINFO_TARGET_DESC

20#define GET_SUBTARGETINFO_CTOR

21#include "CSKYGenSubtargetInfo.inc"

22

23void CSKYSubtarget::anchor() {}

24

27

28 if (CPUName.empty())

29 CPUName = "generic";

30 if (TuneCPUName.empty())

31 TuneCPUName = CPUName;

32

33 UseHardFloat = false;

34 UseHardFloatABI = false;

35 HasFPUv2SingleFloat = false;

36 HasFPUv2DoubleFloat = false;

37 HasFPUv3HalfWord = false;

38 HasFPUv3HalfFloat = false;

39 HasFPUv3SingleFloat = false;

40 HasFPUv3DoubleFloat = false;

41 HasFdivdu = false;

42 HasFLOATE1 = false;

43 HasFLOAT1E2 = false;

44 HasFLOAT1E3 = false;

45 HasFLOAT3E4 = false;

46 HasFLOAT7E60 = false;

47 HasExtendLrw = false;

48 HasBTST16 = false;

49 HasTrust = false;

50 HasJAVA = false;

51 HasCache = false;

52 HasNVIC = false;

53 HasDSP = false;

54 HasDSP1E2 = false;

55 HasDSPE60 = false;

56 HasDSPV2 = false;

57 HasDSP_Silan = false;

58 HasDoloop = false;

59 HasHardwareDivide = false;

60 HasHighRegisters = false;

61 HasVDSPV2 = false;

62 HasVDSP2E3 = false;

63 HasVDSP2E60F = false;

64 ReadTPHard = false;

65 HasVDSPV1_128 = false;

66 UseCCRT = false;

67 DumpConstPool = false;

68 EnableInterruptAttribute = false;

69 HasPushPop = false;

70 HasSTM = false;

71 SmartMode = false;

72 EnableStackSize = false;

73

74 HasE1 = false;

75 HasE2 = false;

76 Has2E3 = false;

77 HasMP = false;

78 Has3E3r1 = false;

79 Has3r1E3r2 = false;

80 Has3r2E3r3 = false;

81 Has3E7 = false;

82 HasMP1E2 = false;

83 Has7E10 = false;

84 Has10E60 = false;

85

87 return *this;

88}

89

93 FrameLowering(initializeSubtargetDependencies(TT, CPU, TuneCPU, FS)),

94 InstrInfo(*this), RegInfo(), TLInfo(TM, *this) {}

95

98

100 return UseHardFloatABI;

101 else

103}

CSKYSubtarget & initializeSubtargetDependencies(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS)

Initializes using the passed in CPU and feature strings so that we can use initializer lists for subt...

void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)

bool useHardFloatABI() const

CSKYSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, const TargetMachine &TM)

const CSKYTargetLowering * getTargetLowering() const override

StringRef - Represent a constant reference to a string, i.e.

constexpr bool empty() const

empty - Check if the string is empty.

const TargetMachine & getTargetMachine() const

Primary interface to the complete machine description for the target machine.

FloatABI::ABIType FloatABIType

FloatABIType - This setting is set by -float-abi=xxx option is specfied on the command line.

Triple - Helper class for working with autoconf configuration names.

This is an optimization pass for GlobalISel generic memory operations.