! !Purpose: !This program tests if the assembler can recognize !all instruction opcodes in pass 2. !Description: !All types of instruction opcodes are used in the .text section. !Basic instruction formats, basic register names, !and, if necessary, the simplest expressions are used. .section ".text" label: !Arithmetic Instructions add %r1, %r2, %r3 addcc %r1, %r2, %r3 addx %r1, %r2, %r3 addxcc %r1, %r2, %r3 sub %r1, %r2, %r3 subcc %r1, %r2, %r3 subx %r1, %r2, %r3 subxcc %r1, %r2, %r3 mulscc %r1, %r2, %r3 !Logical Instructions and %r1, %r2, %r3 andcc %r1, %r2, %r3 andn %r1, %r2, %r3 andncc %r1, %r2, %r3 or %r1, %r2, %r3 orcc %r1, %r2, %r3 orn %r1, %r2, %r3 orncc %r1, %r2, %r3 xor %r1, %r2, %r3 xorcc %r1, %r2, %r3 xnor %r1, %r2, %r3 xnorcc %r1, %r2, %r3 !Shift Instructions sll %r1, %r2, %r3 srl %r1, %r2, %r3 sra %r1, %r2, %r3 !Load Instructions ldub [%r1 + %r2], %r3 ldsb [%r1 + %r2], %r3 lduh [%r1 + %r2], %r3 ldsh [%r1 + %r2], %r3 ld [%r1 + %r2], %r3 ldd [%r1 + %r2], %r4 swap [%r1 + %r2], %r3 !Store Instructions stb %r3, [%r1 + %r2] sth %r3, [%r1 + %r2] st %r3, [%r1 + %r2] std %r4, [%r1 + %r2] !Branch Instructions ba label nop bn label nop be label nop bne label nop bl label nop ble label nop bge label nop bg label nop blu label nop bleu label nop bgeu label nop bgu label nop bpos label nop bneg label nop bcs label nop bcc label nop bvs label nop bvc label nop !Trap Instructions ta %r1 + %r2 !Control Instructions call label nop jmpl %r1 + %r2, %r3 rett %r1 + %r2 sethi 2, %r3 save %r1, %r2, %r3 restore %r1, %r2, %r3