File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -100,11 +100,19 @@ class MCOperand {
100
100
assert (isDFPImm () && " This is not an FP immediate" );
101
101
return FPImmVal;
102
102
}
103
+ double getFPImm () const {
104
+ assert (isDFPImm () && " This is not an FP immediate" );
105
+ return bit_cast<double >(FPImmVal);
106
+ }
103
107
104
108
void setDFPImm (uint64_t Val) {
105
109
assert (isDFPImm () && " This is not an FP immediate" );
106
110
FPImmVal = Val;
107
111
}
112
+ void setFPImm (double Val) {
113
+ assert (isDFPImm () && " This is not an FP immediate" );
114
+ FPImmVal = bit_cast<uint64_t >(Val);
115
+ }
108
116
109
117
const MCExpr *getExpr () const {
110
118
assert (isExpr () && " This is not an expression" );
@@ -153,6 +161,12 @@ class MCOperand {
153
161
Op.FPImmVal = Val;
154
162
return Op;
155
163
}
164
+ static MCOperand createFPImm (double Val) {
165
+ MCOperand Op;
166
+ Op.Kind = kDFPImmediate ;
167
+ Op.FPImmVal = bit_cast<uint64_t >(Val);
168
+ return Op;
169
+ }
156
170
157
171
static MCOperand createExpr (const MCExpr *Val) {
158
172
MCOperand Op;
You can’t perform that action at this time.
0 commit comments