| 1 | // Copyright 2013 The Go Authors. All rights reserved. |
|---|---|
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // +build arm |
| 6 | |
| 7 | TEXT ·arg1(SB),0,$0-2 |
| 8 | MOVB x+0(FP), AX |
| 9 | MOVB y+1(FP), BX |
| 10 | MOVH x+0(FP), AX // want `\[arm\] arg1: invalid MOVH of x\+0\(FP\); int8 is 1-byte value` |
| 11 | MOVH y+1(FP), AX // want `invalid MOVH of y\+1\(FP\); uint8 is 1-byte value` |
| 12 | MOVW x+0(FP), AX // want `invalid MOVW of x\+0\(FP\); int8 is 1-byte value` |
| 13 | MOVW y+1(FP), AX // want `invalid MOVW of y\+1\(FP\); uint8 is 1-byte value` |
| 14 | MOVB x+1(FP), AX // want `invalid offset x\+1\(FP\); expected x\+0\(FP\)` |
| 15 | MOVB y+2(FP), AX // want `invalid offset y\+2\(FP\); expected y\+1\(FP\)` |
| 16 | MOVB 8(R13), AX // want `8\(R13\) should be x\+0\(FP\)` |
| 17 | MOVB 9(R13), AX // want `9\(R13\) should be y\+1\(FP\)` |
| 18 | MOVB 10(R13), AX // want `use of 10\(R13\) points beyond argument frame` |
| 19 | RET |
| 20 | |
| 21 | TEXT ·arg2(SB),0,$0-4 |
| 22 | MOVB x+0(FP), AX // want `arg2: invalid MOVB of x\+0\(FP\); int16 is 2-byte value` |
| 23 | MOVB y+2(FP), AX // want `invalid MOVB of y\+2\(FP\); uint16 is 2-byte value` |
| 24 | MOVH x+0(FP), AX |
| 25 | MOVH y+2(FP), BX |
| 26 | MOVW x+0(FP), AX // want `invalid MOVW of x\+0\(FP\); int16 is 2-byte value` |
| 27 | MOVW y+2(FP), AX // want `invalid MOVW of y\+2\(FP\); uint16 is 2-byte value` |
| 28 | MOVH x+2(FP), AX // want `invalid offset x\+2\(FP\); expected x\+0\(FP\)` |
| 29 | MOVH y+0(FP), AX // want `invalid offset y\+0\(FP\); expected y\+2\(FP\)` |
| 30 | RET |
| 31 | |
| 32 | TEXT ·arg4(SB),0,$0-2 // want `arg4: wrong argument size 2; expected \$\.\.\.-8` |
| 33 | MOVB x+0(FP), AX // want `invalid MOVB of x\+0\(FP\); int32 is 4-byte value` |
| 34 | MOVB y+4(FP), BX // want `invalid MOVB of y\+4\(FP\); uint32 is 4-byte value` |
| 35 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); int32 is 4-byte value` |
| 36 | MOVH y+4(FP), AX // want `invalid MOVH of y\+4\(FP\); uint32 is 4-byte value` |
| 37 | MOVW x+0(FP), AX |
| 38 | MOVW y+4(FP), AX |
| 39 | MOVW x+4(FP), AX // want `invalid offset x\+4\(FP\); expected x\+0\(FP\)` |
| 40 | MOVW y+2(FP), AX // want `invalid offset y\+2\(FP\); expected y\+4\(FP\)` |
| 41 | RET |
| 42 | |
| 43 | TEXT ·arg8(SB),7,$0-2 // want `wrong argument size 2; expected \$\.\.\.-16` |
| 44 | MOVB x+0(FP), AX // want `invalid MOVB of x\+0\(FP\); int64 is 8-byte value` |
| 45 | MOVB y+8(FP), BX // want `invalid MOVB of y\+8\(FP\); uint64 is 8-byte value` |
| 46 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); int64 is 8-byte value` |
| 47 | MOVH y+8(FP), AX // want `invalid MOVH of y\+8\(FP\); uint64 is 8-byte value` |
| 48 | MOVW x+0(FP), AX // want `invalid MOVW of x\+0\(FP\); int64 is 8-byte value containing x_lo\+0\(FP\) and x_hi\+4\(FP\)` |
| 49 | MOVW x_lo+0(FP), AX |
| 50 | MOVW x_hi+4(FP), AX |
| 51 | MOVW y+8(FP), AX // want `invalid MOVW of y\+8\(FP\); uint64 is 8-byte value containing y_lo\+8\(FP\) and y_hi\+12\(FP\)` |
| 52 | MOVW y_lo+8(FP), AX |
| 53 | MOVW y_hi+12(FP), AX |
| 54 | MOVQ x+0(FP), AX |
| 55 | MOVQ y+8(FP), AX |
| 56 | MOVQ x+8(FP), AX // want `invalid offset x\+8\(FP\); expected x\+0\(FP\)` |
| 57 | MOVQ y+2(FP), AX // want `invalid offset y\+2\(FP\); expected y\+8\(FP\)` |
| 58 | RET |
| 59 | |
| 60 | TEXT ·argint(SB),0,$0-2 // want `wrong argument size 2; expected \$\.\.\.-8` |
| 61 | MOVB x+0(FP), AX // want `invalid MOVB of x\+0\(FP\); int is 4-byte value` |
| 62 | MOVB y+4(FP), BX // want `invalid MOVB of y\+4\(FP\); uint is 4-byte value` |
| 63 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); int is 4-byte value` |
| 64 | MOVH y+4(FP), AX // want `invalid MOVH of y\+4\(FP\); uint is 4-byte value` |
| 65 | MOVW x+0(FP), AX |
| 66 | MOVW y+4(FP), AX |
| 67 | MOVQ x+4(FP), AX // want `invalid offset x\+4\(FP\); expected x\+0\(FP\)` |
| 68 | MOVQ y+2(FP), AX // want `invalid offset y\+2\(FP\); expected y\+4\(FP\)` |
| 69 | RET |
| 70 | |
| 71 | TEXT ·argptr(SB),7,$0-2 // want `wrong argument size 2; expected \$\.\.\.-20` |
| 72 | MOVB x+0(FP), AX // want `invalid MOVB of x\+0\(FP\); \*byte is 4-byte value` |
| 73 | MOVB y+4(FP), BX // want `invalid MOVB of y\+4\(FP\); \*byte is 4-byte value` |
| 74 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); \*byte is 4-byte value` |
| 75 | MOVH y+4(FP), AX // want `invalid MOVH of y\+4\(FP\); \*byte is 4-byte value` |
| 76 | MOVW x+0(FP), AX |
| 77 | MOVW y+4(FP), AX |
| 78 | MOVQ x+4(FP), AX // want `invalid offset x\+4\(FP\); expected x\+0\(FP\)` |
| 79 | MOVQ y+2(FP), AX // want `invalid offset y\+2\(FP\); expected y\+4\(FP\)` |
| 80 | MOVH c+8(FP), AX // want `invalid MOVH of c\+8\(FP\); chan int is 4-byte value` |
| 81 | MOVH m+12(FP), AX // want `invalid MOVH of m\+12\(FP\); map\[int\]int is 4-byte value` |
| 82 | MOVH f+16(FP), AX // want `invalid MOVH of f\+16\(FP\); func\(\) is 4-byte value` |
| 83 | RET |
| 84 | |
| 85 | TEXT ·argstring(SB),0,$16 // want `wrong argument size 0; expected \$\.\.\.-16` |
| 86 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); string base is 4-byte value` |
| 87 | MOVW x+0(FP), AX |
| 88 | MOVH x_base+0(FP), AX // want `invalid MOVH of x_base\+0\(FP\); string base is 4-byte value` |
| 89 | MOVW x_base+0(FP), AX |
| 90 | MOVH x_len+0(FP), AX // want `invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)` |
| 91 | MOVW x_len+0(FP), AX // want `invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)` |
| 92 | MOVQ x_len+0(FP), AX // want `invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)` |
| 93 | MOVH x_len+4(FP), AX // want `invalid MOVH of x_len\+4\(FP\); string len is 4-byte value` |
| 94 | MOVW x_len+4(FP), AX |
| 95 | MOVQ y+0(FP), AX // want `invalid offset y\+0\(FP\); expected y\+8\(FP\)` |
| 96 | MOVQ y_len+4(FP), AX // want `invalid offset y_len\+4\(FP\); expected y_len\+12\(FP\)` |
| 97 | RET |
| 98 | |
| 99 | TEXT ·argslice(SB),0,$24 // want `wrong argument size 0; expected \$\.\.\.-24` |
| 100 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); slice base is 4-byte value` |
| 101 | MOVW x+0(FP), AX |
| 102 | MOVH x_base+0(FP), AX // want `invalid MOVH of x_base\+0\(FP\); slice base is 4-byte value` |
| 103 | MOVW x_base+0(FP), AX |
| 104 | MOVH x_len+0(FP), AX // want `invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)` |
| 105 | MOVW x_len+0(FP), AX // want `invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)` |
| 106 | MOVQ x_len+0(FP), AX // want `invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)` |
| 107 | MOVH x_len+4(FP), AX // want `invalid MOVH of x_len\+4\(FP\); slice len is 4-byte value` |
| 108 | MOVW x_len+4(FP), AX |
| 109 | MOVH x_cap+0(FP), AX // want `invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)` |
| 110 | MOVW x_cap+0(FP), AX // want `invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)` |
| 111 | MOVQ x_cap+0(FP), AX // want `invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)` |
| 112 | MOVH x_cap+8(FP), AX // want `invalid MOVH of x_cap\+8\(FP\); slice cap is 4-byte value` |
| 113 | MOVW x_cap+8(FP), AX |
| 114 | MOVQ y+0(FP), AX // want `invalid offset y\+0\(FP\); expected y\+12\(FP\)` |
| 115 | MOVQ y_len+4(FP), AX // want `invalid offset y_len\+4\(FP\); expected y_len\+16\(FP\)` |
| 116 | MOVQ y_cap+8(FP), AX // want `invalid offset y_cap\+8\(FP\); expected y_cap\+20\(FP\)` |
| 117 | RET |
| 118 | |
| 119 | TEXT ·argiface(SB),0,$0-16 |
| 120 | MOVH x+0(FP), AX // want `invalid MOVH of x\+0\(FP\); interface type is 4-byte value` |
| 121 | MOVW x+0(FP), AX |
| 122 | MOVH x_type+0(FP), AX // want `invalid MOVH of x_type\+0\(FP\); interface type is 4-byte value` |
| 123 | MOVW x_type+0(FP), AX |
| 124 | MOVQ x_itable+0(FP), AX // want `unknown variable x_itable; offset 0 is x_type\+0\(FP\)` |
| 125 | MOVQ x_itable+1(FP), AX // want `unknown variable x_itable; offset 1 is x_type\+0\(FP\)` |
| 126 | MOVH x_data+0(FP), AX // want `invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)` |
| 127 | MOVW x_data+0(FP), AX // want `invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)` |
| 128 | MOVQ x_data+0(FP), AX // want `invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)` |
| 129 | MOVH x_data+4(FP), AX // want `invalid MOVH of x_data\+4\(FP\); interface data is 4-byte value` |
| 130 | MOVW x_data+4(FP), AX |
| 131 | MOVH y+8(FP), AX // want `invalid MOVH of y\+8\(FP\); interface itable is 4-byte value` |
| 132 | MOVW y+8(FP), AX |
| 133 | MOVH y_itable+8(FP), AX // want `invalid MOVH of y_itable\+8\(FP\); interface itable is 4-byte value` |
| 134 | MOVW y_itable+8(FP), AX |
| 135 | MOVQ y_type+8(FP), AX // want `unknown variable y_type; offset 8 is y_itable\+8\(FP\)` |
| 136 | MOVH y_data+8(FP), AX // want `invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)` |
| 137 | MOVW y_data+8(FP), AX // want `invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)` |
| 138 | MOVQ y_data+8(FP), AX // want `invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)` |
| 139 | MOVH y_data+12(FP), AX // want `invalid MOVH of y_data\+12\(FP\); interface data is 4-byte value` |
| 140 | MOVW y_data+12(FP), AX |
| 141 | RET |
| 142 | |
| 143 | TEXT ·returnint(SB),0,$0-4 |
| 144 | MOVB AX, ret+0(FP) // want `invalid MOVB of ret\+0\(FP\); int is 4-byte value` |
| 145 | MOVH AX, ret+0(FP) // want `invalid MOVH of ret\+0\(FP\); int is 4-byte value` |
| 146 | MOVW AX, ret+0(FP) |
| 147 | MOVQ AX, ret+1(FP) // want `invalid offset ret\+1\(FP\); expected ret\+0\(FP\)` |
| 148 | MOVQ AX, r+0(FP) // want `unknown variable r; offset 0 is ret\+0\(FP\)` |
| 149 | RET |
| 150 | |
| 151 | TEXT ·returnbyte(SB),0,$0-5 |
| 152 | MOVW x+0(FP), AX |
| 153 | MOVB AX, ret+4(FP) |
| 154 | MOVH AX, ret+4(FP) // want `invalid MOVH of ret\+4\(FP\); byte is 1-byte value` |
| 155 | MOVW AX, ret+4(FP) // want `invalid MOVW of ret\+4\(FP\); byte is 1-byte value` |
| 156 | MOVB AX, ret+3(FP) // want `invalid offset ret\+3\(FP\); expected ret\+4\(FP\)` |
| 157 | RET |
| 158 | |
| 159 | TEXT ·returnnamed(SB),0,$0-21 |
| 160 | MOVB x+0(FP), AX |
| 161 | MOVW AX, r1+4(FP) |
| 162 | MOVH AX, r2+8(FP) |
| 163 | MOVW AX, r3+12(FP) |
| 164 | MOVW AX, r3_base+12(FP) |
| 165 | MOVW AX, r3_len+16(FP) |
| 166 | MOVB AX, r4+20(FP) |
| 167 | MOVB AX, r1+4(FP) // want `invalid MOVB of r1\+4\(FP\); int is 4-byte value` |
| 168 | RET |
| 169 | |
| 170 | TEXT ·returnintmissing(SB),0,$0-4 |
| 171 | RET // want `RET without writing to 4-byte ret\+0\(FP\)` |
| 172 | |
| 173 | TEXT ·leaf(SB),0,$-4-12 |
| 174 | MOVW x+0(FP), AX |
| 175 | MOVW y+4(FP), AX |
| 176 | MOVW AX, ret+8(FP) |
| 177 | RET |
| 178 | |
| 179 | TEXT ·noframe1(SB),0,$0-4 |
| 180 | MOVW 0(R13), AX // Okay; our saved LR |
| 181 | MOVW 4(R13), AX // Okay; caller's saved LR |
| 182 | MOVW x+8(R13), AX // Okay; x argument |
| 183 | MOVW 12(R13), AX // want `use of 12\(R13\) points beyond argument frame` |
| 184 | RET |
| 185 | |
| 186 | TEXT ·noframe2(SB),NOFRAME,$0-4 |
| 187 | MOVW 0(R13), AX // Okay; caller's saved LR |
| 188 | MOVW x+4(R13), AX // Okay; x argument |
| 189 | MOVW 8(R13), AX // Okay - NOFRAME is assumed special |
| 190 | MOVW 12(R13), AX // Okay - NOFRAME is assumed special |
| 191 | RET |
| 192 |
Members