mirror of https://github.com/golang/go.git
Merge 53af3c483d into 49cdf0c42e
This commit is contained in:
commit
e49dbf680c
|
|
@ -51,14 +51,20 @@ type context struct {
|
|||
extendedregisters [512]uint8
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) ip() uintptr { return uintptr(c.eip) }
|
||||
//go:nosplit
|
||||
func (c *context) sp() uintptr { return uintptr(c.esp) }
|
||||
|
||||
// 386 does not have link register, so this returns 0.
|
||||
//go:nosplit
|
||||
func (c *context) lr() uintptr { return 0 }
|
||||
//go:nosplit
|
||||
func (c *context) set_lr(x uintptr) {}
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) set_ip(x uintptr) { c.eip = uint32(x) }
|
||||
//go:nosplit
|
||||
func (c *context) set_sp(x uintptr) { c.esp = uint32(x) }
|
||||
|
||||
// 386 does not have frame pointer register.
|
||||
|
|
|
|||
|
|
@ -65,14 +65,20 @@ type context struct {
|
|||
lastexceptionfromrip uint64
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) ip() uintptr { return uintptr(c.rip) }
|
||||
//go:nosplit
|
||||
func (c *context) sp() uintptr { return uintptr(c.rsp) }
|
||||
|
||||
// AMD64 does not have link register, so this returns 0.
|
||||
//go:nosplit
|
||||
func (c *context) lr() uintptr { return 0 }
|
||||
//go:nosplit
|
||||
func (c *context) set_lr(x uintptr) {}
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) set_ip(x uintptr) { c.rip = uint64(x) }
|
||||
//go:nosplit
|
||||
func (c *context) set_sp(x uintptr) { c.rsp = uint64(x) }
|
||||
func (c *context) set_fp(x uintptr) { c.rbp = uint64(x) }
|
||||
|
||||
|
|
|
|||
|
|
@ -55,12 +55,18 @@ type context struct {
|
|||
padding2 [2]uint32
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) ip() uintptr { return uintptr(c.pc) }
|
||||
//go:nosplit
|
||||
func (c *context) sp() uintptr { return uintptr(c.spr) }
|
||||
//go:nosplit
|
||||
func (c *context) lr() uintptr { return uintptr(c.lrr) }
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) set_ip(x uintptr) { c.pc = uint32(x) }
|
||||
//go:nosplit
|
||||
func (c *context) set_sp(x uintptr) { c.spr = uint32(x) }
|
||||
//go:nosplit
|
||||
func (c *context) set_lr(x uintptr) { c.lrr = uint32(x) }
|
||||
|
||||
// arm does not have frame pointer register.
|
||||
|
|
|
|||
|
|
@ -38,12 +38,18 @@ type context struct {
|
|||
wvr [2]uint64
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) ip() uintptr { return uintptr(c.pc) }
|
||||
//go:nosplit
|
||||
func (c *context) sp() uintptr { return uintptr(c.xsp) }
|
||||
//go:nosplit
|
||||
func (c *context) lr() uintptr { return uintptr(c.x[30]) }
|
||||
|
||||
//go:nosplit
|
||||
func (c *context) set_ip(x uintptr) { c.pc = uint64(x) }
|
||||
//go:nosplit
|
||||
func (c *context) set_sp(x uintptr) { c.xsp = uint64(x) }
|
||||
//go:nosplit
|
||||
func (c *context) set_lr(x uintptr) { c.x[30] = uint64(x) }
|
||||
func (c *context) set_fp(x uintptr) { c.x[29] = uint64(x) }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue