mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Rename opCodeString to Name, add new getName() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4388 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -67,7 +67,7 @@ const unsigned M_PSEUDO_FLAG = 1 << 14;
|
|||||||
|
|
||||||
|
|
||||||
struct MachineInstrDescriptor {
|
struct MachineInstrDescriptor {
|
||||||
const char * opCodeString; // Assembly language mnemonic for the opcode.
|
const char * Name; // Assembly language mnemonic for the opcode.
|
||||||
int numOperands; // Number of args; -1 if variable #args
|
int numOperands; // Number of args; -1 if variable #args
|
||||||
int resultPos; // Position of the result; -1 if no result
|
int resultPos; // Position of the result; -1 if no result
|
||||||
unsigned maxImmedConst; // Largest +ve constant in IMMMED field or 0.
|
unsigned maxImmedConst; // Largest +ve constant in IMMMED field or 0.
|
||||||
@@ -102,6 +102,10 @@ public:
|
|||||||
assert(opCode >= 0 && opCode < (int)descSize);
|
assert(opCode >= 0 && opCode < (int)descSize);
|
||||||
return desc[opCode];
|
return desc[opCode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *getName(MachineOpCode opCode) const {
|
||||||
|
return get(opCode).Name;
|
||||||
|
}
|
||||||
|
|
||||||
int getNumOperands(MachineOpCode opCode) const {
|
int getNumOperands(MachineOpCode opCode) const {
|
||||||
return get(opCode).numOperands;
|
return get(opCode).numOperands;
|
||||||
|
@@ -67,7 +67,7 @@ const unsigned M_PSEUDO_FLAG = 1 << 14;
|
|||||||
|
|
||||||
|
|
||||||
struct MachineInstrDescriptor {
|
struct MachineInstrDescriptor {
|
||||||
const char * opCodeString; // Assembly language mnemonic for the opcode.
|
const char * Name; // Assembly language mnemonic for the opcode.
|
||||||
int numOperands; // Number of args; -1 if variable #args
|
int numOperands; // Number of args; -1 if variable #args
|
||||||
int resultPos; // Position of the result; -1 if no result
|
int resultPos; // Position of the result; -1 if no result
|
||||||
unsigned maxImmedConst; // Largest +ve constant in IMMMED field or 0.
|
unsigned maxImmedConst; // Largest +ve constant in IMMMED field or 0.
|
||||||
@@ -102,6 +102,10 @@ public:
|
|||||||
assert(opCode >= 0 && opCode < (int)descSize);
|
assert(opCode >= 0 && opCode < (int)descSize);
|
||||||
return desc[opCode];
|
return desc[opCode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *getName(MachineOpCode opCode) const {
|
||||||
|
return get(opCode).Name;
|
||||||
|
}
|
||||||
|
|
||||||
int getNumOperands(MachineOpCode opCode) const {
|
int getNumOperands(MachineOpCode opCode) const {
|
||||||
return get(opCode).numOperands;
|
return get(opCode).numOperands;
|
||||||
|
Reference in New Issue
Block a user