/[gxemul]/upstream/0.3.2/tests/test_unaligned.S
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.3.2/tests/test_unaligned.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (show annotations)
Mon Oct 8 16:18:06 2007 UTC (16 years, 6 months ago) by dpavlin
File size: 985 byte(s)
0.3.2
1 /*
2 * $Id: test_unaligned.S,v 1.1 2005/01/03 00:25:16 debug Exp $
3 *
4 * Instructions: lwl, lwr, ldl, ldr, swl, swr, sdl, sdr
5 */
6
7 .rdata
8 .align 3
9 $NL: .ascii "\n\0"
10
11 .align 4
12 $Yo: .ascii "abcdefghijklmnopqrstuvwxyz"
13
14 .text
15 .align 4
16 .globl testmain
17 .ent testmain
18 testmain:
19 /* Save the return address: */
20 addiu $29,$29,-16
21 sd $31,0($29)
22
23
24 dla $5, $Yo
25 dli $4, 0x1011121314151617
26 lwl $4, 1($5)
27
28 addiu $5, $0, 8
29 jal printhex
30
31 dla $4, $NL
32 jal printstr
33
34
35 dla $5, $Yo
36 dli $4, 0x1011121314151617
37 lwr $4, 1($5)
38
39 addiu $5, $0, 8
40 jal printhex
41
42 dla $4, $NL
43 jal printstr
44
45
46 dla $5, $Yo
47 dli $4, 0x1011121314151617
48 ldl $4, 1($5)
49
50 addiu $5, $0, 8
51 jal printhex
52
53 dla $4, $NL
54 jal printstr
55
56
57 dla $5, $Yo
58 dli $4, 0x1011121314151617
59 ldr $4, 1($5)
60
61 addiu $5, $0, 8
62 jal printhex
63
64 dla $4, $NL
65 jal printstr
66
67
68 /* Return value: */
69 li $2, 0x1212fefe
70
71 /* Restore the return address: */
72 ld $31,0($29)
73 addiu $29,$29,16
74
75 /* ... and return. */
76 jr $31
77
78 .end testmain
79

  ViewVC Help
Powered by ViewVC 1.1.26