6 .macro test insn text=""
13 test addc "r1,r2" // A double forward slash starts a line comment
14 test addi "r3, 1" # So does a hash
15 test addu "r4, r5" // White space between operands should be ignored
16 test and "r6,r7" ; test andi "r8,2" // A semicolon separates statements
18 test asr "r11, R12" // Uppercase R is allowed as a register prefix
23 test bgeni "sp, 7" // r0 can also be referred to as 'sp'
24 test BGENI "r0, 8" // Officially upper case or mixed case
25 test BGENi "r0, 31" // mnemonics should not be allowed, but we relax this...
30 test br . // Dot means the current address
67 test ld.h "r5 , ( r6, 2)"
68 test ld.w "r7, (r8, 0x4)"
69 test ldb "r9,(r10,0xf)"
70 test ldh "r11, (r12, 30)"
71 test ld "r13, (r14, 20)"
72 test ldw "r13, (r14, 60)"
73 test ldm "r2-r15,(r0)"
77 test loopt "r8, fooloop"
78 test LRW "r9, [foolit]"
79 test lrw "r9, 0x4321" // PC rel indirect
85 .literals // Dump literals table
116 test st.b "r8, (r9, 0)"
117 test st.h "r10, (r11, 2)"
118 test st.w "r12, (r13, 4)"
119 test stb "r14, (r15, 15)"
120 test sth "r0, (r1, 30)"
121 test stw "r2, (r3, 0x3c)"
122 test st "r4, (r5, 0)"
123 test stm "r14 - r15 , (r0)"
125 test stq "r4 - r7 , (r1)"
144 clrc // These two instructions pad the object file
145 clrc // out to a 16 byte boundary.