mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[MC] Add createFPImm/isFPImm/setFPImm to smooth migration from FPImm to DFPImm after D96091
This commit is contained in:
parent
161c766c65
commit
1c762d7312
@ -100,11 +100,19 @@ public:
|
||||
assert(isDFPImm() && "This is not an FP immediate");
|
||||
return FPImmVal;
|
||||
}
|
||||
double getFPImm() const {
|
||||
assert(isDFPImm() && "This is not an FP immediate");
|
||||
return bit_cast<double>(FPImmVal);
|
||||
}
|
||||
|
||||
void setDFPImm(uint64_t Val) {
|
||||
assert(isDFPImm() && "This is not an FP immediate");
|
||||
FPImmVal = Val;
|
||||
}
|
||||
void setFPImm(double Val) {
|
||||
assert(isDFPImm() && "This is not an FP immediate");
|
||||
FPImmVal = bit_cast<uint64_t>(Val);
|
||||
}
|
||||
|
||||
const MCExpr *getExpr() const {
|
||||
assert(isExpr() && "This is not an expression");
|
||||
@ -153,6 +161,12 @@ public:
|
||||
Op.FPImmVal = Val;
|
||||
return Op;
|
||||
}
|
||||
static MCOperand createFPImm(double Val) {
|
||||
MCOperand Op;
|
||||
Op.Kind = kDFPImmediate;
|
||||
Op.FPImmVal = bit_cast<uint64_t>(Val);
|
||||
return Op;
|
||||
}
|
||||
|
||||
static MCOperand createExpr(const MCExpr *Val) {
|
||||
MCOperand Op;
|
||||
|
Loading…
x
Reference in New Issue
Block a user