2
Copyright (C) 1998 T. Scott Dattalo
4
This file is part of the libgpsim library of gpsim
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, see
18
<http://www.gnu.org/licenses/lgpl-2.1.html>.
22
#ifndef __16BIT_INSTRUCTIONS_H__
23
#define __16BIT_INSTRUCTIONS_H__
25
#include "14bit-instructions.h"
26
#include "16bit-registers.h"
28
/*---------------------------------------------------------
29
* 16bit-instructions.h
31
* This .h file contains the definitions for the 16-bit core
32
* instructions (the 16bit core of the 18cxxx processors that
33
* is). Most of the instructions are derived from the corresponding
34
* 12 and 14 bit core instructions. However, the virtual function
35
* 'execute' is replaced. This is because the memory addressing and
36
* the status register are different for the 16bit core. The alternative is
37
* is to patch the existing instructions with the 16bit stuff.
38
* I feel that this is an unwarranted performance hit. So gpsim
39
* is slightly bigger, but it's also slightly faster...
42
class Branching : public Instruction
45
int destination_index;
46
uint absolute_destination_index;
48
Branching(Processor *new_cpu, uint new_opcode, uint address);
50
virtual void execute(){ }
51
virtual void debug(){ }
52
virtual char *name(char *,int);
53
virtual bool isBase() { return true;}
54
void decode(Processor *new_cpu, uint new_opcode);
57
class multi_word_instruction : public Instruction
65
multi_word_instruction(Processor *new_cpu, uint new_opcode, uint address);
67
virtual int instruction_size() { return 2;}
68
virtual enum INSTRUCTION_TYPES isa() {return MULTIWORD_INSTRUCTION;}
69
virtual bool isBase() { return true;}
70
virtual void initialize(bool init_state) { initialized = init_state; }
73
class multi_word_branch : public multi_word_instruction
76
uint destination_index;
78
multi_word_branch(Processor *new_cpu, uint new_opcode, uint address);
80
void runtime_initialize();
81
virtual void execute(){}
82
virtual char *name(char *,int);
85
class ADDULNK : public Instruction
88
ADDULNK(Processor *new_cpu, uint new_opcode,const char *, uint address);
89
virtual bool isBase() { return true;}
90
virtual void execute();
91
virtual char *name(char *,int);
96
class ADDFSR16 : public Instruction
99
ADDFSR16(Processor *new_cpu, uint new_opcode,const char *, uint address);
100
virtual bool isBase() { return true;}
101
virtual void execute();
102
virtual char *name(char *,int);
103
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
105
if (((new_opcode>>6)&3) == 3)
107
if (new_opcode & 0x100)
108
return new ADDULNK(new_cpu,new_opcode,"subulnk", address);
110
return new ADDULNK(new_cpu,new_opcode,"addulnk", address);
112
if (new_opcode & 0x100)
113
return new ADDFSR16(new_cpu,new_opcode,"subfsr", address);
114
return new ADDFSR16(new_cpu,new_opcode,"addfsr", address);
119
Indirect_Addressing *ia;
122
class CALLW16 : public CALLW
125
CALLW16(Processor *new_cpu, uint new_opcode, uint address) :
126
CALLW(new_cpu, new_opcode, address){}
127
virtual bool isBase() { return true;}
128
virtual void execute();
129
static Instruction*construct(Processor *new_cpu, uint new_opcode, uint address)
131
return new CALLW16(new_cpu,new_opcode,address);
135
class MOVSF : public multi_word_instruction
138
MOVSF(Processor *new_cpu, uint new_opcode, uint address);
139
virtual void execute();
140
virtual char *name(char *,int);
141
void runtime_initialize();
143
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
144
{return new MOVSF(new_cpu,new_opcode,address);}
146
uint source,destination;
149
class PUSHL : public Instruction
152
PUSHL(Processor *new_cpu, uint new_opcode, uint address);
153
virtual bool isBase() { return true;}
154
virtual void execute();
155
virtual char *name(char *,int);
156
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
157
{ return new PUSHL(new_cpu,new_opcode,address); }
162
class ADDLW16 : public ADDLW
165
ADDLW16(Processor *new_cpu, uint new_opcode, uint address) :
166
ADDLW(new_cpu, new_opcode,address)
168
virtual void execute();
169
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
170
{return new ADDLW16(new_cpu,new_opcode,address);}
173
class ADDWF16 : public ADDWF
178
ADDWF16(Processor *new_cpu, uint new_opcode, uint address)
179
: ADDWF(new_cpu,new_opcode,address){}
180
virtual void execute();
181
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
182
{return new ADDWF16(new_cpu,new_opcode,address);}
185
class ADDWFC16 : public ADDWFC
188
ADDWFC16(Processor *new_cpu, uint new_opcode, uint address)
189
: ADDWFC(new_cpu,new_opcode,address){}
190
virtual void execute();
191
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
192
{return new ADDWFC16(new_cpu,new_opcode,address);}
195
class ANDLW16 : public ANDLW
198
ANDLW16(Processor *new_cpu, uint new_opcode, uint address) :
199
ANDLW(new_cpu, new_opcode,address)
201
virtual void execute();
202
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
203
{return new ANDLW16(new_cpu,new_opcode,address);}
206
class ANDWF16 : public ANDWF
209
ANDWF16(Processor *new_cpu, uint new_opcode, uint address)
210
: ANDWF(new_cpu,new_opcode,address){}
211
virtual void execute();
212
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
213
{return new ANDWF16(new_cpu,new_opcode,address);}
216
class BC : public Branching
219
BC(Processor *new_cpu, uint new_opcode, uint address);
220
virtual void execute();
221
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
222
{return new BC(new_cpu,new_opcode,address);}
225
class BN : public Branching
228
BN(Processor *new_cpu, uint new_opcode, uint address);
229
virtual void execute();
230
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
231
{return new BN(new_cpu,new_opcode,address);}
234
class BNC : public Branching
237
BNC(Processor *new_cpu, uint new_opcode, uint address);
238
virtual void execute();
239
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
240
{return new BNC(new_cpu,new_opcode,address);}
243
class BNN : public Branching
246
BNN(Processor *new_cpu, uint new_opcode, uint address);
247
virtual void execute();
248
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
249
{return new BNN(new_cpu,new_opcode,address);}
252
class BNOV : public Branching
255
BNOV(Processor *new_cpu, uint new_opcode, uint address);
256
virtual void execute();
257
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
258
{return new BNOV(new_cpu,new_opcode,address);}
261
class BNZ : public Branching
264
BNZ(Processor *new_cpu, uint new_opcode, uint address);
265
virtual void execute();
266
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
267
{return new BNZ(new_cpu,new_opcode,address);}
271
class BOV : public Branching
274
BOV(Processor *new_cpu, uint new_opcode, uint address);
275
virtual void execute();
276
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
277
{return new BOV(new_cpu,new_opcode,address);}
280
class BRA16 : public Instruction
283
int destination_index;
284
uint absolute_destination_index;
286
BRA16(Processor *new_cpu, uint new_opcode, uint address);
287
virtual void execute();
288
virtual char *name(char *,int);
289
virtual bool isBase() { return true;}
290
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
291
{return new BRA16(new_cpu,new_opcode,address);}
294
class BSF16 : public BSF
299
BSF16(Processor *new_cpu, uint new_opcode, uint address)
300
: BSF(new_cpu,new_opcode,address){}
301
virtual void execute();
302
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
303
{return new BSF16(new_cpu,new_opcode,address);}
306
class BCF16 : public BCF
311
BCF16(Processor *new_cpu, uint new_opcode, uint address)
312
: BCF(new_cpu,new_opcode,address){}
313
virtual void execute();
314
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
315
{return new BCF16(new_cpu,new_opcode,address);}
318
class BTFSC16 : public BTFSC
323
BTFSC16(Processor *new_cpu, uint new_opcode, uint address)
324
: BTFSC(new_cpu,new_opcode,address){}
325
virtual void execute();
326
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
327
{return new BTFSC16(new_cpu,new_opcode,address);}
330
class BTFSS16 : public BTFSS
335
BTFSS16(Processor *new_cpu, uint new_opcode, uint address)
336
: BTFSS(new_cpu,new_opcode,address){}
337
virtual void execute();
338
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
339
{return new BTFSS16(new_cpu,new_opcode,address);}
342
class BTG : public Bit_op
345
BTG(Processor *new_cpu, uint new_opcode, uint address);
346
virtual void execute();
347
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
348
{return new BTG(new_cpu,new_opcode,address);}
351
class BZ : public Branching
354
BZ(Processor *new_cpu, uint new_opcode, uint address);
355
virtual void execute();
356
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
357
{return new BZ(new_cpu,new_opcode,address);}
360
class CALL16 : public multi_word_branch
365
CALL16(Processor *new_cpu, uint new_opcode, uint address);
366
virtual void execute();
367
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
368
{return new CALL16(new_cpu,new_opcode,address);}
369
virtual char *name(char *,int);
372
class CLRF16 : public CLRF
375
CLRF16(Processor *new_cpu, uint new_opcode, uint address)
376
: CLRF(new_cpu,new_opcode,address){}
377
virtual void execute();
378
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
379
{return new CLRF16(new_cpu,new_opcode,address);}
382
class COMF16 : public COMF
385
COMF16(Processor *new_cpu, uint new_opcode, uint address)
386
: COMF(new_cpu,new_opcode,address){}
387
virtual void execute();
388
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
389
{return new COMF16(new_cpu,new_opcode,address);}
392
class CPFSEQ : public Register_op
395
CPFSEQ(Processor *new_cpu, uint new_opcode, uint address);
396
virtual void execute();
397
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
398
{return new CPFSEQ(new_cpu,new_opcode,address);}
401
class CPFSGT : public Register_op
404
CPFSGT(Processor *new_cpu, uint new_opcode, uint address);
405
virtual void execute();
406
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
407
{return new CPFSGT(new_cpu,new_opcode,address);}
410
class CPFSLT : public Register_op
413
CPFSLT(Processor *new_cpu, uint new_opcode, uint address);
414
virtual void execute();
415
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
416
{return new CPFSLT(new_cpu,new_opcode,address);}
419
class DAW : public Instruction
422
DAW(Processor *new_cpu, uint new_opcode, uint address);
423
virtual void execute();
424
virtual bool isBase() { return true;}
425
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
426
{return new DAW(new_cpu,new_opcode,address);}
429
class DECF16 : public DECF
432
DECF16(Processor *new_cpu, uint new_opcode, uint address)
433
: DECF(new_cpu,new_opcode,address){}
434
virtual void execute();
435
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
436
{return new DECF16(new_cpu,new_opcode,address);}
440
class DECFSZ16 : public DECFSZ
443
DECFSZ16(Processor *new_cpu, uint new_opcode, uint address)
444
: DECFSZ(new_cpu,new_opcode,address){}
445
virtual void execute();
446
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
447
{return new DECFSZ16(new_cpu,new_opcode,address);}
450
class DCFSNZ : public Register_op
453
DCFSNZ(Processor *new_cpu, uint new_opcode, uint address);
454
virtual void execute();
455
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
456
{return new DCFSNZ(new_cpu,new_opcode,address);}
459
class GOTO16 : public multi_word_branch
462
GOTO16(Processor *new_cpu, uint new_opcode, uint address);
463
virtual void execute();
464
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
465
{return new GOTO16(new_cpu,new_opcode,address);}
468
class INCF16 : public INCF
471
INCF16(Processor *new_cpu, uint new_opcode, uint address)
472
: INCF(new_cpu,new_opcode,address){}
473
virtual void execute();
474
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
475
{return new INCF16(new_cpu,new_opcode,address);}
478
class INCFSZ16 : public INCFSZ
481
INCFSZ16(Processor *new_cpu, uint new_opcode, uint address)
482
: INCFSZ(new_cpu,new_opcode,address){}
483
virtual void execute();
484
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
485
{return new INCFSZ16(new_cpu,new_opcode,address);}
489
class INFSNZ : public Register_op
492
INFSNZ(Processor *new_cpu, uint new_opcode, uint address);
493
virtual void execute();
494
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
495
{return new INFSNZ(new_cpu,new_opcode,address);}
498
//---------------------------------------------------------
500
class IORLW16 : public IORLW
503
IORLW16(Processor *new_cpu, uint new_opcode, uint address) :
504
IORLW(new_cpu, new_opcode,address)
506
virtual void execute();
507
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
508
{return new IORLW16(new_cpu,new_opcode,address);}
511
//---------------------------------------------------------
512
class IORWF16 : public IORWF
515
IORWF16(Processor *new_cpu, uint new_opcode, uint address)
516
: IORWF(new_cpu,new_opcode,address){}
517
virtual void execute();
518
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
519
{return new IORWF16(new_cpu,new_opcode,address);}
522
class LCALL16 : public multi_word_branch
527
LCALL16(Processor *new_cpu, uint new_opcode, uint address);
528
virtual void execute();
529
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
530
{return new LCALL16(new_cpu,new_opcode,address);}
531
virtual char *name(char *,int);
534
class LFSR : public multi_word_instruction
538
Indirect_Addressing *ia;
540
LFSR(Processor *new_cpu, uint new_opcode, uint address);
541
virtual void execute();
542
virtual char *name(char *,int);
543
void runtime_initialize();
545
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
546
{return new LFSR(new_cpu,new_opcode,address);}
549
class MOVF16 : public MOVF
552
MOVF16(Processor *new_cpu, uint new_opcode, uint address)
553
: MOVF(new_cpu,new_opcode,address){}
554
virtual void execute();
555
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
556
{return new MOVF16(new_cpu,new_opcode,address);}
559
class MOVFF : public multi_word_instruction
562
uint source,destination;
564
MOVFF(Processor *new_cpu, uint new_opcode, uint address);
565
virtual void execute();
566
virtual char *name(char *,int);
567
void runtime_initialize();
569
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
570
{return new MOVFF(new_cpu,new_opcode,address);}
573
class MOVFP : public multi_word_instruction
576
uint source,destination;
578
MOVFP(Processor *new_cpu, uint new_opcode, uint address);
579
virtual void execute();
580
virtual char *name(char *,int);
581
void runtime_initialize();
583
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
584
{return new MOVFP(new_cpu,new_opcode,address);}
587
class MOVLB16 : public Literal_op
590
MOVLB16(Processor *new_cpu, uint new_opcode, uint address);
591
virtual void execute();
592
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
593
{return new MOVLB16(new_cpu,new_opcode,address);}
596
class MOVLR : public Literal_op
599
MOVLR(Processor *new_cpu, uint new_opcode, uint address);
600
virtual void execute();
601
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
602
{return new MOVLR(new_cpu,new_opcode,address);}
605
class MOVPF : public multi_word_instruction
608
uint source,destination;
610
MOVPF(Processor *new_cpu, uint new_opcode, uint address);
611
virtual void execute();
612
virtual char *name(char *,int);
613
void runtime_initialize();
615
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
616
{return new MOVPF(new_cpu,new_opcode,address);}
619
class MOVWF16 : public MOVWF
622
MOVWF16(Processor *new_cpu, uint new_opcode, uint address);
623
virtual void execute();
625
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
626
{return new MOVWF16(new_cpu,new_opcode,address);}
629
class MULLW : public Literal_op
632
MULLW(Processor *new_cpu, uint new_opcode, uint address);
633
virtual void execute();
634
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
635
{return new MULLW(new_cpu,new_opcode,address);}
638
class MULWF : public Register_op
641
MULWF(Processor *new_cpu, uint new_opcode, uint address);
642
virtual void execute();
643
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
644
{return new MULWF(new_cpu,new_opcode,address);}
647
class NEGF : public Register_op
650
NEGF(Processor *new_cpu, uint new_opcode, uint address);
651
virtual void execute();
652
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
653
{return new NEGF(new_cpu,new_opcode,address);}
656
class NEGW : public Register_op
660
NEGW(Processor *new_cpu, uint new_opcode, uint address);
661
virtual void execute();
662
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
663
{return new NEGW(new_cpu,new_opcode,address);}
666
class POP : public Instruction
669
POP(Processor *new_cpu, uint new_opcode, uint address);
670
virtual void execute();
671
virtual bool isBase() { return true;}
672
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
673
{return new POP(new_cpu,new_opcode,address);}
676
class PUSH : public Instruction
679
PUSH(Processor *new_cpu, uint new_opcode, uint address);
680
virtual void execute();
681
virtual bool isBase() { return true;}
682
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
683
{return new PUSH(new_cpu,new_opcode,address);}
686
class RCALL : public Instruction
689
int destination_index;
690
uint absolute_destination_index;
692
RCALL(Processor *new_cpu, uint new_opcode, uint address);
693
virtual void execute();
694
virtual char *name(char *,int);
695
virtual bool isBase() { return true;}
696
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
697
{return new RCALL(new_cpu,new_opcode,address);}
700
class RETFIE16 : public RETFIE
705
RETFIE16(Processor *new_cpu, uint new_opcode, uint address) :
706
RETFIE(new_cpu,new_opcode,address)
708
fast = (new_opcode & 1);
710
virtual void execute();
711
virtual char *name(char *,int);
713
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
714
{return new RETFIE16(new_cpu,new_opcode,address);}
717
class RETURN16 : public RETURN
722
RETURN16(Processor *new_cpu, uint new_opcode, uint address) :
723
RETURN(new_cpu,new_opcode,address)
724
{ fast = (new_opcode & 1); }
725
virtual void execute();
726
virtual char *name(char *,int);
728
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
729
{return new RETURN16(new_cpu,new_opcode,address);}
732
class RLCF : public Register_op
735
RLCF(Processor *new_cpu, uint new_opcode, uint address);
736
virtual void execute();
738
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
739
{return new RLCF(new_cpu,new_opcode,address);}
742
class RLNCF : public Register_op
745
RLNCF(Processor *new_cpu, uint new_opcode, uint address);
746
virtual void execute();
748
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
749
{return new RLNCF(new_cpu,new_opcode,address);}
752
class RRCF : public Register_op
755
RRCF(Processor *new_cpu, uint new_opcode, uint address);
756
virtual void execute();
758
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
759
{return new RRCF(new_cpu,new_opcode,address);}
762
class RRNCF : public Register_op
765
RRNCF(Processor *new_cpu, uint new_opcode, uint address);
766
virtual void execute();
768
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
769
{return new RRNCF(new_cpu,new_opcode,address);}
772
class SETF : public Register_op
775
SETF(Processor *new_cpu, uint new_opcode, uint address);
776
virtual void execute();
777
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
778
{return new SETF(new_cpu,new_opcode,address);}
781
class SLEEP16 : public SLEEP
784
SLEEP16(Processor *new_cpu, uint new_opcode, uint address) :
785
SLEEP(new_cpu,new_opcode,address) { }
786
virtual void execute();
788
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
789
{return new SLEEP16(new_cpu,new_opcode,address);}
792
class SUBFWB : public Register_op
795
SUBFWB(Processor *new_cpu, uint new_opcode, uint address);
796
virtual void execute();
798
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
799
{return new SUBFWB(new_cpu,new_opcode,address);}
802
class SUBLW16 : public SUBLW
805
SUBLW16(Processor *new_cpu, uint new_opcode, uint address) :
806
SUBLW(new_cpu,new_opcode,address) { }
807
virtual void execute();
809
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
810
{return new SUBLW16(new_cpu,new_opcode,address);}
813
class SUBWF16 : public SUBWF
816
SUBWF16(Processor *new_cpu, uint new_opcode, uint address) :
817
SUBWF(new_cpu,new_opcode,address) { }
818
virtual void execute();
820
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
821
{return new SUBWF16(new_cpu,new_opcode,address);}
824
class SUBWFB16 : public SUBWFB
827
SUBWFB16(Processor *new_cpu, uint new_opcode, uint address) :
828
SUBWFB(new_cpu,new_opcode,address){}
829
virtual void execute();
831
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
832
{return new SUBWFB16(new_cpu,new_opcode,address);}
835
class SWAPF16 : public SWAPF
838
SWAPF16(Processor *new_cpu, uint new_opcode, uint address) :
839
SWAPF(new_cpu,new_opcode,address){}
840
virtual void execute();
842
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
843
{return new SWAPF16(new_cpu,new_opcode,address);}
846
class TBLRD : public Instruction
849
TBLRD(Processor *new_cpu, uint new_opcode, uint address);
850
virtual void execute();
851
virtual char *name(char *,int);
852
virtual bool isBase() { return true;}
854
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
855
{return new TBLRD(new_cpu,new_opcode,address);}
858
class TBLWT : public Instruction
861
TBLWT(Processor *new_cpu, uint new_opcode, uint address);
862
virtual void execute();
863
virtual char *name(char *,int);
864
virtual bool isBase() { return true;}
866
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
867
{return new TBLWT(new_cpu,new_opcode,address);}
870
class TLRD : public Instruction
873
TLRD(Processor *new_cpu, uint new_opcode, uint address);
874
virtual void execute();
875
virtual char *name(char *,int);
876
virtual bool isBase() { return true;}
878
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
879
{return new TLRD(new_cpu,new_opcode,address);}
882
class TLWT : public Instruction
885
TLWT(Processor *new_cpu, uint new_opcode, uint address);
886
virtual void execute();
887
virtual char *name(char *,int);
888
virtual bool isBase() { return true;}
890
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
891
{return new TLWT(new_cpu,new_opcode,address);}
894
class TSTFSZ : public Register_op
897
TSTFSZ(Processor *new_cpu, uint new_opcode, uint address);
898
virtual void execute();
900
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
901
{return new TSTFSZ(new_cpu,new_opcode,address);}
904
class XORLW16 : public XORLW
907
XORLW16(Processor *new_cpu, uint new_opcode, uint address) :
908
XORLW(new_cpu, new_opcode, address){}
909
virtual void execute();
910
static Instruction *construct(Processor *new_cpu, uint new_opcode, uint address)
911
{return new XORLW16(new_cpu,new_opcode,address);}
914
class XORWF16 : public XORWF
917
XORWF16(Processor *new_cpu, uint new_opcode, uint address)
918
: XORWF(new_cpu,new_opcode, address){}
919
virtual void execute();
920
static Instruction *construct( Processor *new_cpu, uint new_opcode, uint address )
921
{ return new XORWF16(new_cpu,new_opcode,address); }
924
#endif /* __12BIT_INSTRUCTIONS_H__ */