gzdoom/src/r_compiler/ssa/ssa_short.h

52 lines
1.5 KiB
C
Raw Normal View History

#pragma once
namespace llvm { class Value; }
namespace llvm { class Type; }
class SSAFloat;
class SSAInt;
class SSAShort
{
public:
SSAShort();
2016-10-01 09:47:21 +00:00
explicit SSAShort(int constant);
SSAShort(SSAFloat f);
explicit SSAShort(llvm::Value *v);
static SSAShort from_llvm(llvm::Value *v) { return SSAShort(v); }
static llvm::Type *llvm_type();
2016-09-28 16:49:39 +00:00
SSAInt zext_int();
llvm::Value *v;
};
SSAShort operator+(const SSAShort &a, const SSAShort &b);
SSAShort operator-(const SSAShort &a, const SSAShort &b);
SSAShort operator*(const SSAShort &a, const SSAShort &b);
SSAShort operator/(const SSAShort &a, const SSAShort &b);
SSAShort operator%(const SSAShort &a, const SSAShort &b);
SSAShort operator+(int a, const SSAShort &b);
SSAShort operator-(int a, const SSAShort &b);
SSAShort operator*(int a, const SSAShort &b);
SSAShort operator/(int a, const SSAShort &b);
SSAShort operator%(int a, const SSAShort &b);
SSAShort operator+(const SSAShort &a, int b);
SSAShort operator-(const SSAShort &a, int b);
SSAShort operator*(const SSAShort &a, int b);
SSAShort operator/(const SSAShort &a, int b);
SSAShort operator%(const SSAShort &a, int b);
SSAShort operator<<(const SSAShort &a, int bits);
SSAShort operator>>(const SSAShort &a, int bits);
SSAShort operator<<(const SSAShort &a, const SSAInt &bits);
SSAShort operator>>(const SSAShort &a, const SSAInt &bits);
SSAShort operator&(const SSAShort &a, int b);
SSAShort operator&(const SSAShort &a, const SSAShort &b);
SSAShort operator|(const SSAShort &a, int b);
SSAShort operator|(const SSAShort &a, const SSAShort &b);