mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Don't keep track of # big vs #small instructions seperately
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c479db964f
commit
a407ba1062
@ -18,9 +18,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
static Statistic<>
|
static Statistic<>
|
||||||
NumOversized("bytecodewriter", "Number of oversized instructions");
|
NumInstrs("bytecodewriter", "Number of instructions");
|
||||||
static Statistic<>
|
|
||||||
NumNormal("bytecodewriter", "Number of normal instructions");
|
|
||||||
|
|
||||||
typedef unsigned char uchar;
|
typedef unsigned char uchar;
|
||||||
|
|
||||||
@ -52,7 +50,6 @@ static void outputInstructionFormat0(const Instruction *I,
|
|||||||
}
|
}
|
||||||
|
|
||||||
align32(Out); // We must maintain correct alignment!
|
align32(Out); // We must maintain correct alignment!
|
||||||
++NumOversized;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,7 +99,6 @@ static void outputInstrVarArgsCall(const Instruction *I,
|
|||||||
output_vbr((unsigned)Slot, Out);
|
output_vbr((unsigned)Slot, Out);
|
||||||
}
|
}
|
||||||
align32(Out); // We must maintain correct alignment!
|
align32(Out); // We must maintain correct alignment!
|
||||||
++NumOversized;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -124,7 +120,6 @@ static void outputInstructionFormat1(const Instruction *I,
|
|||||||
unsigned Bits = 1 | (Opcode << 2) | (Type << 8) | (Slots[0] << 20);
|
unsigned Bits = 1 | (Opcode << 2) | (Type << 8) | (Slots[0] << 20);
|
||||||
// cerr << "1 " << IType << " " << Type << " " << Slots[0] << endl;
|
// cerr << "1 " << IType << " " << Type << " " << Slots[0] << endl;
|
||||||
output(Bits, Out);
|
output(Bits, Out);
|
||||||
++NumNormal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,7 +144,6 @@ static void outputInstructionFormat2(const Instruction *I,
|
|||||||
// cerr << "2 " << IType << " " << Type << " " << Slots[0] << " "
|
// cerr << "2 " << IType << " " << Type << " " << Slots[0] << " "
|
||||||
// << Slots[1] << endl;
|
// << Slots[1] << endl;
|
||||||
output(Bits, Out);
|
output(Bits, Out);
|
||||||
++NumNormal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -175,7 +169,6 @@ static void outputInstructionFormat3(const Instruction *I,
|
|||||||
//cerr << "3 " << IType << " " << Type << " " << Slots[0] << " "
|
//cerr << "3 " << IType << " " << Type << " " << Slots[0] << " "
|
||||||
// << Slots[1] << " " << Slots[2] << endl;
|
// << Slots[1] << " " << Slots[2] << endl;
|
||||||
output(Bits, Out);
|
output(Bits, Out);
|
||||||
++NumNormal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeWriter::processInstruction(const Instruction &I) {
|
void BytecodeWriter::processInstruction(const Instruction &I) {
|
||||||
@ -246,6 +239,8 @@ void BytecodeWriter::processInstruction(const Instruction &I) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++NumInstrs;
|
||||||
|
|
||||||
// Decide which instruction encoding to use. This is determined primarily by
|
// Decide which instruction encoding to use. This is determined primarily by
|
||||||
// the number of operands, and secondarily by whether or not the max operand
|
// the number of operands, and secondarily by whether or not the max operand
|
||||||
// will fit into the instruction encoding. More operands == fewer bits per
|
// will fit into the instruction encoding. More operands == fewer bits per
|
||||||
|
Loading…
Reference in New Issue
Block a user