Commit ae73b903 authored by Shenghou Ma's avatar Shenghou Ma

runtime: make arm signal handler call runtime.badsignal

In preparation for CL 9249043 (already submitted).

Fixes #5553.

R=golang-dev, iant, capnm9, dave
CC=golang-dev
https://golang.org/cl/9251043
parent 5782f411
......@@ -154,12 +154,17 @@ TEXT runtime·sigtramp(SB),7,$24
// this might be called in external code context,
// where g and m are not set.
// first save R0, because _cgo_load_gm will clobber it
// TODO(adonovan): call runtime·badsignal if m=0, like other platforms?
MOVW R0, 4(R13) // signum
MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)
CMP $0, m
BNE 3(PC)
// signal number is already prepared in 4(R13)
BL runtime·badsignal(SB)
RET
// save g
MOVW R10, R4
MOVW R10, 20(R13)
......
......@@ -286,12 +286,17 @@ TEXT runtime·sigtramp(SB),7,$24
// this might be called in external code context,
// where g and m are not set.
// first save R0, because _cgo_load_gm will clobber it
// TODO(adonovan): call runtime·badsignal if m=0, like other platforms?
MOVW R0, 4(R13)
MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)
CMP $0, m
BNE 3(PC)
// signal number is already prepared in 4(R13)
BL runtime·badsignal(SB)
RET
// save g
MOVW g, R3
MOVW g, 20(R13)
......
......@@ -201,12 +201,17 @@ TEXT runtime·sigtramp(SB),7,$24
// this might be called in external code context,
// where g and m are not set.
// first save R0, because _cgo_load_gm will clobber it
// TODO(adonovan): call runtime·badsignal if m=0, like other platforms?
MOVW R0, 4(R13) // signum
MOVW _cgo_load_gm(SB), R0
CMP $0, R0
BL.NE (R0)
CMP $0, m
BNE 3(PC)
// signal number is already prepared in 4(R13)
BL runtime·badsignal(SB)
RET
// save g
MOVW R10, R4
MOVW R10, 20(R13)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment