Upload Tizen:Base source
[external/binutils.git] / gas / testsuite / gas / mips / mips64r2.s
1 # source file to test assembly of mips64r2 instructions
2 # (assumes that mips32r2 instructions will be tested separately for mips64r2.)
3
4         .set noreorder
5         .set noat
6
7         .text
8 text_label:
9
10       # unprivileged CPU instructions
11
12         # Test macro's ability to turn "dext" into "dext", "dextm" and
13         # "dextu" as appropriate.  Also, add some explicit tests of the
14         # actual instructions.
15         dext    $2, $3, 0, 1    # dext
16         dext    $2, $3, 0, 32   # dext
17         dext    $2, $3, 0, 33   # dextm
18         dext    $2, $3, 0, 64   # dextm
19         dext    $2, $3, 31, 1   # dext
20         dext    $2, $3, 31, 32  # dext
21         dext    $2, $3, 31, 33  # dextm
22         dext    $2, $3, 32, 1   # dextu
23         dext    $2, $3, 32, 32  # dextu
24         dext    $2, $3, 63, 1   # dextu
25         dextm   $2, $3, 10, 44
26         dextu   $2, $3, 42, 12
27
28         # Test macro's ability to turn "dins" into "dins", "dinsm" and
29         # "dinsu" as appropriate.  Also, add some explicit tests of the
30         # non-macro instructions.
31         dins    $2, $3, 0, 1    # dins
32         dins    $2, $3, 0, 32   # dins
33         dins    $2, $3, 0, 33   # dinsm
34         dins    $2, $3, 0, 64   # dinsm
35         dins    $2, $3, 31, 1   # dins
36         dins    $2, $3, 31, 2   # dinsm
37         dins    $2, $3, 31, 33  # dinsm
38         dins    $2, $3, 32, 1   # dinsu
39         dins    $2, $3, 32, 32  # dinsu
40         dins    $2, $3, 63, 1   # dinsu
41         dinsm   $2, $3, 10, 44
42         dinsu   $2, $3, 42, 12
43
44         # This file checks that in fact HW rotate will
45         # be used for this arch, and checks assembly
46         # of the official MIPS mnemonics.  (Note that disassembly
47         # uses the traditional "dror", "dror32" and "drorv"
48         # mnemonics.) Additional rotate tests are done by rol64-hw.d.
49         drotl   $25, $10, 4     # dror32
50         drotr   $25, $10, 4     # dror
51         drotl   $25, $10, 36    # dror
52         drotr   $25, $10, 36    # dror32
53         drotl   $25, $10, $4    # neg / drorv
54         drotr   $25, $10, $4    # drorv
55         drotr32 $25, $10, 4     # dror32
56         drotrv  $25, $10, $4    # drorv
57
58         dsbh    $7
59         dsbh    $8, $10
60
61         dshd    $7
62         dshd    $8, $10
63
64 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
65         .space  8