2016-09-26 07:00:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace llvm { class Value; }
|
|
|
|
namespace llvm { class Type; }
|
|
|
|
|
2016-10-07 01:38:43 +00:00
|
|
|
class SSAInt;
|
|
|
|
|
2016-09-26 07:00:19 +00:00
|
|
|
class SSAUByte
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SSAUByte();
|
2016-10-01 09:47:21 +00:00
|
|
|
explicit SSAUByte(unsigned char constant);
|
2016-09-26 07:00:19 +00:00
|
|
|
explicit SSAUByte(llvm::Value *v);
|
|
|
|
static SSAUByte from_llvm(llvm::Value *v) { return SSAUByte(v); }
|
|
|
|
static llvm::Type *llvm_type();
|
|
|
|
|
2016-10-07 01:38:43 +00:00
|
|
|
SSAInt zext_int();
|
|
|
|
|
2016-09-26 07:00:19 +00:00
|
|
|
llvm::Value *v;
|
|
|
|
};
|
|
|
|
|
|
|
|
SSAUByte operator+(const SSAUByte &a, const SSAUByte &b);
|
|
|
|
SSAUByte operator-(const SSAUByte &a, const SSAUByte &b);
|
|
|
|
SSAUByte operator*(const SSAUByte &a, const SSAUByte &b);
|
|
|
|
//SSAUByte operator/(const SSAUByte &a, const SSAUByte &b);
|
|
|
|
|
|
|
|
SSAUByte operator+(unsigned char a, const SSAUByte &b);
|
|
|
|
SSAUByte operator-(unsigned char a, const SSAUByte &b);
|
|
|
|
SSAUByte operator*(unsigned char a, const SSAUByte &b);
|
|
|
|
//SSAUByte operator/(unsigned char a, const SSAUByte &b);
|
|
|
|
|
|
|
|
SSAUByte operator+(const SSAUByte &a, unsigned char b);
|
|
|
|
SSAUByte operator-(const SSAUByte &a, unsigned char b);
|
|
|
|
SSAUByte operator*(const SSAUByte &a, unsigned char b);
|
|
|
|
//SSAUByte operator/(const SSAUByte &a, unsigned char b);
|
|
|
|
|
|
|
|
SSAUByte operator<<(const SSAUByte &a, unsigned char bits);
|
|
|
|
SSAUByte operator>>(const SSAUByte &a, unsigned char bits);
|