Home | History | Annotate | Download | only in testdata
      1 // Copyright 2016 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 mipsle
      6 // +build vet_test
      7 
      8 TEXT arg1(SB),0,$0-2
      9 	MOVB	x+0(FP), R1
     10 	MOVBU	y+1(FP), R2
     11 	MOVH	x+0(FP), R1 // ERROR "\[mipsle\] arg1: invalid MOVH of x\+0\(FP\); int8 is 1-byte value"
     12 	MOVHU	y+1(FP), R1 // ERROR "invalid MOVHU of y\+1\(FP\); uint8 is 1-byte value"
     13 	MOVW	x+0(FP), R1 // ERROR "invalid MOVW of x\+0\(FP\); int8 is 1-byte value"
     14 	MOVWU	y+1(FP), R1 // ERROR "invalid MOVWU of y\+1\(FP\); uint8 is 1-byte value"
     15 	MOVW	y+1(FP), R1 // ERROR "invalid MOVW of y\+1\(FP\); uint8 is 1-byte value"
     16 	MOVB	x+1(FP), R1 // ERROR "invalid offset x\+1\(FP\); expected x\+0\(FP\)"
     17 	MOVBU	y+2(FP), R1 // ERROR "invalid offset y\+2\(FP\); expected y\+1\(FP\)"
     18 	MOVB	8(R29), R1 // ERROR "8\(R29\) should be x\+0\(FP\)"
     19 	MOVB	9(R29), R1 // ERROR "9\(R29\) should be y\+1\(FP\)"
     20 	MOVB	10(R29), R1 // ERROR "use of 10\(R29\) points beyond argument frame"
     21 	RET
     22 
     23 TEXT arg2(SB),0,$0-4
     24 	MOVBU	x+0(FP), R1 // ERROR "arg2: invalid MOVBU of x\+0\(FP\); int16 is 2-byte value"
     25 	MOVB	y+2(FP), R1 // ERROR "invalid MOVB of y\+2\(FP\); uint16 is 2-byte value"
     26 	MOVHU	x+0(FP), R1
     27 	MOVH	y+2(FP), R2
     28 	MOVWU	x+0(FP), R1 // ERROR "invalid MOVWU of x\+0\(FP\); int16 is 2-byte value"
     29 	MOVW	y+2(FP), R1 // ERROR "invalid MOVW of y\+2\(FP\); uint16 is 2-byte value"
     30 	MOVHU	x+2(FP), R1 // ERROR "invalid offset x\+2\(FP\); expected x\+0\(FP\)"
     31 	MOVH	y+0(FP), R1 // ERROR "invalid offset y\+0\(FP\); expected y\+2\(FP\)"
     32 	RET
     33 
     34 TEXT arg4(SB),0,$0-2 // ERROR "arg4: wrong argument size 2; expected \$\.\.\.-8"
     35 	MOVB	x+0(FP), R1 // ERROR "invalid MOVB of x\+0\(FP\); int32 is 4-byte value"
     36 	MOVB	y+4(FP), R2 // ERROR "invalid MOVB of y\+4\(FP\); uint32 is 4-byte value"
     37 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); int32 is 4-byte value"
     38 	MOVH	y+4(FP), R1 // ERROR "invalid MOVH of y\+4\(FP\); uint32 is 4-byte value"
     39 	MOVW	x+0(FP), R1
     40 	MOVW	y+4(FP), R1
     41 	MOVW	x+4(FP), R1 // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
     42 	MOVW	y+2(FP), R1 // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
     43 	RET
     44 
     45 TEXT arg8(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-16"
     46 	MOVB	x+0(FP), R1 // ERROR "invalid MOVB of x\+0\(FP\); int64 is 8-byte value"
     47 	MOVB	y+8(FP), R2 // ERROR "invalid MOVB of y\+8\(FP\); uint64 is 8-byte value"
     48 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); int64 is 8-byte value"
     49 	MOVH	y+8(FP), R1 // ERROR "invalid MOVH of y\+8\(FP\); uint64 is 8-byte value"
     50 	MOVW	x+0(FP), R1 // ERROR "invalid MOVW of x\+0\(FP\); int64 is 8-byte value containing x_lo\+0\(FP\) and x_hi\+4\(FP\)"
     51 	MOVW	x_lo+0(FP), R1
     52 	MOVW	x_hi+4(FP), R1
     53 	MOVW	y+8(FP), R1 // ERROR "invalid MOVW of y\+8\(FP\); uint64 is 8-byte value containing y_lo\+8\(FP\) and y_hi\+12\(FP\)"
     54 	MOVW	y_lo+8(FP),  R1
     55 	MOVW	y_hi+12(FP), R1
     56 	RET
     57 
     58 TEXT argint(SB),0,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-8"
     59 	MOVB	x+0(FP), R1 // ERROR "invalid MOVB of x\+0\(FP\); int is 4-byte value"
     60 	MOVB	y+4(FP), R2 // ERROR "invalid MOVB of y\+4\(FP\); uint is 4-byte value"
     61 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); int is 4-byte value"
     62 	MOVH	y+4(FP), R1 // ERROR "invalid MOVH of y\+4\(FP\); uint is 4-byte value"
     63 	MOVW	x+0(FP), R1
     64 	MOVW	y+4(FP), R1
     65 	MOVW	x+4(FP), R1 // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
     66 	MOVW	y+2(FP), R1 // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
     67 	RET
     68 
     69 TEXT argptr(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-20"
     70 	MOVB	x+0(FP), R1 // ERROR "invalid MOVB of x\+0\(FP\); \*byte is 4-byte value"
     71 	MOVB	y+4(FP), R2 // ERROR "invalid MOVB of y\+4\(FP\); \*byte is 4-byte value"
     72 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); \*byte is 4-byte value"
     73 	MOVH	y+4(FP), R1 // ERROR "invalid MOVH of y\+4\(FP\); \*byte is 4-byte value"
     74 	MOVW	x+0(FP), R1
     75 	MOVW	y+4(FP), R1
     76 	MOVW	x+4(FP), R1 // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
     77 	MOVW	y+2(FP), R1 // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
     78 	MOVH	c+8(FP), R1 // ERROR "invalid MOVH of c\+8\(FP\); chan int is 4-byte value"
     79 	MOVH	m+12(FP), R1 // ERROR "invalid MOVH of m\+12\(FP\); map\[int\]int is 4-byte value"
     80 	MOVH	f+16(FP), R1 // ERROR "invalid MOVH of f\+16\(FP\); func\(\) is 4-byte value"
     81 	RET
     82 
     83 TEXT argstring(SB),0,$16 // ERROR "wrong argument size 0; expected \$\.\.\.-16"
     84 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); string base is 4-byte value"
     85 	MOVW	x+0(FP), R1
     86 	MOVH	x_base+0(FP), R1 // ERROR "invalid MOVH of x_base\+0\(FP\); string base is 4-byte value"
     87 	MOVW	x_base+0(FP), R1
     88 	MOVH	x_len+0(FP), R1 // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
     89 	MOVW	x_len+0(FP), R1 // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
     90 	MOVH	x_len+4(FP), R1 // ERROR "invalid MOVH of x_len\+4\(FP\); string len is 4-byte value"
     91 	MOVW	x_len+4(FP), R1
     92 	MOVW	y+0(FP), R1 // ERROR "invalid offset y\+0\(FP\); expected y\+8\(FP\)"
     93 	MOVW	y_len+4(FP), R1 // ERROR "invalid offset y_len\+4\(FP\); expected y_len\+12\(FP\)"
     94 	RET
     95 
     96 TEXT argslice(SB),0,$24 // ERROR "wrong argument size 0; expected \$\.\.\.-24"
     97 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); slice base is 4-byte value"
     98 	MOVW	x+0(FP), R1
     99 	MOVH	x_base+0(FP), R1 // ERROR "invalid MOVH of x_base\+0\(FP\); slice base is 4-byte value"
    100 	MOVW	x_base+0(FP), R1
    101 	MOVH	x_len+0(FP), R1 // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
    102 	MOVW	x_len+0(FP), R1 // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
    103 	MOVH	x_len+4(FP), R1 // ERROR "invalid MOVH of x_len\+4\(FP\); slice len is 4-byte value"
    104 	MOVW	x_len+4(FP), R1
    105 	MOVH	x_cap+0(FP), R1 // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
    106 	MOVW	x_cap+0(FP), R1 // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
    107 	MOVH	x_cap+8(FP), R1 // ERROR "invalid MOVH of x_cap\+8\(FP\); slice cap is 4-byte value"
    108 	MOVW	x_cap+8(FP), R1
    109 	MOVW	y+0(FP), R1 // ERROR "invalid offset y\+0\(FP\); expected y\+12\(FP\)"
    110 	MOVW	y_len+4(FP), R1 // ERROR "invalid offset y_len\+4\(FP\); expected y_len\+16\(FP\)"
    111 	MOVW	y_cap+8(FP), R1 // ERROR "invalid offset y_cap\+8\(FP\); expected y_cap\+20\(FP\)"
    112 	RET
    113 
    114 TEXT argiface(SB),0,$0-16
    115 	MOVH	x+0(FP), R1 // ERROR "invalid MOVH of x\+0\(FP\); interface type is 4-byte value"
    116 	MOVW	x+0(FP), R1
    117 	MOVH	x_type+0(FP), R1 // ERROR "invalid MOVH of x_type\+0\(FP\); interface type is 4-byte value"
    118 	MOVW	x_type+0(FP), R1
    119 	MOVQ	x_itable+0(FP), R1 // ERROR "unknown variable x_itable; offset 0 is x_type\+0\(FP\)"
    120 	MOVQ	x_itable+1(FP), R1 // ERROR "unknown variable x_itable; offset 1 is x_type\+0\(FP\)"
    121 	MOVH	x_data+0(FP), R1 // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
    122 	MOVW	x_data+0(FP), R1 // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
    123 	MOVQ	x_data+0(FP), R1 // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
    124 	MOVH	x_data+4(FP), R1 // ERROR "invalid MOVH of x_data\+4\(FP\); interface data is 4-byte value"
    125 	MOVW	x_data+4(FP), R1
    126 	MOVH	y+8(FP), R1 // ERROR "invalid MOVH of y\+8\(FP\); interface itable is 4-byte value"
    127 	MOVW	y+8(FP), R1
    128 	MOVH	y_itable+8(FP), R1 // ERROR "invalid MOVH of y_itable\+8\(FP\); interface itable is 4-byte value"
    129 	MOVW	y_itable+8(FP), R1
    130 	MOVW	y_type+8(FP), AX // ERROR "unknown variable y_type; offset 8 is y_itable\+8\(FP\)"
    131 	MOVH	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
    132 	MOVW	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
    133 	MOVH	y_data+12(FP), AX // ERROR "invalid MOVH of y_data\+12\(FP\); interface data is 4-byte value"
    134 	MOVW	y_data+12(FP), AX
    135 	RET
    136 
    137 TEXT returnbyte(SB),0,$0-5
    138 	MOVW	x+0(FP), R1
    139 	MOVB	R1, ret+4(FP)
    140 	MOVH	R1, ret+4(FP) // ERROR "invalid MOVH of ret\+4\(FP\); byte is 1-byte value"
    141 	MOVW	R1, ret+4(FP) // ERROR "invalid MOVW of ret\+4\(FP\); byte is 1-byte value"
    142 	MOVB	R1, ret+3(FP) // ERROR "invalid offset ret\+3\(FP\); expected ret\+4\(FP\)"
    143 	RET
    144 
    145 TEXT returnbyte(SB),0,$0-5
    146 	MOVW	x+0(FP), R1
    147 	MOVB	R1, ret+4(FP)
    148 	MOVH	R1, ret+4(FP) // ERROR "invalid MOVH of ret\+4\(FP\); byte is 1-byte value"
    149 	MOVW	R1, ret+4(FP) // ERROR "invalid MOVW of ret\+4\(FP\); byte is 1-byte value"
    150 	MOVB	R1, ret+3(FP) // ERROR "invalid offset ret\+3\(FP\); expected ret\+4\(FP\)"
    151 	RET
    152 
    153 TEXT returnnamed(SB),0,$0-21
    154 	MOVB	x+0(FP), AX
    155 	MOVW	R1, r1+4(FP)
    156 	MOVH	R1, r2+8(FP)
    157 	MOVW	R1, r3+12(FP)
    158 	MOVW	R1, r3_base+12(FP)
    159 	MOVW	R1, r3_len+16(FP)
    160 	MOVB	R1, r4+20(FP)
    161 	MOVB	R1, r1+4(FP) // ERROR "invalid MOVB of r1\+4\(FP\); int is 4-byte value"
    162 	RET
    163 
    164 TEXT returnintmissing(SB),0,$0-4
    165 	RET // ERROR "RET without writing to 4-byte ret\+0\(FP\)"
    166