github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/src/pkg/runtime/signal_netbsd_arm.h (about) 1 // Copyright 2013 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. 4 5 #define SIG_REGS(ctxt) (((UcontextT*)(ctxt))->uc_mcontext) 6 7 #define SIG_R0(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R0]) 8 #define SIG_R1(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R1]) 9 #define SIG_R2(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R2]) 10 #define SIG_R3(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R3]) 11 #define SIG_R4(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R4]) 12 #define SIG_R5(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R5]) 13 #define SIG_R6(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R6]) 14 #define SIG_R7(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R7]) 15 #define SIG_R8(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R8]) 16 #define SIG_R9(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R9]) 17 #define SIG_R10(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R10]) 18 #define SIG_FP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R11]) 19 #define SIG_IP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R12]) 20 #define SIG_SP(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R13]) 21 #define SIG_LR(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R14]) 22 #define SIG_PC(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_R15]) 23 #define SIG_CPSR(info, ctxt) (SIG_REGS(ctxt).__gregs[REG_CPSR]) 24 #define SIG_FAULT(info, ctxt) (*(uintptr*)&(info)->_reason[0]) 25 #define SIG_TRAP(info, ctxt) (0) 26 #define SIG_ERROR(info, ctxt) (0) 27 #define SIG_OLDMASK(info, ctxt) (0) 28 29 #define SIG_CODE0(info, ctxt) ((info)->_code) 30 #define SIG_CODE1(info, ctxt) (*(uintptr*)&(info)->_reason[0])