1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 const _PAGESIZE = 0x1000
10 r0 uint32 /* general registers */
25 trap uint32 /* trap type */
27 pc uint32 /* interrupted addr */
35 //go:nowritebarrierrec
36 func (c *sigctxt) pc() uintptr { return uintptr(c.u.pc) }
38 func (c *sigctxt) sp() uintptr { return uintptr(c.u.sp) }
39 func (c *sigctxt) lr() uintptr { return uintptr(c.u.link) }
41 func (c *sigctxt) setpc(x uintptr) { c.u.pc = uint32(x) }
42 func (c *sigctxt) setsp(x uintptr) { c.u.sp = uint32(x) }
43 func (c *sigctxt) setlr(x uintptr) { c.u.link = uint32(x) }
44 func (c *sigctxt) savelr(x uintptr) { c.u.r0 = uint32(x) }
46 func dumpregs(u *ureg) {
47 print("r0 ", hex(u.r0), "\n")
48 print("r1 ", hex(u.r1), "\n")
49 print("r2 ", hex(u.r2), "\n")
50 print("r3 ", hex(u.r3), "\n")
51 print("r4 ", hex(u.r4), "\n")
52 print("r5 ", hex(u.r5), "\n")
53 print("r6 ", hex(u.r6), "\n")
54 print("r7 ", hex(u.r7), "\n")
55 print("r8 ", hex(u.r8), "\n")
56 print("r9 ", hex(u.r9), "\n")
57 print("r10 ", hex(u.r10), "\n")
58 print("r11 ", hex(u.r11), "\n")
59 print("r12 ", hex(u.r12), "\n")
60 print("sp ", hex(u.sp), "\n")
61 print("link ", hex(u.link), "\n")
62 print("pc ", hex(u.pc), "\n")
63 print("psr ", hex(u.psr), "\n")