Mercurial > hg > CbC > CbC_llvm
comparison include/llvm/Target/TargetCallingConv.h @ 77:54457678186b LLVM3.6
LLVM 3.6
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Sep 2014 22:06:00 +0900 |
parents | 95c75e76d11b |
children | 60c9769439b8 |
comparison
equal
deleted
inserted
replaced
34:e874dbf0ad9d | 77:54457678186b |
---|---|
12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
13 | 13 |
14 #ifndef LLVM_TARGET_TARGETCALLINGCONV_H | 14 #ifndef LLVM_TARGET_TARGETCALLINGCONV_H |
15 #define LLVM_TARGET_TARGETCALLINGCONV_H | 15 #define LLVM_TARGET_TARGETCALLINGCONV_H |
16 | 16 |
17 #include "llvm/CodeGen/ValueTypes.h" | |
17 #include "llvm/Support/DataTypes.h" | 18 #include "llvm/Support/DataTypes.h" |
18 #include "llvm/Support/MathExtras.h" | 19 #include "llvm/Support/MathExtras.h" |
19 #include <string> | 20 #include <string> |
20 | 21 |
21 namespace llvm { | 22 namespace llvm { |
40 static const uint64_t ReturnedOffs = 6; | 41 static const uint64_t ReturnedOffs = 6; |
41 static const uint64_t ByValAlign = 0xFULL<<7; ///< Struct alignment | 42 static const uint64_t ByValAlign = 0xFULL<<7; ///< Struct alignment |
42 static const uint64_t ByValAlignOffs = 7; | 43 static const uint64_t ByValAlignOffs = 7; |
43 static const uint64_t Split = 1ULL<<11; | 44 static const uint64_t Split = 1ULL<<11; |
44 static const uint64_t SplitOffs = 11; | 45 static const uint64_t SplitOffs = 11; |
46 static const uint64_t InAlloca = 1ULL<<12; ///< Passed with inalloca | |
47 static const uint64_t InAllocaOffs = 12; | |
45 static const uint64_t OrigAlign = 0x1FULL<<27; | 48 static const uint64_t OrigAlign = 0x1FULL<<27; |
46 static const uint64_t OrigAlignOffs = 27; | 49 static const uint64_t OrigAlignOffs = 27; |
47 static const uint64_t ByValSize = 0xffffffffULL<<32; ///< Struct size | 50 static const uint64_t ByValSize = 0x3fffffffULL<<32; ///< Struct size |
48 static const uint64_t ByValSizeOffs = 32; | 51 static const uint64_t ByValSizeOffs = 32; |
52 static const uint64_t InConsecutiveRegsLast = 0x1ULL<<62; ///< Struct size | |
53 static const uint64_t InConsecutiveRegsLastOffs = 62; | |
54 static const uint64_t InConsecutiveRegs = 0x1ULL<<63; ///< Struct size | |
55 static const uint64_t InConsecutiveRegsOffs = 63; | |
49 | 56 |
50 static const uint64_t One = 1ULL; ///< 1 of this type, for shifts | 57 static const uint64_t One = 1ULL; ///< 1 of this type, for shifts |
51 | 58 |
52 uint64_t Flags; | 59 uint64_t Flags; |
53 public: | 60 public: |
66 void setSRet() { Flags |= One << SRetOffs; } | 73 void setSRet() { Flags |= One << SRetOffs; } |
67 | 74 |
68 bool isByVal() const { return Flags & ByVal; } | 75 bool isByVal() const { return Flags & ByVal; } |
69 void setByVal() { Flags |= One << ByValOffs; } | 76 void setByVal() { Flags |= One << ByValOffs; } |
70 | 77 |
78 bool isInAlloca() const { return Flags & InAlloca; } | |
79 void setInAlloca() { Flags |= One << InAllocaOffs; } | |
80 | |
71 bool isNest() const { return Flags & Nest; } | 81 bool isNest() const { return Flags & Nest; } |
72 void setNest() { Flags |= One << NestOffs; } | 82 void setNest() { Flags |= One << NestOffs; } |
73 | 83 |
74 bool isReturned() const { return Flags & Returned; } | 84 bool isReturned() const { return Flags & Returned; } |
75 void setReturned() { Flags |= One << ReturnedOffs; } | 85 void setReturned() { Flags |= One << ReturnedOffs; } |
86 | |
87 bool isInConsecutiveRegs() const { return Flags & InConsecutiveRegs; } | |
88 void setInConsecutiveRegs() { Flags |= One << InConsecutiveRegsOffs; } | |
89 | |
90 bool isInConsecutiveRegsLast() const { return Flags & InConsecutiveRegsLast; } | |
91 void setInConsecutiveRegsLast() { Flags |= One << InConsecutiveRegsLastOffs; } | |
76 | 92 |
77 unsigned getByValAlign() const { | 93 unsigned getByValAlign() const { |
78 return (unsigned) | 94 return (unsigned) |
79 ((One << ((Flags & ByValAlign) >> ByValAlignOffs)) / 2); | 95 ((One << ((Flags & ByValAlign) >> ByValAlignOffs)) / 2); |
80 } | 96 } |