File: euclc.ssa

package info (click to toggle)
qbe 1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,004 kB
  • sloc: ansic: 13,368; yacc: 843; ml: 466; sh: 379; python: 232; makefile: 100
file content (30 lines) | stat: -rw-r--r-- 425 bytes parent folder | download
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
export
function w $test() {
@l0
	%a =l alloc4 4
	%b =l alloc4 4
	%r =l alloc4 4
	storew 747, %a
	storew 380, %b
@l1
	%t4 =w loadw %b
	jnz %t4, @l2, @l3
@l2
	%t7 =w loadw %a
	%t8 =w loadw %b
	%t6 =w rem %t7, %t8
	storew %t6, %r
	%t10 =w loadw %b
	storew %t10, %a
	%t12 =w loadw %r
	storew %t12, %b
	jmp @l1
@l3
	%t13 =w loadw %a
	ret %t13
}

# >>> driver
# extern int test(void);
# int main() { return !(test() == 1); }
# <<<