File: relax-swap1.s

package info (click to toggle)
binutils 2.34-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 328,380 kB
  • sloc: ansic: 1,180,155; asm: 665,310; cpp: 130,540; exp: 69,822; makefile: 57,183; sh: 22,559; yacc: 14,469; lisp: 13,785; perl: 2,112; ada: 1,681; lex: 1,650; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (151 lines) | stat: -rw-r--r-- 1,749 bytes parent folder | download | duplicates (41)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Source file used to test branch relaxation with swapping.

	.text
foo:

	move	$2, $4
	b	foo
	move	$2, $4
	b	bar

	lw	$2, ($4)
	b	foo
	lw	$2, ($4)
	b	bar

	sw	$2, ($4)
	b	foo
	sw	$2, ($4)
	b	bar

	move	$2, $4
	beq	$2, $3, foo
	move	$2, $4
	beq	$2, $3, bar
	move	$2, $4
	beq	$4, $5, foo
	move	$2, $4
	beq	$4, $5, bar

	addiu	$2, $4, 1
	beq	$2, $3, foo
	addiu	$2, $4, 1
	beq	$2, $3, bar
	addiu	$2, $4, 1
	beq	$4, $5, foo
	addiu	$2, $4, 1
	beq	$4, $5, bar

	lw	$2, ($4)
	beq	$2, $3, foo
	lw	$2, ($4)
	beq	$2, $3, bar
	lw	$2, ($4)
	beq	$4, $5, foo
	lw	$2, ($4)
	beq	$4, $5, bar

	sw	$2, ($4)
	beq	$2, $3, foo
	sw	$2, ($4)
	beq	$2, $3, bar
	sw	$2, ($4)
	beq	$4, $5, foo
	sw	$2, ($4)
	beq	$4, $5, bar

	mfc1	$2, $0
	move	$6, $7
	beq	$2, $3, foo
	mfc1	$2, $0
	move	$6, $7
	beq	$2, $3, bar
	mfc1	$2, $0
	move	$6, $7
	beq	$4, $5, foo
	mfc1	$2, $0
	move	$6, $7
	beq	$4, $5, bar

	move	$2, $4
	bc1t	foo
	move	$2, $4
	bc1t	bar

	.set	nomove
	move	$2, $4
	b	foo
	move	$2, $4
	b	bar
	.set	move

	move	$2, $4
0:	b	foo
	move	$2, $4
0:	b	bar

	.set	noreorder
	move	$6, $7
	.set	reorder
	move	$2, $4
	b	foo
	.set	noreorder
	move	$6, $7
	.set	reorder
	move	$2, $4
	b	bar

	sw	$2, 0f
0:	b	foo
	sw	$2, 0f
0:	b	bar

	lwc1	$0, ($4)
	b	foo
	lwc1	$0, ($4)
	b	bar

	cfc1	$2, $31
	b	foo
	cfc1	$2, $31
	b	bar

	ctc1	$2, $31
	b	foo
	ctc1	$2, $31
	b	bar

	mtc1	$2, $31
	b	foo
	mtc1	$2, $31
	b	bar

	mfhi	$2
	b	foo
	mfhi	$2
	b	bar

	move	$2, $4
	jr	$2
	move	$2, $4
	jr	$4

	move	$2, $4
	jalr	$2
	move	$2, $4
	jalr	$4

	move	$2, $31
	jalr	$3
	move	$31, $4
	jalr	$5

	move	$31, $4
	jalr	$2, $3
	move	$2, $31
	jalr	$2, $3

        .space  0x20000         # to make a 128kb loop body
bar:
# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
        .space  8