! !Purpose: !This program tests if the assembler can recognize !all instruction formats in pass 2. !Description: !A representative operation is choosen for each instruction type. !All the instruction formats of this operation are applied. .section ".text" label: !Arithmetic Instructions add %r1, %r2, %r3 add %r1, 2, %r3 !Logical Instructions and %r1, %r2, %r3 and %r1, 2, %r3 !Shift Instructions sll %r1, %r2, %r3 sll %r1, 2, %r3 !Load Instructions ld [%r1 + %r2], %r3 ld [%r1 + 2], %r3 ld [%r1 - 2], %r3 ld [%r1], %r3 !Store Instructions st %r3, [%r1 + %r2] st %r3, [%r1 + 2] st %r3, [%r1 - 2] st %r3, [%r1] !Branch Instructions ba label nop !Trap instructions ta %r1 + %r2 ta %r1 + 2 ta %r1 - 2 ta %r1 !Control Instructions call label nop jmpl %r1 + %r2, %r3 rett %r1 + %r2 jmpl %r1 + 2, %r3 rett %r1 + 2 jmpl %r1 - 2, %r3 rett %r1 - 2 jmpl %r1, %r3 rett %r1 sethi 2, %r3 save %r1, %r2, %r3 save %r1, 2, %r3 restore %r1, %r2, %r3 restore %r1, 2, %r3