mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Add new opIsUse method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5062 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
f605055994
commit
c583175e72
1 file changed
+7
-4
@@ -84,12 +84,14 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Bit fields of the flags variable used for different operand properties
|
// Bit fields of the flags variable used for different operand properties
|
||||||
static const char DEFFLAG = 0x1; // this is a def of the operand
|
static const char DEFFLAG = 0x01; // this is a def of the operand
|
||||||
static const char DEFUSEFLAG = 0x2; // this is both a def and a use
|
static const char DEFUSEFLAG = 0x02; // this is both a def and a use
|
||||||
static const char HIFLAG32 = 0x4; // operand is %hi32(value_or_immedVal)
|
static const char HIFLAG32 = 0x04; // operand is %hi32(value_or_immedVal)
|
||||||
static const char LOFLAG32 = 0x8; // operand is %lo32(value_or_immedVal)
|
static const char LOFLAG32 = 0x08; // operand is %lo32(value_or_immedVal)
|
||||||
static const char HIFLAG64 = 0x10; // operand is %hi64(value_or_immedVal)
|
static const char HIFLAG64 = 0x10; // operand is %hi64(value_or_immedVal)
|
||||||
static const char LOFLAG64 = 0x20; // operand is %lo64(value_or_immedVal)
|
static const char LOFLAG64 = 0x20; // operand is %lo64(value_or_immedVal)
|
||||||
|
|
||||||
|
static const char USEDEFMASK = 0x03;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
union {
|
union {
|
||||||
@@ -203,6 +205,7 @@ public:
|
|||||||
return MBB;
|
return MBB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool opIsUse () const { return (flags & USEDEFMASK) == 0; }
|
||||||
bool opIsDef () const { return flags & DEFFLAG; }
|
bool opIsDef () const { return flags & DEFFLAG; }
|
||||||
bool opIsDefAndUse () const { return flags & DEFUSEFLAG; }
|
bool opIsDefAndUse () const { return flags & DEFUSEFLAG; }
|
||||||
bool opHiBits32 () const { return flags & HIFLAG32; }
|
bool opHiBits32 () const { return flags & HIFLAG32; }
|
||||||
|
|||||||
Reference in new issue
Block a user