Initial revision
[binutils.git] / gas / testsuite / gas / mips / ld.s
blob05ee3c03fe0819f5c906fcf7b6fe61b8ee58944b
1 # Source file used to test the ld macro.
3 .set mips1
5 .data
6 data_label:
7 .extern big_external_data_label,1000
8 .extern small_external_data_label,1
9 .comm big_external_common,1000
10 .comm small_external_common,1
11 .lcomm big_local_common,1000
12 .lcomm small_local_common,1
14 .text
15 ld $4,0
16 ld $4,1
17 ld $4,0x8000
18 ld $4,-0x8000
19 ld $4,0x10000
20 ld $4,0x1a5a5
21 ld $4,0($5)
22 ld $4,1($5)
23 ld $4,0x8000($5)
24 ld $4,-0x8000($5)
25 ld $4,0x10000($5)
26 ld $4,0x1a5a5($5)
27 ld $4,data_label
28 ld $4,big_external_data_label
29 ld $4,small_external_data_label
30 ld $4,big_external_common
31 ld $4,small_external_common
32 ld $4,big_local_common
33 ld $4,small_local_common
34 ld $4,data_label+1
35 ld $4,big_external_data_label+1
36 ld $4,small_external_data_label+1
37 ld $4,big_external_common+1
38 ld $4,small_external_common+1
39 ld $4,big_local_common+1
40 ld $4,small_local_common+1
41 ld $4,data_label+0x8000
42 ld $4,big_external_data_label+0x8000
43 ld $4,small_external_data_label+0x8000
44 ld $4,big_external_common+0x8000
45 ld $4,small_external_common+0x8000
46 ld $4,big_local_common+0x8000
47 ld $4,small_local_common+0x8000
48 ld $4,data_label-0x8000
49 ld $4,big_external_data_label-0x8000
50 ld $4,small_external_data_label-0x8000
51 ld $4,big_external_common-0x8000
52 ld $4,small_external_common-0x8000
53 ld $4,big_local_common-0x8000
54 ld $4,small_local_common-0x8000
55 ld $4,data_label+0x10000
56 ld $4,big_external_data_label+0x10000
57 ld $4,small_external_data_label+0x10000
58 ld $4,big_external_common+0x10000
59 ld $4,small_external_common+0x10000
60 ld $4,big_local_common+0x10000
61 ld $4,small_local_common+0x10000
62 ld $4,data_label+0x1a5a5
63 ld $4,big_external_data_label+0x1a5a5
64 ld $4,small_external_data_label+0x1a5a5
65 ld $4,big_external_common+0x1a5a5
66 ld $4,small_external_common+0x1a5a5
67 ld $4,big_local_common+0x1a5a5
68 ld $4,small_local_common+0x1a5a5
69 ld $4,data_label($5)
70 ld $4,big_external_data_label($5)
71 ld $4,small_external_data_label($5)
72 ld $4,big_external_common($5)
73 ld $4,small_external_common($5)
74 ld $4,big_local_common($5)
75 ld $4,small_local_common($5)
76 ld $4,data_label+1($5)
77 ld $4,big_external_data_label+1($5)
78 ld $4,small_external_data_label+1($5)
79 ld $4,big_external_common+1($5)
80 ld $4,small_external_common+1($5)
81 ld $4,big_local_common+1($5)
82 ld $4,small_local_common+1($5)
83 ld $4,data_label+0x8000($5)
84 ld $4,big_external_data_label+0x8000($5)
85 ld $4,small_external_data_label+0x8000($5)
86 ld $4,big_external_common+0x8000($5)
87 ld $4,small_external_common+0x8000($5)
88 ld $4,big_local_common+0x8000($5)
89 ld $4,small_local_common+0x8000($5)
90 ld $4,data_label-0x8000($5)
91 ld $4,big_external_data_label-0x8000($5)
92 ld $4,small_external_data_label-0x8000($5)
93 ld $4,big_external_common-0x8000($5)
94 ld $4,small_external_common-0x8000($5)
95 ld $4,big_local_common-0x8000($5)
96 ld $4,small_local_common-0x8000($5)
97 ld $4,data_label+0x10000($5)
98 ld $4,big_external_data_label+0x10000($5)
99 ld $4,small_external_data_label+0x10000($5)
100 ld $4,big_external_common+0x10000($5)
101 ld $4,small_external_common+0x10000($5)
102 ld $4,big_local_common+0x10000($5)
103 ld $4,small_local_common+0x10000($5)
104 ld $4,data_label+0x1a5a5($5)
105 ld $4,big_external_data_label+0x1a5a5($5)
106 ld $4,small_external_data_label+0x1a5a5($5)
107 ld $4,big_external_common+0x1a5a5($5)
108 ld $4,small_external_common+0x1a5a5($5)
109 ld $4,big_local_common+0x1a5a5($5)
110 ld $4,small_local_common+0x1a5a5($5)
112 # l.d and s.d are sort of like ld.
113 l.d $f4,0
114 l.d $f4,1
115 l.d $f4,0x8000
116 l.d $f4,-0x8000
117 l.d $f4,0($5)
118 l.d $f4,1($5)
119 l.d $f4,0x8000($5)
120 l.d $f4,-0x8000($5)
121 l.d $f4,small_external_common+0x1a5a5($5)
122 # Little endian will insert a nop here.
123 # We put it in explicitly so that big and little endian are similar.
125 s.d $f4,0
126 s.d $f4,1
127 s.d $f4,0x8000
128 s.d $f4,-0x8000
129 s.d $f4,0($5)
130 s.d $f4,1($5)
131 s.d $f4,0x8000($5)
132 s.d $f4,-0x8000($5)
133 s.d $f4,big_external_common+0x1a5a5($5)
135 # sd is handled like ld. Sanity check it.
136 sd $4,0
138 # Sanity check the -mips3 versions
139 .set mips3
140 ld $4,big_local_common+0x1a5a5($5)
141 sd $4,small_local_common+0x1a5a5($5)
143 # Round to a 16 byte boundary, for ease in testing multiple targets.