]> Cypherpunks.ru repositories - gostls13.git/blob - src/cmd/asm/internal/asm/testdata/riscv64error.s
cdb8a028bd1e93b1c329ed75678f30ca900d287b
[gostls13.git] / src / cmd / asm / internal / asm / testdata / riscv64error.s
1 // Copyright 2021 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 TEXT errors(SB),$0
6         MOV     $errors(SB), (X5)               // ERROR "address load must target register"
7         MOV     $8(SP), (X5)                    // ERROR "address load must target register"
8         MOVB    $8(SP), X5                      // ERROR "unsupported address load"
9         MOVH    $8(SP), X5                      // ERROR "unsupported address load"
10         MOVW    $8(SP), X5                      // ERROR "unsupported address load"
11         MOVF    $8(SP), X5                      // ERROR "unsupported address load"
12         MOV     $1234, 0(SP)                    // ERROR "constant load must target register"
13         MOV     $1234, 8(SP)                    // ERROR "constant load must target register"
14         MOV     $0, 0(SP)                       // ERROR "constant load must target register"
15         MOV     $0, 8(SP)                       // ERROR "constant load must target register"
16         MOV     $1234, 0(SP)                    // ERROR "constant load must target register"
17         MOV     $1234, 8(SP)                    // ERROR "constant load must target register"
18         MOVB    $1, X5                          // ERROR "unsupported constant load"
19         MOVH    $1, X5                          // ERROR "unsupported constant load"
20         MOVW    $1, X5                          // ERROR "unsupported constant load"
21         MOVF    $1, X5                          // ERROR "unsupported constant load"
22         MOVBU   X5, (X6)                        // ERROR "unsupported unsigned store"
23         MOVHU   X5, (X6)                        // ERROR "unsupported unsigned store"
24         MOVWU   X5, (X6)                        // ERROR "unsupported unsigned store"
25         MOVF    F0, F1, F2                      // ERROR "illegal MOV instruction"
26         MOVD    F0, F1, F2                      // ERROR "illegal MOV instruction"
27         MOV     X10, X11, X12                   // ERROR "illegal MOV instruction"
28         MOVW    X10, X11, X12                   // ERROR "illegal MOV instruction"
29         SLLI    $64, X5, X6                     // ERROR "shift amount out of range 0 to 63"
30         SRLI    $64, X5, X6                     // ERROR "shift amount out of range 0 to 63"
31         SRAI    $64, X5, X6                     // ERROR "shift amount out of range 0 to 63"
32         SLLI    $-1, X5, X6                     // ERROR "shift amount out of range 0 to 63"
33         SRLI    $-1, X5, X6                     // ERROR "shift amount out of range 0 to 63"
34         SRAI    $-1, X5, X6                     // ERROR "shift amount out of range 0 to 63"
35         SLLIW   $32, X5, X6                     // ERROR "shift amount out of range 0 to 31"
36         SRLIW   $32, X5, X6                     // ERROR "shift amount out of range 0 to 31"
37         SRAIW   $32, X5, X6                     // ERROR "shift amount out of range 0 to 31"
38         SLLIW   $-1, X5, X6                     // ERROR "shift amount out of range 0 to 31"
39         SRLIW   $-1, X5, X6                     // ERROR "shift amount out of range 0 to 31"
40         SRAIW   $-1, X5, X6                     // ERROR "shift amount out of range 0 to 31"
41
42         RET