1# Load/Store instructions. 2 .data 3foodata: .word 42 4 .text 5footext: 6 7# Load instructions (memory to register). 8 .global loadb 9loadb: 10loadb 0x632, r1 11loadb 0x87632, r2 12loadb 0xffff1234, r3 13loadb 9(r5), r4 14loadb 0(sp), r6 15loadb 0x456(r6), r7 16loadb -0x456(r8), r10 17loadb 0x45678(r13), r12 18loadb -0x4567892(r9), sp 19loadb 0x9(sp)+, ra 20loadb -34(r13)+, r2 21loadb 0x45(r9,r12,2), r13 22loadb -657(r15,r7,1), r14 23 24 .global loadw 25loadw: 26loadw 0632, r1 27loadw 87632, r2 28loadw 0xffff0006, r3 29loadw 2(r15), r4 30loadw 0(sp), r6 31loadw 0456(r6), r7 32loadw -0x7ff(r8), r10 33loadw 456789(r13), r12 34loadw -16777216(r9), sp 35loadw 010(r2)+, ra 36loadw -0x34(r13)+, r2 37loadw 045(r9,r12,4), r13 38loadw -0x6657(r15,r7,8), r14 39 40 .global loadd 41loadd: 42loadd 0xfff1, r1 43loadd 0xffefffef, r2 44loadd 0xffff1234, r3 45loadd 10(r0), r4 46loadd 0(sp), r6 47loadd 0x100(r6), r7 48loadd -0x100(r8), r10 49loadd 0220000(r13), r12 50loadd -014400000(r9), sp 51loadd 07(sp)+, ra 52loadd -50(ra)+, r2 53loadd 45(r9,r12,2), r13 54loadd -0657(r15,r7,1), r14 55 56# Store instructions (register/immediate to memory). 57 .global storb 58storb: 59storb r1, 0x632 60storb r2, 0x87632 61storb r3, 0xffff1234 62storb r4, 9(r5) 63storb r6, 0(sp) 64storb r7, 0x456(r6) 65storb r10, -0x456(r8) 66storb r12, 0x45678(r13) 67storb sp, -0x4567892(r9) 68storb ra, 0x9(sp)+ 69storb r2, -34(r13)+ 70storb r13, 0x45(r9,r12,2) 71storb r14, -657(r15,r7,1) 72storb $5, 9(r4) 73storb $15, -0xfed(r3) 74 75 .global storw 76storw: 77storw r1, 0632 78storw r2, 87632 79storw r3, 0xffff0006 80storw r4, 2(r15) 81storw r6, 0(sp) 82storw r7, 0456(r6) 83storw r10, -0x7ff(r8) 84storw r12, 456789(r13) 85storw sp, -16777216(r9) 86storw ra, 010(r2)+ 87storw r2, -0x34(r13)+ 88storw r13, 045(r9,r12,4) 89storw r14, -0x6657(r15,r7,8) 90storw $01, 0x632 91storw $0x7, 0x87632 92 93 .global stord 94stord: 95stord r1, 0xfff1 96stord r2, 0xffefffef 97stord r3, 0xffff0001 98stord r4, 10(r0) 99stord r6, 0(sp) 100stord r7, 0x100(r6) 101stord r10, -0x100(r8) 102stord r12, 0220000(r13) 103stord sp, -014400000(r9) 104stord ra, 07(sp)+ 105stord r2, -50(ra)+ 106stord r13, 45(r9,r12,2) 107stord r14, -0657(r15,r7,1) 108stord $0xf, 05(r10)+ 109stord $0x0, -034(r11)+ 110 111