Replaced instruction information arrays with a table.

git-svn-id: http://www.cdkersey.com/harp/harptool@12 0246edb2-e076-4747-b392-db732a341fa2
This commit is contained in:
chad
2011-07-24 10:07:09 +00:00
parent 600d27ec60
commit f758375767
4 changed files with 79 additions and 74 deletions

View File

@@ -109,7 +109,7 @@ Instruction *ByteDecoder::decode(const vector<Byte> &v, Size &n) {
bool usedImm = false;
switch (Instruction::argClasses[op]) {
switch (Instruction::instTable[op].argClass) {
case Instruction::AC_NONE:
break;
case Instruction::AC_2REG:
@@ -276,7 +276,7 @@ Instruction *WordDecoder::decode(const std::vector<Byte> &v, Size &idx) {
inst.setOpcode(op);
bool usedImm(false);
switch(Instruction::argClasses[op]) {
switch(Instruction::instTable[op].argClass) {
case Instruction::AC_NONE:
break;
case Instruction::AC_1IMM: