mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Neg instruction removed. Cast instruction implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -145,6 +145,15 @@ bool BytecodeWriter::processInstruction(const Instruction *I) {
|
||||
assert(Slot != -1 && "Type not available!!?!");
|
||||
Type = (unsigned)Slot;
|
||||
|
||||
// Handle the special case for cast...
|
||||
if (I->getOpcode() == Instruction::Cast) {
|
||||
// Cast has to encode the destination type as the second argument in the
|
||||
// packet, or else we won't know what type to cast to!
|
||||
Slots[1] = Table.getValSlot(I->getType());
|
||||
assert(Slots[1] != -1 && "Cast return type unknown?");
|
||||
if (Slots[1] > MaxOpSlot) MaxOpSlot = Slots[1];
|
||||
NumOperands++;
|
||||
}
|
||||
|
||||
// Decide which instruction encoding to use. This is determined primarily by
|
||||
// the number of operands, and secondarily by whether or not the max operand
|
||||
|
Reference in New Issue
Block a user