14 #ifndef LLVM_TARGET_TARGETCALLINGCONV_H
15 #define LLVM_TARGET_TARGETCALLINGCONV_H
17 #include "llvm/Support/DataTypes.h"
26 static const uint64_t NoFlagSet = 0ULL;
27 static const uint64_t ZExt = 1ULL<<0;
28 static const uint64_t ZExtOffs = 0;
29 static const uint64_t SExt = 1ULL<<1;
30 static const uint64_t SExtOffs = 1;
31 static const uint64_t InReg = 1ULL<<2;
32 static const uint64_t InRegOffs = 2;
33 static const uint64_t SRet = 1ULL<<3;
34 static const uint64_t SRetOffs = 3;
35 static const uint64_t ByVal = 1ULL<<4;
36 static const uint64_t ByValOffs = 4;
37 static const uint64_t Nest = 1ULL<<5;
38 static const uint64_t NestOffs = 5;
39 static const uint64_t Returned = 1ULL<<6;
40 static const uint64_t ReturnedOffs = 6;
41 static const uint64_t ByValAlign = 0xFULL<<7;
42 static const uint64_t ByValAlignOffs = 7;
43 static const uint64_t Split = 1ULL<<11;
44 static const uint64_t SplitOffs = 11;
45 static const uint64_t OrigAlign = 0x1FULL<<27;
46 static const uint64_t OrigAlignOffs = 27;
47 static const uint64_t ByValSize = 0xffffffffULL<<32;
48 static const uint64_t ByValSizeOffs = 32;
50 static const uint64_t One = 1ULL;
56 bool isZExt()
const {
return Flags & ZExt; }
57 void setZExt() { Flags |= One << ZExtOffs; }
59 bool isSExt()
const {
return Flags & SExt; }
60 void setSExt() { Flags |= One << SExtOffs; }
62 bool isInReg()
const {
return Flags & InReg; }
65 bool isSRet()
const {
return Flags & SRet; }
66 void setSRet() { Flags |= One << SRetOffs; }
68 bool isByVal()
const {
return Flags & ByVal; }
71 bool isNest()
const {
return Flags & Nest; }
72 void setNest() { Flags |= One << NestOffs; }
79 ((One << ((Flags & ByValAlign) >> ByValAlignOffs)) / 2);
82 Flags = (Flags & ~ByValAlign) |
83 (uint64_t(
Log2_32(A) + 1) << ByValAlignOffs);
86 bool isSplit()
const {
return Flags & Split; }
91 ((One << ((Flags & OrigAlign) >> OrigAlignOffs)) / 2);
94 Flags = (Flags & ~OrigAlign) |
95 (uint64_t(
Log2_32(A) + 1) << OrigAlignOffs);
99 return (
unsigned)((Flags & ByValSize) >> ByValSizeOffs);
102 Flags = (Flags & ~ByValSize) | (uint64_t(S) << ByValSizeOffs);
129 unsigned origIdx,
unsigned partOffs)
158 unsigned origIdx,
unsigned partOffs)
void setByValAlign(unsigned A)
unsigned getByValSize() const
void setByValSize(unsigned S)
void setOrigAlign(unsigned A)
bool IsFixed
IsFixed - Is this a "fixed" value, ie not passed through a vararg "...".
OutputArg(ArgFlagsTy flags, EVT vt, EVT argvt, bool isfixed, unsigned origIdx, unsigned partOffs)
unsigned getByValAlign() const
unsigned Log2_32(uint32_t Value)
unsigned OrigArgIndex
Index original Function's argument.
uint64_t getRawBits() const
getRawBits - Represent the flags as a bunch of bits.
unsigned getOrigAlign() const