| Index: src/IceOperand.h
|
| diff --git a/src/IceOperand.h b/src/IceOperand.h
|
| index 7e7c4f02add3b73cec81a159063ec28b48b01961..42c3b65b13eeb716d2ebaa9f95aa585e5f5e2723 100644
|
| --- a/src/IceOperand.h
|
| +++ b/src/IceOperand.h
|
| @@ -27,7 +27,8 @@ class Operand {
|
| public:
|
| enum OperandKind {
|
| kConst_Base,
|
| - kConstInteger,
|
| + kConstInteger32,
|
| + kConstInteger64,
|
| kConstFloat,
|
| kConstDouble,
|
| kConstRelocatable,
|
| @@ -142,16 +143,23 @@ private:
|
| const T Value;
|
| };
|
|
|
| -typedef ConstantPrimitive<uint64_t, Operand::kConstInteger> ConstantInteger;
|
| +typedef ConstantPrimitive<uint32_t, Operand::kConstInteger32> ConstantInteger32;
|
| +typedef ConstantPrimitive<uint64_t, Operand::kConstInteger64> ConstantInteger64;
|
| typedef ConstantPrimitive<float, Operand::kConstFloat> ConstantFloat;
|
| typedef ConstantPrimitive<double, Operand::kConstDouble> ConstantDouble;
|
|
|
| -template <> inline void ConstantInteger::dump(GlobalContext *Ctx) const {
|
| +template <> inline void ConstantInteger32::dump(GlobalContext *Ctx) const {
|
| Ostream &Str = Ctx->getStrDump();
|
| if (getType() == IceType_i1)
|
| Str << (getValue() ? "true" : "false");
|
| else
|
| - Str << static_cast<int64_t>(getValue());
|
| + Str << static_cast<int32_t>(getValue());
|
| +}
|
| +
|
| +template <> inline void ConstantInteger64::dump(GlobalContext *Ctx) const {
|
| + assert(getType() == IceType_i64);
|
| + Ostream &Str = Ctx->getStrDump();
|
| + Str << static_cast<int64_t>(getValue());
|
| }
|
|
|
| // RelocatableTuple bundles the parameters that are used to
|
|
|