Home | History | Annotate | Download | only in pdp11
      1 # Opcode test for PDP-11.
      2 # Copyright (C) 2002-2016 Free Software Foundation, Inc.
      3 #
      4 # This file is free software; you can redistribute it and/or modify
      5 # it under the terms of the GNU General Public License as published by
      6 # the Free Software Foundation; either version 3 of the License, or
      7 # (at your option) any later version.
      8 #
      9 # This program is distributed in the hope that it will be useful,
     10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
     11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12 # GNU General Public License for more details.
     13 #
     14 # You should have received a copy of the GNU General Public License
     15 # along with this program; if not, write to the Free Software
     16 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
     17 # MA 02110-1301, USA.
     18 
     19 foo:	.word	0
     20 bar:	.word	foo
     21 
     22 start:	halt
     23 start2:	wait
     24 	rti
     25 	bpt
     26 	iot
     27 	reset
     28 	rtt
     29 	mfpt
     30 	jmp	(r1)+
     31 	rts	r2
     32 	spl	3
     33 	nop
     34 	clc
     35 	clv
     36 	clz
     37 	cln
     38 	ccc
     39 	sec
     40 	sev
     41 	sez
     42 	sen
     43 	scc
     44 	swab	pc
     45 1:	br	1b
     46 	bne	1b
     47 	beq	1b
     48 	bge	1b
     49 	blt	1b
     50 	bgt	1b
     51 	ble	1b
     52 	jsr	pc,@(sp)+
     53 	clr	-(sp)
     54 	com	r0
     55 	inc	r1
     56 	dec	r2
     57 	neg	r3
     58 	adc	r4
     59 	sbc	r5
     60 	tst	(sp)+
     61 	ror	r5
     62 	rol	r4
     63 	asr	@10(r4)
     64 	asl	4(r5)
     65 	mark	2
     66 	mfpi	sp
     67 	mtpi	@$402
     68 	sxt	r3
     69 	csm	2(r4)
     70 	tstset	(r3)
     71 	wrtlck	2(r4)
     72 	mov	r0,r1
     73 	cmp	(r0),(r4)
     74 	bit	(r0)+,-(r3)
     75 	bic	foo,@bar
     76 	bis	@(r1)+,@-(r5)
     77 	add	4(r3),@6(r3)
     78 	mul	$10,r2
     79 	div	1b,r4
     80 	ash	$3,r4
     81 	ashc	$7,r2
     82 	xor	r3,10(sp)
     83 	fadd	r2
     84 	fsub	r1
     85 	fmul	r4
     86 	fdiv	r0
     87 	l2dr	r1
     88 	movc
     89 	movrc
     90 	movtc
     91 	locc
     92 	skpc
     93 	scanc
     94 	spanc
     95 	cmpc
     96 	matc
     97 	addn
     98 	subn
     99 	cmpn
    100 	cvtnl
    101 	cvtpn
    102 	cvtnp
    103 	ashn
    104 	cvtln
    105 	l3dr	r5
    106 	addp
    107 	subp
    108 	cmpp
    109 	cvtpl
    110 	mulp
    111 	divp
    112 	ashp
    113 	cvtlp
    114 	movci
    115 	movrci
    116 	movtci
    117 	locci
    118 	skpci
    119 	scanci
    120 	spanci
    121 	cmpci
    122 	matci
    123 	addni
    124 	subni
    125 	cmpni
    126 	cvtnli
    127 	cvtpni
    128 	cvtnpi
    129 	ashni
    130 	cvtlni
    131 	addpi
    132 	subpi
    133 	cmppi
    134 	cvtpli
    135 	mulpi
    136 	divpi
    137 	ashpi
    138 	cvtlpi
    139 	med
    140 2:	xfc	42
    141 	sob	r0,2b
    142 	bpl	2b
    143 	bmi	2b
    144 	bhi	2b
    145 	blos	2b
    146 	bvc	2b
    147 	bvs	2b
    148 	bcc	2b
    149 	bcs	2b
    150 	emt	69
    151 	sys	42
    152 	clrb	(r3)
    153 	comb	@-(r5)
    154 	incb	@(sp)+
    155 	decb	r3
    156 	negb	foo
    157 	adcb	@bar
    158 	sbcb	-(r2)
    159 	tstb	(r4)+
    160 	rorb	r1
    161 	rolb	r2
    162 	asrb	r3
    163 	aslb	r4
    164 	mtps	$0340
    165 	mfpd	sp
    166 	mtpd	(r0)
    167 	mfps	-(sp)
    168 	movb	$17,foo
    169 	cmpb	r1,(r2)
    170 	bitb	$0117,r5
    171 	bicb	$1,bar
    172 	bisb	$2,@bar
    173 	sub	r0,r5
    174 	cfcc
    175 	setf
    176 	seti
    177 	ldub
    178 	setd
    179 	setl
    180 	ldfps	$1
    181 	stfps	-(sp)
    182 	stst	(r2)
    183 	clrf	ac3
    184 	tstf	ac1
    185 	absf	ac2
    186 	negf	ac0
    187 	mulf	$0f0.25,ac1
    188 	modf	ac5,ac0
    189 	addf	foo,ac2
    190 	ldf	@bar,ac1
    191 	subf	ac4,ac3
    192 	cmpf	ac5,ac2
    193 	stf	ac1,-(sp)
    194 	divf	$0f20.0,ac0
    195 	stexp	ac2,r5
    196 	stcfi	ac3,r0
    197 	stcff	ac3,ac5
    198 	ldexp	r0,ac2
    199 	ldcif	r2,ac3
    200 	ldcff	ac5,ac2
    201 
    202 # aliases for some of these opcodes:
    203 
    204 	l2d	r1
    205 3:	l3d	r4
    206 	bhis	3b
    207 	blo	3b
    208 	trap	99
    209 	clrd	ac3
    210 	tstd	ac2
    211 	absd	ac1
    212 	negd	ac0
    213 	muld	ac5,ac2
    214 	modd	ac4,ac0
    215 	addd	ac4,ac3
    216 	ldd	bar,ac0
    217 	subd	foo,ac2
    218 	cmpd	ac5,ac2
    219 	std	ac1,(r2)
    220 	divd	(sp)+,ac3
    221 	stcfl	ac2,r5
    222 	stcdi	ac3,r0
    223 	stcdl	ac2,r4
    224 	stcfd	ac2,ac5
    225 	stcdf	ac1,ac4
    226 	ldcid	r0,ac1
    227 	ldclf	r4,ac2
    228 	ldcld	$01234567,ac3
    229 	ldcfd	ac5,ac2
    230 	ldcdf	ac4,ac0
    231