github.com/karrick/go@v0.0.0-20170817181416-d5b0ec858b37/src/cmd/vet/testdata/asm/asm7.s (about)

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