diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/mdb/common/modules/libc/libc.c | 10 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/sigjmp_struct.h | 14 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/offsets.in | 10 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/threads/asm_subr.s | 9 | ||||
-rw-r--r-- | usr/src/lib/libc/sparc/threads/machdep.c | 5 | ||||
-rw-r--r-- | usr/src/lib/libc/sparcv9/gen/siglongjmp.c | 7 |
6 files changed, 32 insertions, 23 deletions
diff --git a/usr/src/cmd/mdb/common/modules/libc/libc.c b/usr/src/cmd/mdb/common/modules/libc/libc.c index 831cf8fa99..5d0debcedf 100644 --- a/usr/src/cmd/mdb/common/modules/libc/libc.c +++ b/usr/src/cmd/mdb/common/modules/libc/libc.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/mdb_modapi.h> @@ -136,7 +135,8 @@ d_sigjmp_buf(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) ulong_t sjs_pad[_JBLEN - 6]; sigset_t sjs_sigmask; #if defined(_LP64) - ulong_t sjs_pad1[2]; + greg_t sjs_asi; + greg_t sjs_fprs; #endif stack_t sjs_stack; } s; @@ -158,6 +158,10 @@ d_sigjmp_buf(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) mdb_printf(" sigset = 0x%08x 0x%08x 0x%08x 0x%08x\n", s.sjs_sigmask.__sigbits[0], s.sjs_sigmask.__sigbits[1], s.sjs_sigmask.__sigbits[2], s.sjs_sigmask.__sigbits[3]); +#if defined(_LP64) + mdb_printf(" %%asi = 0x%lx\n", s.sjs_asi); + mdb_printf(" %%fprs = 0x%lx\n", s.sjs_fprs); +#endif mdb_printf(" stack = sp 0x%p size 0x%lx flags %s\n", s.sjs_stack.ss_sp, s.sjs_stack.ss_size, stack_flags(&s.sjs_stack)); diff --git a/usr/src/lib/libc/inc/sigjmp_struct.h b/usr/src/lib/libc/inc/sigjmp_struct.h index 3a3ce1ebc5..988e6ca14c 100644 --- a/usr/src/lib/libc/inc/sigjmp_struct.h +++ b/usr/src/lib/libc/inc/sigjmp_struct.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,16 +18,14 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SIGJMP_STRUCT_H #define _SIGJMP_STRUCT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -65,7 +62,8 @@ typedef struct { ulong_t sjs_pad[_JBLEN - 6]; sigset_t sjs_sigmask; #if defined(_LP64) - ulong_t sjs_pad1[2]; + greg_t sjs_asi; + greg_t sjs_fprs; #endif stack_t sjs_stack; } sigjmp_struct_t; diff --git a/usr/src/lib/libc/sparc/offsets.in b/usr/src/lib/libc/sparc/offsets.in index 35a854e747..a052cfc67f 100644 --- a/usr/src/lib/libc/sparc/offsets.in +++ b/usr/src/lib/libc/sparc/offsets.in @@ -1,7 +1,3 @@ -\ -\ Copyright 2010 Sun Microsystems, Inc. All rights reserved. -\ Use is subject to license terms. -\ \ CDDL HEADER START \ \ The contents of this file are subject to the terms of the @@ -21,6 +17,8 @@ \ \ CDDL HEADER END \ +\ Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +\ \ \ offsets.in: input file to produce assym.h using the ctfstabs program @@ -56,6 +54,10 @@ sigjmp_struct_t sjs_pc sjs_fp sjs_i7 +#ifdef __sparcv9 + sjs_asi + sjs_fprs +#endif stack_t ss_sp diff --git a/usr/src/lib/libc/sparc/threads/asm_subr.s b/usr/src/lib/libc/sparc/threads/asm_subr.s index 95dcfb1740..36814e5124 100644 --- a/usr/src/lib/libc/sparc/threads/asm_subr.s +++ b/usr/src/lib/libc/sparc/threads/asm_subr.s @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ .file "asm_subr.s" @@ -164,6 +163,12 @@ __sighndlrend: stn %o2, [%o0 + SJS_PC] ! save caller's pc into env->sjs_pc stn %fp, [%o0 + SJS_FP] ! save caller's return linkage stn %i7, [%o0 + SJS_I7] +#ifdef __sparcv9 + rd %asi, %o3 + rd %fprs, %o4 + stx %o3, [%o0 + SJS_ASI] + stx %o4, [%o0 + SJS_FPRS] +#endif call __csigsetjmp sub %o2, 8, %o7 ! __csigsetjmp returns to caller SET_SIZE(sigsetjmp) diff --git a/usr/src/lib/libc/sparc/threads/machdep.c b/usr/src/lib/libc/sparc/threads/machdep.c index 32ad502710..85cf4facf9 100644 --- a/usr/src/lib/libc/sparc/threads/machdep.c +++ b/usr/src/lib/libc/sparc/threads/machdep.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ #include "lint.h" @@ -186,6 +185,8 @@ __csigsetjmp(sigjmp_buf env, int savemask) /* * bp->sjs_sp, bp->sjs_pc, bp->sjs_fp and bp->sjs_i7 are already set. + * Also, if we are running in 64-bit mode (__sparcv9), + * then bp->sjs_asi and bp->sjs_fprs are already set. */ bp->sjs_flags = JB_FRAMEPTR; bp->sjs_uclink = self->ul_siglink; diff --git a/usr/src/lib/libc/sparcv9/gen/siglongjmp.c b/usr/src/lib/libc/sparcv9/gen/siglongjmp.c index 83a640397d..5d4ca06426 100644 --- a/usr/src/lib/libc/sparcv9/gen/siglongjmp.c +++ b/usr/src/lib/libc/sparcv9/gen/siglongjmp.c @@ -20,15 +20,12 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - #pragma weak _siglongjmp = siglongjmp #include "lint.h" @@ -67,6 +64,8 @@ siglongjmp(sigjmp_buf env, int val) reg[REG_PC] = bp->sjs_pc; reg[REG_nPC] = reg[REG_PC] + 0x4; reg[REG_SP] = bp->sjs_sp; + reg[REG_ASI] = bp->sjs_asi; + reg[REG_FPRS] = bp->sjs_fprs; if (bp->sjs_flags & JB_SAVEMASK) { uc.uc_flags |= UC_SIGMASK; |