mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-06 10:38:16 +00:00
Decode CAS2.
This commit is contained in:
parent
85df54ee7d
commit
12ca79e645
@ -575,6 +575,12 @@ template <typename Predecoder<model>::OpT op> uint32_t Predecoder<model>::invali
|
||||
Ext,
|
||||
Ind | PostInc | PreDec | d16An | d8AnXn | XXXw | XXXl
|
||||
>::value;
|
||||
|
||||
case OpT(Operation::CAS2w): case OpT(Operation::CAS2l):
|
||||
return ~TwoOperandMask<
|
||||
Ext,
|
||||
Ext
|
||||
>::value;
|
||||
}
|
||||
|
||||
return InvalidOperands;
|
||||
@ -1172,6 +1178,17 @@ template <typename Predecoder<model>::OpT op, bool validate> Preinstruction Pred
|
||||
AddressingMode::ExtensionWord, 0,
|
||||
combined_mode(ea_mode, ea_register), ea_register);
|
||||
|
||||
//
|
||||
// MARK: CAS2
|
||||
//
|
||||
// b0–b2 and b3–b5: an effective address.
|
||||
// There is also an immedate operand describing relevant registers.
|
||||
//
|
||||
case OpT(Operation::CAS2w): case OpT(Operation::CAS2l):
|
||||
return validated<op, validate>(
|
||||
AddressingMode::ExtensionWord, 0,
|
||||
AddressingMode::ExtensionWord, 0);
|
||||
|
||||
//
|
||||
// MARK: DIVl
|
||||
//
|
||||
@ -1202,8 +1219,8 @@ Preinstruction Predecoder<model>::decode0(uint16_t instruction) {
|
||||
case 0xa7c: Decode(Op::EORItoSR); // 6-10 (p464)
|
||||
|
||||
// 4-68 (p172)
|
||||
// case 0xcfc: DecodeReq(model >= Model::M68020, Op::CAS2w);
|
||||
// case 0xefc: DecodeReq(model >= Model::M68020, Op::CAS2l);
|
||||
case 0xcfc: DecodeReq(model >= Model::M68020, Op::CAS2w);
|
||||
case 0xefc: DecodeReq(model >= Model::M68020, Op::CAS2l);
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
@ -128,6 +128,10 @@ const char *_to_string(Operation operation, bool is_quick) {
|
||||
case Operation::CMPw: return "CMP.w";
|
||||
case Operation::CMPl: return "CMP.l";
|
||||
|
||||
case Operation::CMP2b: return "CMP2.b";
|
||||
case Operation::CMP2w: return "CMP2.w";
|
||||
case Operation::CMP2l: return "CMP2.l";
|
||||
|
||||
case Operation::CMPAw: return "CMPA.w";
|
||||
case Operation::CMPAl: return "CMPA.l";
|
||||
|
||||
@ -157,6 +161,9 @@ const char *_to_string(Operation operation, bool is_quick) {
|
||||
case Operation::CASw: return "CAS.w";
|
||||
case Operation::CASl: return "CAS.l";
|
||||
|
||||
case Operation::CAS2w: return "CAS2.w";
|
||||
case Operation::CAS2l: return "CAS2.l";
|
||||
|
||||
case Operation::CLRb: return "CLR.b";
|
||||
case Operation::CLRw: return "CLR.w";
|
||||
case Operation::CLRl: return "CLR.l";
|
||||
@ -245,6 +252,10 @@ const char *_to_string(Operation operation, bool is_quick) {
|
||||
case Operation::TRAPV: return "TRAPV";
|
||||
case Operation::CHKw: return "CHK";
|
||||
|
||||
case Operation::CHK2b: return "CHK2.b";
|
||||
case Operation::CHK2w: return "CHK2.w";
|
||||
case Operation::CHK2l: return "CHK2.l";
|
||||
|
||||
case Operation::EXG: return "EXG";
|
||||
case Operation::SWAP: return "SWAP";
|
||||
|
||||
|
@ -3323,7 +3323,7 @@
|
||||
"0cf9": "CAS.w #, (xxx).l",
|
||||
"0cfa": "None",
|
||||
"0cfb": "None",
|
||||
"0cfc": "None",
|
||||
"0cfc": "CAS2.w #, #",
|
||||
"0cfd": "None",
|
||||
"0cfe": "None",
|
||||
"0cff": "None",
|
||||
@ -3835,7 +3835,7 @@
|
||||
"0ef9": "CAS.l #, (xxx).l",
|
||||
"0efa": "None",
|
||||
"0efb": "None",
|
||||
"0efc": "None",
|
||||
"0efc": "CAS2.l #, #",
|
||||
"0efd": "None",
|
||||
"0efe": "None",
|
||||
"0eff": "None",
|
||||
|
@ -83,7 +83,7 @@ template <Model model> void test(NSString *filename, Class cls) {
|
||||
*/
|
||||
|
||||
- (void)test68020 {
|
||||
// generate<Model::M68020>();
|
||||
generate<Model::M68020>();
|
||||
test<Model::M68020>(@"68020ops", [self class]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user