mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Fully decode TRAPcc.
This commit is contained in:
parent
f8cb3ca8b5
commit
1ceabb30b0
@ -513,6 +513,12 @@ template <typename Predecoder<model>::OpT op> uint32_t Predecoder<model>::invali
|
||||
switch(op) {
|
||||
default: break;
|
||||
|
||||
case OpT(Operation::TRAPcc):
|
||||
return ~TwoOperandMask<
|
||||
Ext | NoOperand,
|
||||
Ext | NoOperand
|
||||
>::value;
|
||||
|
||||
case OpT(Operation::Bccl): case OpT(Operation::BSRl):
|
||||
return ~OneOperandMask<
|
||||
Imm
|
||||
@ -1064,6 +1070,29 @@ template <typename Predecoder<model>::OpT op, bool validate> Preinstruction Pred
|
||||
return validated<op, validate>(addressing_mode, ea_register);
|
||||
}
|
||||
|
||||
//
|
||||
// MARK: TRAPcc
|
||||
//
|
||||
// Has 0, 1 or 2 following words, neither of which contributes to operation.
|
||||
//
|
||||
case OpT(Operation::TRAPcc): {
|
||||
switch(instruction & 7) {
|
||||
default: return Preinstruction();
|
||||
|
||||
// No extension.
|
||||
case 4: return validated<op, validate>();
|
||||
|
||||
// Word-sized extension.
|
||||
case 2: return validated<op, validate>(AddressingMode::ExtensionWord);
|
||||
|
||||
// DWord-sized extension (which is encoded as two extension operands).
|
||||
case 3:
|
||||
return validated<op, validate>(
|
||||
AddressingMode::ExtensionWord, 0,
|
||||
AddressingMode::ExtensionWord, 0);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// MARK: PACK
|
||||
//
|
||||
@ -1076,6 +1105,7 @@ template <typename Predecoder<model>::OpT op, bool validate> Preinstruction Pred
|
||||
// TODO; need to square the wheel on a prima-facie three operands.
|
||||
return Preinstruction();
|
||||
|
||||
|
||||
//
|
||||
// MARK: DIVl
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user