File: mips-gp32-fp64.s

package info (click to toggle)
binutils 2.32.51.20190821-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 309,676 kB
  • sloc: ansic: 1,201,497; asm: 658,869; cpp: 130,432; exp: 69,370; makefile: 56,804; sh: 23,583; lisp: 14,519; yacc: 14,467; perl: 2,111; ada: 1,681; lex: 1,649; pascal: 1,446; python: 991; cs: 879; sed: 195; xml: 95; awk: 25
file content (97 lines) | stat: -rw-r--r-- 2,620 bytes parent folder | download | duplicates (40)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

	.sdata
shared:	.word	11

	.data
unshared:
	.word	1
	.word	2
	.word	3
	.word	4

	.text
func:
	.set noreorder
	li	$4, 0x12345678	# 0000 lui	a0,0x1234
				# 0004 ori	a0,a0,0x5678
	la	$4, shared	# 0008 addiu	a0,gp,shared
	la	$4, unshared	# 000c lui	a0,hi(unshared)
				# 0010 addiu	a0,a0,lo(unshared)
	la	$4, end		# 0014 lui	a0,hi(end)
				# 0018 addiu	a0,a0,lo(end)
	j	end		# 001c j	end
	jal	end		# 0020 jal	end
	lw	$4, shared	# 0024 lw	a0,shared(gp)
	lw	$4, unshared	# 0028 lui	a0,hi(unshared)
				# 002c lw	a0,lo(unshared)(a0)
	lw	$4, end		# 0030 lui	a0,hi(end)
				# 0034 lw	a0,lo(end)(a0)
	ld	$4, shared	# 0038 lw	a0,shared(gp)
				# 003c lw	a1,shared+4(gp)
	ld	$4, unshared	# 0040 lui	at,hi(unshared)
				# 0044 lw	a0,lo(unshared)(at)
				# 0048 lw	a1,lo(unshared)+4(at)
	ld	$4, end		# 004c lui	at,hi(end)
				# 0050 lw	a0,lo(end)(at)
				# 0054 lw	a1,lo(end)+4(at)
	sw	$4, shared	# 0058 sw	a0,shared(gp)
	sw	$4, unshared	# 005c lui	at,hi(unshared)
				# 0060 sw	a0,lo(unshared)(at)
	sd	$4, shared	# 0064 sw	a0,shared(gp)
				# 0068 sw	a1,shared+4(gp)
	sd	$4, unshared	# 006c lui	at,hi(unshared)
				# 0070 sw	a0,lo(unshared)(at)
				# 0074 sw	a1,lo(unshared)+4(at)
	ulh	$4, unshared	# 0078 lui	at,hi(unshared)
				# 007c addiu	at,at,lo(unshared)
				# 0080 lb	a0,0(at)
				# 0084 lbu	at,1(at)
				# 0088 sll	a0,a0,8
				# 008c or	a0,a0,at
	ush	$4, unshared	# 0090 lui	at,hi(unshared)
				# 0094 addiu	at,at,lo(unshared)
				# 0098 sb	a0,1(at)
				# 009c srl	a0,a0,8
				# 00a0 sb	a0,0(at)
				# 00a4 lbu	at,1(at)
				# 00a8 sll	a0,a0,8
				# 00ac or	a0,a0,at
	ulw	$4, unshared	# 00b0 lui	at,hi(unshared)
				# 00b4 addiu	at,at,lo(unshared)
				# 00b8 lwl	a0,0(at)
				# 00bc lwr	a0,3(at)
	usw	$4, unshared	# 00c0 lui	at,hi(unshared)
				# 00c4 addiu	at,at,lo(unshared)
				# 00c8 swl	a0,0(at)
				# 00cc swr	a0,3(at)
	li.d	$4, 1.0		# 00d0 lui	a0,0x3ff0
				# 00d4 move	a1,zero
	li.d	$4, 1.9		# 00d8 lui	at,hi(F1.9)
				# 00dc lw	a0,lo(F1.9)(at)
				# 00e0 lw	a1,lo(F1.9)+4(at)
	li.d	$f0, 1.0	# 00e4 ldc1	$f0,L1.0(gp)
	li.d	$f0, 1.9	# 00e8 ldc1	$f0,L1.9(gp)
	seq	$4, $5, -100	# 00ec addiu	a0,a1,100
				# 00f0 sltiu	a0,a0,1
	sne	$4, $5, -100	# 00f4 addiu	a0,a1,100
				# 00f8 sltu	a0,zero,a0
	move	$4, $5		# 00fc move	a0,a1

# Not available in 32-bit mode
#	dla	$4, shared
#	dla	$4, unshared
#	uld	$4, unshared
#	usd	$4, unshared

# Should produce warnings given -mgp32
#	bgt	$4, 0x7fffffff, end
#	bgtu	$4, 0xffffffff, end
#	ble	$4, 0x7fffffff, end
#	bleu	$4, 0xffffffff, end

	add.d	$f1, $f2, $f3	# 0100 add.d	$f1,$f2,$f3

end:

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