14 #ifndef LLVM_TARGET_TARGETCALLINGCONV_H
15 #define LLVM_TARGET_TARGETCALLINGCONV_H
18 #include "llvm/Support/DataTypes.h"
27 static const uint64_t NoFlagSet = 0ULL;
28 static const uint64_t ZExt = 1ULL<<0;
29 static const uint64_t ZExtOffs = 0;
30 static const uint64_t SExt = 1ULL<<1;
31 static const uint64_t SExtOffs = 1;
32 static const uint64_t InReg = 1ULL<<2;
33 static const uint64_t InRegOffs = 2;
34 static const uint64_t SRet = 1ULL<<3;
35 static const uint64_t SRetOffs = 3;
36 static const uint64_t ByVal = 1ULL<<4;
37 static const uint64_t ByValOffs = 4;
38 static const uint64_t Nest = 1ULL<<5;
39 static const uint64_t NestOffs = 5;
40 static const uint64_t Returned = 1ULL<<6;
41 static const uint64_t ReturnedOffs = 6;
42 static const uint64_t ByValAlign = 0xFULL<<7;
43 static const uint64_t ByValAlignOffs = 7;
44 static const uint64_t Split = 1ULL<<11;
45 static const uint64_t SplitOffs = 11;
46 static const uint64_t InAlloca = 1ULL<<12;
47 static const uint64_t InAllocaOffs = 12;
48 static const uint64_t SplitEnd = 1ULL<<13;
49 static const uint64_t SplitEndOffs = 13;
50 static const uint64_t SwiftSelf = 1ULL<<14;
51 static const uint64_t SwiftSelfOffs = 14;
52 static const uint64_t SwiftError = 1ULL<<15;
53 static const uint64_t SwiftErrorOffs = 15;
54 static const uint64_t Hva = 1ULL << 16;
56 static const uint64_t HvaOffs = 16;
57 static const uint64_t HvaStart = 1ULL << 17;
59 static const uint64_t HvaStartOffs = 17;
60 static const uint64_t SecArgPass = 1ULL << 18;
62 static const uint64_t SecArgPassOffs = 18;
63 static const uint64_t OrigAlign = 0x1FULL<<27;
64 static const uint64_t OrigAlignOffs = 27;
65 static const uint64_t ByValSize = 0x3fffffffULL<<32;
66 static const uint64_t ByValSizeOffs = 32;
67 static const uint64_t InConsecutiveRegsLast = 0x1ULL<<62;
68 static const uint64_t InConsecutiveRegsLastOffs = 62;
69 static const uint64_t InConsecutiveRegs = 0x1ULL<<63;
70 static const uint64_t InConsecutiveRegsOffs = 63;
72 static const uint64_t One = 1ULL;
79 bool isZExt()
const {
return Flags & ZExt; }
80 void setZExt() { Flags |= One << ZExtOffs; }
82 bool isSExt()
const {
return Flags & SExt; }
83 void setSExt() { Flags |= One << SExtOffs; }
85 bool isInReg()
const {
return Flags & InReg; }
88 bool isSRet()
const {
return Flags & SRet; }
89 void setSRet() { Flags |= One << SRetOffs; }
91 bool isByVal()
const {
return Flags & ByVal; }
103 bool isHva()
const {
return Flags & Hva; }
104 void setHva() { Flags |= One << HvaOffs; }
112 bool isNest()
const {
return Flags & Nest; }
126 ((One << ((Flags & ByValAlign) >> ByValAlignOffs)) / 2);
129 Flags = (Flags & ~ByValAlign) |
130 (uint64_t(
Log2_32(A) + 1) << ByValAlignOffs);
133 bool isSplit()
const {
return Flags & Split; }
141 ((One << ((Flags & OrigAlign) >> OrigAlignOffs)) / 2);
144 Flags = (Flags & ~OrigAlign) |
145 (uint64_t(
Log2_32(A) + 1) << OrigAlignOffs);
149 return (
unsigned)((Flags & ByValSize) >> ByValSizeOffs);
152 Flags = (Flags & ~ByValSize) | (uint64_t(S) << ByValSizeOffs);
181 unsigned origIdx,
unsigned partOffs)
219 unsigned origIdx,
unsigned partOffs)
230 #endif // LLVM_TARGET_TARGETCALLINGCONV_H
void setByValAlign(unsigned A)
bool isSwiftError() const
unsigned getByValSize() const
void setInConsecutiveRegs()
void setInConsecutiveRegsLast()
bool isSecArgPass() const
void setByValSize(unsigned S)
OutputArg - This struct carries flags and a value for a single outgoing (actual) argument or outgoing...
bool isInConsecutiveRegs() const
Function Alias Analysis false
bool isInConsecutiveRegsLast() const
void setOrigAlign(unsigned A)
bool IsFixed
IsFixed - Is this a "fixed" value, ie not passed through a vararg "...".
MVT - Machine Value Type.
OutputArg(ArgFlagsTy flags, EVT vt, EVT argvt, bool isfixed, unsigned origIdx, unsigned partOffs)
EVT - Extended Value Type.
unsigned getByValAlign() const
unsigned Log2_32(uint32_t Value)
Log2_32 - This function returns the floor log base 2 of the specified value, -1 if the value is zero...
unsigned OrigArgIndex
Index original Function's argument.
uint64_t getRawBits() const
getRawBits - Represent the flags as a bunch of bits.
unsigned PartOffset
Offset in bytes of current output value relative to the beginning of original argument.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getOrigAlign() const
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
MVT getSimpleVT() const
getSimpleVT - Return the SimpleValueType held in the specified simple EVT.