File: trap.S

package info (click to toggle)
insight 6.1%2Bcvs.2004.08.11-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 150,436 kB
  • ctags: 171,195
  • sloc: ansic: 1,431,500; exp: 89,955; tcl: 56,199; asm: 47,136; makefile: 42,498; sh: 27,919; yacc: 8,337; cpp: 5,534; perl: 5,281; lisp: 2,204; lex: 895; pascal: 663; awk: 443; sed: 339; objc: 134; ada: 15; java: 14; fortran: 5
file content (35 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (7)
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
# verify that trap || cmp works
	add  r8,r0,0x11223344         ;
	add  r9,r0,0x11223344         ;

	mvtsys bpsw,r0 || nop
	mvtsys bpc,r0  || nop

	add  r1,r0,0x97000555       ; for psw
	mvtsys psw,r1 || nop
	trap 0  || cmpeq f0,r8,r9,;

	.long 0x0e000004, 0x00f00000

	.section .eit_v, "a"
	nop     || nop
	nop     || nop
	nop     || nop
	nop     || nop

# save the old bpsw, psw
	mvfsys r4,bpsw || nop
	mvfsys r5,psw || nop

# load up what they should be
	add r6,r0,0x97004555
	add r7,r0,0x90000000

# verify that they have the right values
# return exit value in r2 -- 0 success, 47 failure
	add r2,r0,47
	cmpeq f0,r4,r6 || nop
	cmpeq f1,r5,r7 || nop
	add/tt r2,r0,r0 || nop

	reit