gzdoom-gles/src/r_compiler/ssa/ssa_int.h

42 lines
1.1 KiB
C
Raw Normal View History

#pragma once
namespace llvm { class Value; }
namespace llvm { class Type; }
class SSAFloat;
class SSAInt
{
public:
SSAInt();
SSAInt(int constant);
SSAInt(SSAFloat f);
explicit SSAInt(llvm::Value *v);
static SSAInt from_llvm(llvm::Value *v) { return SSAInt(v); }
static llvm::Type *llvm_type();
llvm::Value *v;
};
SSAInt operator+(const SSAInt &a, const SSAInt &b);
SSAInt operator-(const SSAInt &a, const SSAInt &b);
SSAInt operator*(const SSAInt &a, const SSAInt &b);
SSAInt operator/(const SSAInt &a, const SSAInt &b);
SSAInt operator%(const SSAInt &a, const SSAInt &b);
SSAInt operator+(int a, const SSAInt &b);
SSAInt operator-(int a, const SSAInt &b);
SSAInt operator*(int a, const SSAInt &b);
SSAInt operator/(int a, const SSAInt &b);
SSAInt operator%(int a, const SSAInt &b);
SSAInt operator+(const SSAInt &a, int b);
SSAInt operator-(const SSAInt &a, int b);
SSAInt operator*(const SSAInt &a, int b);
SSAInt operator/(const SSAInt &a, int b);
SSAInt operator%(const SSAInt &a, int b);
SSAInt operator<<(const SSAInt &a, int bits);
SSAInt operator>>(const SSAInt &a, int bits);