Print this page
15254 %ymm registers not restored after signal handler
15367 x86 getfpregs() summons corrupting %xmm ghosts
15333 want x86 /proc xregs support (libc_db, libproc, mdb, etc.)
15336 want libc functions for extended ucontext_t
15334 want ps_lwphandle-specific reg routines
15328 FPU_CW_INIT mistreats reserved bit
15335 i86pc fpu_subr.c isn't really platform-specific
15332 setcontext(2) isn't actually noreturn
15331 need <sys/stdalign.h>
Change-Id: I7060aa86042dfb989f77fc3323c065ea2eafa9ad
Conflicts:
    usr/src/uts/common/fs/proc/prcontrol.c
    usr/src/uts/intel/os/archdep.c
    usr/src/uts/intel/sys/ucontext.h
    usr/src/uts/intel/syscall/getcontext.c

@@ -51,13 +51,10 @@
 static  int     lwplook(look_arg_t *, const lwpstatus_t *, const lwpsinfo_t *);
 static  char    *prflags(int);
 static  char    *prwhy(int);
 static  char    *prwhat(int, int);
 static  void    dumpregs(const prgregset_t, int);
-#if defined(__sparc) && defined(_ILP32)
-static  void    dumpregs_v8p(const prgregset_t, const prxregset_t *, int);
-#endif
 
 static  char    *command;
 static  struct  ps_prochandle *Pr;
 
 static  int     is64;   /* Is current process 64-bit? */

@@ -347,27 +344,15 @@
                     (int)ps.pr_pid, ps.pr_psargs, t);
         }
 
         if (rflag) {
                 if (Pstate(Pr) == PS_DEAD || (arg->pflags & PR_STOPPED)) {
-#if defined(__sparc) && defined(_ILP32)
-                        /*
-                         * If we're SPARC/32-bit, see if we can get extra
-                         * register state for this lwp.  If it's a v8plus
-                         * program, print the 64-bit register values.
-                         */
-                        prxregset_t prx;
-
-                        if (Plwp_getxregs(Pr, psp->pr_lwpid, &prx) == 0 &&
-                            prx.pr_type == XR_TYPE_V8P)
-                                dumpregs_v8p(psp->pr_reg, &prx, is64);
-                        else
-#endif  /* __sparc && _ILP32 */
                                 dumpregs(psp->pr_reg, is64);
-                } else
+                } else {
                         (void) printf("\tNot stopped, can't show registers\n");
         }
+        }
 
         return (0);
 }
 
 static char *

@@ -505,24 +490,10 @@
         }
 
         return (str);
 }
 
-#if defined(__sparc)
-static const char * const regname[NPRGREG] = {
-        " %g0", " %g1", " %g2", " %g3", " %g4", " %g5", " %g6", " %g7",
-        " %o0", " %o1", " %o2", " %o3", " %o4", " %o5", " %sp", " %o7",
-        " %l0", " %l1", " %l2", " %l3", " %l4", " %l5", " %l6", " %l7",
-        " %i0", " %i1", " %i2", " %i3", " %i4", " %i5", " %fp", " %i7",
-#ifdef __sparcv9
-        "%ccr", " %pc", "%npc", "  %y", "%asi", "%fprs"
-#else
-        "%psr", " %pc", "%npc", "  %y", "%wim", "%tbr"
-#endif
-};
-#endif  /* __sparc */
-
 #if defined(__amd64)
 static const char * const regname[NPRGREG] = {
         "%r15", "%r14", "%r13", "%r12", "%r11", "%r10", " %r9", " %r8",
         "%rdi", "%rsi", "%rbp", "%rbx", "%rdx", "%rcx", "%rax", "%trapno",
         "%err", "%rip", " %cs", "%rfl", "%rsp", " %ss", " %fs", " %gs",

@@ -609,47 +580,5 @@
                         (void) putchar('\n');
         }
         if (i % cols != 0)
                 (void) putchar('\n');
 }
-
-#if defined(__sparc) && defined(_ILP32)
-static void
-dumpregs_v8p(const prgregset_t reg, const prxregset_t *xreg, int is64)
-{
-        static const uint32_t zero[8] = { 0 };
-        int gr, xr, cols = 2;
-        uint64_t xval;
-
-        if (memcmp(xreg->pr_un.pr_v8p.pr_xg, zero, sizeof (zero)) == 0 &&
-            memcmp(xreg->pr_un.pr_v8p.pr_xo, zero, sizeof (zero)) == 0) {
-                dumpregs(reg, is64);
-                return;
-        }
-
-        for (gr = R_G0, xr = XR_G0; gr <= R_G7; gr++, xr++) {
-                xval = (uint64_t)xreg->pr_un.pr_v8p.pr_xg[xr] << 32 |
-                    (uint64_t)(uint32_t)reg[gr];
-                (void) printf("  %s = 0x%.16" PRIX64, regname[gr], xval);
-                if ((gr + 1) % cols == 0)
-                        (void) putchar('\n');
-        }
-
-        for (gr = R_O0, xr = XR_O0; gr <= R_O7; gr++, xr++) {
-                xval = (uint64_t)xreg->pr_un.pr_v8p.pr_xo[xr] << 32 |
-                    (uint64_t)(uint32_t)reg[gr];
-                (void) printf("  %s = 0x%.16" PRIX64, regname[gr], xval);
-                if ((gr + 1) % cols == 0)
-                        (void) putchar('\n');
-        }
-
-        for (gr = R_L0; gr < NPRGREG; gr++) {
-                (void) printf("  %s =         0x%.8lX",
-                    regname[gr], (long)reg[gr]);
-                if ((gr + 1) % cols == 0)
-                        (void) putchar('\n');
-        }
-
-        if (gr % cols != 0)
-                (void) putchar('\n');
-}
-#endif  /* __sparc && _ILP32 */