File: mips64r2.s

package info (click to toggle)
binutils 2.31.1-12
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 307,644 kB
  • sloc: ansic: 1,161,122; asm: 638,494; cpp: 128,815; exp: 68,557; makefile: 55,828; sh: 22,360; yacc: 14,238; lisp: 13,272; perl: 2,111; ada: 1,681; lex: 1,652; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (65 lines) | stat: -rw-r--r-- 1,821 bytes parent folder | download | duplicates (47)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# source file to test assembly of mips64r2 instructions
# (assumes that mips32r2 instructions will be tested separately for mips64r2.)

        .set noreorder
	.set noat

	.text
text_label:

      # unprivileged CPU instructions

	# Test macro's ability to turn "dext" into "dext", "dextm" and
	# "dextu" as appropriate.  Also, add some explicit tests of the
	# actual instructions.
	dext	$2, $3, 0, 1	# dext
	dext	$2, $3, 0, 32	# dext
	dext	$2, $3, 0, 33	# dextm
	dext	$2, $3, 0, 64	# dextm
	dext	$2, $3, 31, 1	# dext
	dext	$2, $3, 31, 32	# dext
	dext	$2, $3, 31, 33	# dextm
	dext	$2, $3, 32, 1	# dextu
	dext	$2, $3, 32, 32	# dextu
	dext	$2, $3, 63, 1	# dextu
	dextm	$2, $3, 10, 44
	dextu	$2, $3, 42, 12

	# Test macro's ability to turn "dins" into "dins", "dinsm" and
	# "dinsu" as appropriate.  Also, add some explicit tests of the
	# non-macro instructions.
	dins	$2, $3, 0, 1	# dins
	dins	$2, $3, 0, 32	# dins
	dins	$2, $3, 0, 33	# dinsm
	dins	$2, $3, 0, 64	# dinsm
	dins	$2, $3, 31, 1	# dins
	dins	$2, $3, 31, 2	# dinsm
	dins	$2, $3, 31, 33	# dinsm
	dins	$2, $3, 32, 1	# dinsu
	dins	$2, $3, 32, 32	# dinsu
	dins	$2, $3, 63, 1	# dinsu
	dinsm	$2, $3, 10, 44
	dinsu	$2, $3, 42, 12

	# This file checks that in fact HW rotate will
	# be used for this arch, and checks assembly
	# of the official MIPS mnemonics.  (Note that disassembly
	# uses the traditional "dror", "dror32" and "drorv"
	# mnemonics.) Additional rotate tests are done by rol64-hw.d.
	drotl	$25, $10, 4	# dror32
	drotr	$25, $10, 4	# dror
	drotl	$25, $10, 36	# dror
	drotr	$25, $10, 36	# dror32
	drotl	$25, $10, $4	# neg / drorv
	drotr	$25, $10, $4	# drorv
	drotr32	$25, $10, 4	# dror32
	drotrv	$25, $10, $4	# drorv

	dsbh	$7
	dsbh	$8, $10

	dshd	$7
	dshd	$8, $10

# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
	.space  8