mirror of
https://github.com/golang/go
synced 2024-11-19 12:14:42 -07:00
runtime: normalize (*sigctxt).fault() type
(*sigctxt).fault() currently returns either uintptr, uint32, or uint64 depending on the platform. Make them all return uintptr. For #10958 (but a nice change on its own). Change-Id: I7813e779d0edcba112dd47fda776f4ce6e50e227 Reviewed-on: https://go-review.googlesource.com/68015 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
ba42b3ffd3
commit
56462d0f10
@ -36,7 +36,7 @@ func (c *sigctxt) lr() uint32 { return c.regs().lr }
|
|||||||
func (c *sigctxt) pc() uint32 { return c.regs().pc }
|
func (c *sigctxt) pc() uint32 { return c.regs().pc }
|
||||||
|
|
||||||
func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr }
|
func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr }
|
||||||
func (c *sigctxt) fault() uint32 { return c.info.si_addr }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.info.si_addr) }
|
||||||
func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
|
func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
|
||||||
func (c *sigctxt) trap() uint32 { return 0 }
|
func (c *sigctxt) trap() uint32 { return 0 }
|
||||||
func (c *sigctxt) error() uint32 { return 0 }
|
func (c *sigctxt) error() uint32 { return 0 }
|
||||||
|
@ -52,7 +52,7 @@ func (c *sigctxt) sp() uint64 { return c.regs().sp }
|
|||||||
//go:nowritebarrierrec
|
//go:nowritebarrierrec
|
||||||
func (c *sigctxt) pc() uint64 { return c.regs().pc }
|
func (c *sigctxt) pc() uint64 { return c.regs().pc }
|
||||||
|
|
||||||
func (c *sigctxt) fault() uint64 { return uint64(uintptr(unsafe.Pointer(c.info.si_addr))) }
|
func (c *sigctxt) fault() uintptr { return uintptr(unsafe.Pointer(c.info.si_addr)) }
|
||||||
|
|
||||||
func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
|
func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
|
||||||
func (c *sigctxt) sigaddr() uint64 { return uint64(uintptr(unsafe.Pointer(c.info.si_addr))) }
|
func (c *sigctxt) sigaddr() uint64 { return uint64(uintptr(unsafe.Pointer(c.info.si_addr))) }
|
||||||
|
@ -36,7 +36,7 @@ func (c *sigctxt) lr() uint32 { return c.regs().__gregs[14] }
|
|||||||
func (c *sigctxt) pc() uint32 { return c.regs().__gregs[15] }
|
func (c *sigctxt) pc() uint32 { return c.regs().__gregs[15] }
|
||||||
|
|
||||||
func (c *sigctxt) cpsr() uint32 { return c.regs().__gregs[16] }
|
func (c *sigctxt) cpsr() uint32 { return c.regs().__gregs[16] }
|
||||||
func (c *sigctxt) fault() uint32 { return uint32(c.info.si_addr) }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.info.si_addr) }
|
||||||
func (c *sigctxt) trap() uint32 { return 0 }
|
func (c *sigctxt) trap() uint32 { return 0 }
|
||||||
func (c *sigctxt) error() uint32 { return 0 }
|
func (c *sigctxt) error() uint32 { return 0 }
|
||||||
func (c *sigctxt) oldmask() uint32 { return 0 }
|
func (c *sigctxt) oldmask() uint32 { return 0 }
|
||||||
|
@ -39,7 +39,7 @@ func (c *sigctxt) lr() uint32 { return c.regs().lr }
|
|||||||
func (c *sigctxt) pc() uint32 { return c.regs().pc }
|
func (c *sigctxt) pc() uint32 { return c.regs().pc }
|
||||||
|
|
||||||
func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr }
|
func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr }
|
||||||
func (c *sigctxt) fault() uint32 { return c.regs().fault_address }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.regs().fault_address) }
|
||||||
func (c *sigctxt) trap() uint32 { return c.regs().trap_no }
|
func (c *sigctxt) trap() uint32 { return c.regs().trap_no }
|
||||||
func (c *sigctxt) error() uint32 { return c.regs().error_code }
|
func (c *sigctxt) error() uint32 { return c.regs().error_code }
|
||||||
func (c *sigctxt) oldmask() uint32 { return c.regs().oldmask }
|
func (c *sigctxt) oldmask() uint32 { return c.regs().oldmask }
|
||||||
|
@ -56,7 +56,7 @@ func (c *sigctxt) sp() uint64 { return c.regs().sp }
|
|||||||
func (c *sigctxt) pc() uint64 { return c.regs().pc }
|
func (c *sigctxt) pc() uint64 { return c.regs().pc }
|
||||||
|
|
||||||
func (c *sigctxt) pstate() uint64 { return c.regs().pstate }
|
func (c *sigctxt) pstate() uint64 { return c.regs().pstate }
|
||||||
func (c *sigctxt) fault() uint64 { return c.regs().fault_address }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.regs().fault_address) }
|
||||||
|
|
||||||
func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
|
func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
|
||||||
func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
|
func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
|
||||||
|
@ -67,7 +67,7 @@ func (c *sigctxt) ccr() uint64 { return c.regs().ccr }
|
|||||||
|
|
||||||
func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
|
func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
|
||||||
func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
|
func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
|
||||||
func (c *sigctxt) fault() uint64 { return c.regs().dar }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.regs().dar) }
|
||||||
|
|
||||||
func (c *sigctxt) set_r0(x uint64) { c.regs().gpr[0] = x }
|
func (c *sigctxt) set_r0(x uint64) { c.regs().gpr[0] = x }
|
||||||
func (c *sigctxt) set_r12(x uint64) { c.regs().gpr[12] = x }
|
func (c *sigctxt) set_r12(x uint64) { c.regs().gpr[12] = x }
|
||||||
|
@ -36,7 +36,7 @@ func (c *sigctxt) lr() uint32 { return c.regs().lr }
|
|||||||
func (c *sigctxt) pc() uint32 { return c.regs().pc }
|
func (c *sigctxt) pc() uint32 { return c.regs().pc }
|
||||||
|
|
||||||
func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr }
|
func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr }
|
||||||
func (c *sigctxt) fault() uint32 { return ^uint32(0) }
|
func (c *sigctxt) fault() uintptr { return ^uintptr(0) }
|
||||||
func (c *sigctxt) trap() uint32 { return ^uint32(0) }
|
func (c *sigctxt) trap() uint32 { return ^uint32(0) }
|
||||||
func (c *sigctxt) error() uint32 { return ^uint32(0) }
|
func (c *sigctxt) error() uint32 { return ^uint32(0) }
|
||||||
func (c *sigctxt) oldmask() uint32 { return ^uint32(0) }
|
func (c *sigctxt) oldmask() uint32 { return ^uint32(0) }
|
||||||
|
@ -36,7 +36,7 @@ func (c *sigctxt) lr() uint32 { return c.regs().__gregs[_REG_R14] }
|
|||||||
func (c *sigctxt) pc() uint32 { return c.regs().__gregs[_REG_R15] }
|
func (c *sigctxt) pc() uint32 { return c.regs().__gregs[_REG_R15] }
|
||||||
|
|
||||||
func (c *sigctxt) cpsr() uint32 { return c.regs().__gregs[_REG_CPSR] }
|
func (c *sigctxt) cpsr() uint32 { return c.regs().__gregs[_REG_CPSR] }
|
||||||
func (c *sigctxt) fault() uint32 { return uint32(c.info._reason) }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.info._reason) }
|
||||||
func (c *sigctxt) trap() uint32 { return 0 }
|
func (c *sigctxt) trap() uint32 { return 0 }
|
||||||
func (c *sigctxt) error() uint32 { return 0 }
|
func (c *sigctxt) error() uint32 { return 0 }
|
||||||
func (c *sigctxt) oldmask() uint32 { return 0 }
|
func (c *sigctxt) oldmask() uint32 { return 0 }
|
||||||
|
@ -38,7 +38,7 @@ func (c *sigctxt) lr() uint32 { return c.regs().sc_usr_lr }
|
|||||||
func (c *sigctxt) pc() uint32 { return c.regs().sc_pc }
|
func (c *sigctxt) pc() uint32 { return c.regs().sc_pc }
|
||||||
|
|
||||||
func (c *sigctxt) cpsr() uint32 { return c.regs().sc_spsr }
|
func (c *sigctxt) cpsr() uint32 { return c.regs().sc_spsr }
|
||||||
func (c *sigctxt) fault() uint32 { return c.sigaddr() }
|
func (c *sigctxt) fault() uintptr { return uintptr(c.sigaddr()) }
|
||||||
func (c *sigctxt) trap() uint32 { return 0 }
|
func (c *sigctxt) trap() uint32 { return 0 }
|
||||||
func (c *sigctxt) error() uint32 { return 0 }
|
func (c *sigctxt) error() uint32 { return 0 }
|
||||||
func (c *sigctxt) oldmask() uint32 { return 0 }
|
func (c *sigctxt) oldmask() uint32 { return 0 }
|
||||||
|
Loading…
Reference in New Issue
Block a user