2016-09-27 20:53:20 +00:00
|
|
|
|
|
|
|
#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);
|
2016-09-27 20:53:20 +00:00
|
|
|
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();
|
|
|
|
|
2016-09-27 20:53:20 +00:00
|
|
|
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);
|