aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/math/ldexp.go9
-rw-r--r--libgo/mksigtab.sh13
-rw-r--r--libgo/runtime/go-signal.c41
3 files changed, 61 insertions, 2 deletions
diff --git a/libgo/go/math/ldexp.go b/libgo/go/math/ldexp.go
index 2898f5dd498..e91a090c986 100644
--- a/libgo/go/math/ldexp.go
+++ b/libgo/go/math/ldexp.go
@@ -13,10 +13,15 @@ package math
// Ldexp(NaN, exp) = NaN
//extern ldexp
-func libc_ldexp(float64, int) float64
+func libc_ldexp(float64, int32) float64
func Ldexp(frac float64, exp int) float64 {
- r := libc_ldexp(frac, exp)
+ if exp > MaxInt32 {
+ exp = MaxInt32
+ } else if exp < MinInt32 {
+ exp = MinInt32
+ }
+ r := libc_ldexp(frac, int32(exp))
return r
}
diff --git a/libgo/mksigtab.sh b/libgo/mksigtab.sh
index c3319705b81..2b07dd491b1 100644
--- a/libgo/mksigtab.sh
+++ b/libgo/mksigtab.sh
@@ -107,6 +107,19 @@ if test "${GOOS}" = "aix"; then
nsig=`expr $nsig + 1`
else
nsig=`grep 'const _*NSIG = [0-9]*$' gen-sysinfo.go | sed -e 's/.* = \([0-9]*\)/\1/'`
+ if test -z "$nsig"; then
+ if grep 'const _*NSIG = [ (]*_*SIGRTMAX + 1[ )]*' gen-sysinfo.go >/dev/null 2>&1; then
+ rtmax=`grep 'const _*SIGRTMAX = [0-9]*$' gen-sysinfo.go | sed -e 's/.* = \([0-9]*\)/\1/'`
+ if test -n "$rtmax"; then
+ nsig=`expr $rtmax + 1`
+ fi
+ fi
+ fi
+fi
+
+if test -z "$nsig"; then
+ echo 1>&2 "could not determine number of signals"
+ exit 1
fi
i=1
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index 8c7ecbae3b5..a5a7cb8080a 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -298,4 +298,45 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u
}
#endif
#endif
+
+#ifdef __alpha__
+ #ifdef __linux__
+ {
+ mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
+
+ runtime_printf("v0 %X\n", m->sc_regs[0]);
+ runtime_printf("t0 %X\n", m->sc_regs[1]);
+ runtime_printf("t1 %X\n", m->sc_regs[2]);
+ runtime_printf("t2 %X\n", m->sc_regs[3]);
+ runtime_printf("t3 %X\n", m->sc_regs[4]);
+ runtime_printf("t4 %X\n", m->sc_regs[5]);
+ runtime_printf("t5 %X\n", m->sc_regs[6]);
+ runtime_printf("t6 %X\n", m->sc_regs[7]);
+ runtime_printf("t7 %X\n", m->sc_regs[8]);
+ runtime_printf("s0 %X\n", m->sc_regs[9]);
+ runtime_printf("s1 %X\n", m->sc_regs[10]);
+ runtime_printf("s2 %X\n", m->sc_regs[11]);
+ runtime_printf("s3 %X\n", m->sc_regs[12]);
+ runtime_printf("s4 %X\n", m->sc_regs[13]);
+ runtime_printf("s5 %X\n", m->sc_regs[14]);
+ runtime_printf("fp %X\n", m->sc_regs[15]);
+ runtime_printf("a0 %X\n", m->sc_regs[16]);
+ runtime_printf("a1 %X\n", m->sc_regs[17]);
+ runtime_printf("a2 %X\n", m->sc_regs[18]);
+ runtime_printf("a3 %X\n", m->sc_regs[19]);
+ runtime_printf("a4 %X\n", m->sc_regs[20]);
+ runtime_printf("a5 %X\n", m->sc_regs[21]);
+ runtime_printf("t8 %X\n", m->sc_regs[22]);
+ runtime_printf("t9 %X\n", m->sc_regs[23]);
+ runtime_printf("t10 %X\n", m->sc_regs[24]);
+ runtime_printf("t11 %X\n", m->sc_regs[25]);
+ runtime_printf("ra %X\n", m->sc_regs[26]);
+ runtime_printf("t12 %X\n", m->sc_regs[27]);
+ runtime_printf("at %X\n", m->sc_regs[28]);
+ runtime_printf("gp %X\n", m->sc_regs[29]);
+ runtime_printf("sp %X\n", m->sc_regs[30]);
+ runtime_printf("pc %X\n", m->sc_pc);
+ }
+ #endif
+#endif
}