Print this page
XXX AVX procfs


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 
  29 /*
  30  * User Process Target Intel 32-bit component
  31  *
  32  * This file provides the ISA-dependent portion of the user process target.
  33  * For more details on the implementation refer to mdb_proc.c.
  34  */
  35 
  36 #include <mdb/mdb_proc.h>
  37 #include <mdb/mdb_kreg.h>
  38 #include <mdb/mdb_err.h>
  39 #include <mdb/mdb_amd64util.h>
  40 #include <mdb/mdb.h>
  41 
  42 #include <sys/frame.h>
  43 #include <libproc.h>
  44 #include <sys/fp.h>
  45 #include <ieeefp.h>
  46 
  47 const mdb_tgt_regdesc_t pt_regdesc[] = {
  48         { "r15",        REG_R15,        MDB_TGT_R_EXPORT },


 170             (rflags & KREG_EFLAGS_IOPL_MASK) >> KREG_EFLAGS_IOPL_SHIFT);
 171 
 172         mdb_printf("  status=<%s,%s,%s,%s,%s,%s,%s,%s,%s>\n",
 173             (rflags & KREG_EFLAGS_OF_MASK) ? "OF" : "of",
 174             (rflags & KREG_EFLAGS_DF_MASK) ? "DF" : "df",
 175             (rflags & KREG_EFLAGS_IF_MASK) ? "IF" : "if",
 176             (rflags & KREG_EFLAGS_TF_MASK) ? "TF" : "tf",
 177             (rflags & KREG_EFLAGS_SF_MASK) ? "SF" : "sf",
 178             (rflags & KREG_EFLAGS_ZF_MASK) ? "ZF" : "zf",
 179             (rflags & KREG_EFLAGS_AF_MASK) ? "AF" : "af",
 180             (rflags & KREG_EFLAGS_PF_MASK) ? "PF" : "pf",
 181             (rflags & KREG_EFLAGS_CF_MASK) ? "CF" : "cf");
 182 
 183         mdb_printf("\n");
 184 
 185         mdb_printf("%%gsbase = 0x%0?p\n", grs[REG_GSBASE]);
 186         mdb_printf("%%fsbase = 0x%0?p\n", grs[REG_FSBASE]);
 187         mdb_printf("%%trapno = 0x%x\n", grs[REG_TRAPNO]);
 188         mdb_printf("   %%err = 0x%x\n", grs[REG_ERR]);
 189 
 190         return (set_errno(ENOTSUP));
 191 }
 192 
 193 static const char *
 194 fpcw2str(uint32_t cw, char *buf, size_t nbytes)
 195 {
 196         char *end = buf + nbytes;
 197         char *p = buf;
 198 
 199         buf[0] = '\0';
 200 
 201         /*
 202          * Decode all masks in the 80387 control word.
 203          */
 204         if (cw & FPIM)
 205                 p += mdb_snprintf(p, (size_t)(end - p), "|IM");
 206         if (cw & FPDM)
 207                 p += mdb_snprintf(p, (size_t)(end - p), "|DM");
 208         if (cw & FPZM)
 209                 p += mdb_snprintf(p, (size_t)(end - p), "|ZM");
 210         if (cw & FPOM)




   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 


  27 /*
  28  * User Process Target Intel 32-bit component
  29  *
  30  * This file provides the ISA-dependent portion of the user process target.
  31  * For more details on the implementation refer to mdb_proc.c.
  32  */
  33 
  34 #include <mdb/mdb_proc.h>
  35 #include <mdb/mdb_kreg.h>
  36 #include <mdb/mdb_err.h>
  37 #include <mdb/mdb_amd64util.h>
  38 #include <mdb/mdb.h>
  39 
  40 #include <sys/frame.h>
  41 #include <libproc.h>
  42 #include <sys/fp.h>
  43 #include <ieeefp.h>
  44 
  45 const mdb_tgt_regdesc_t pt_regdesc[] = {
  46         { "r15",        REG_R15,        MDB_TGT_R_EXPORT },


 168             (rflags & KREG_EFLAGS_IOPL_MASK) >> KREG_EFLAGS_IOPL_SHIFT);
 169 
 170         mdb_printf("  status=<%s,%s,%s,%s,%s,%s,%s,%s,%s>\n",
 171             (rflags & KREG_EFLAGS_OF_MASK) ? "OF" : "of",
 172             (rflags & KREG_EFLAGS_DF_MASK) ? "DF" : "df",
 173             (rflags & KREG_EFLAGS_IF_MASK) ? "IF" : "if",
 174             (rflags & KREG_EFLAGS_TF_MASK) ? "TF" : "tf",
 175             (rflags & KREG_EFLAGS_SF_MASK) ? "SF" : "sf",
 176             (rflags & KREG_EFLAGS_ZF_MASK) ? "ZF" : "zf",
 177             (rflags & KREG_EFLAGS_AF_MASK) ? "AF" : "af",
 178             (rflags & KREG_EFLAGS_PF_MASK) ? "PF" : "pf",
 179             (rflags & KREG_EFLAGS_CF_MASK) ? "CF" : "cf");
 180 
 181         mdb_printf("\n");
 182 
 183         mdb_printf("%%gsbase = 0x%0?p\n", grs[REG_GSBASE]);
 184         mdb_printf("%%fsbase = 0x%0?p\n", grs[REG_FSBASE]);
 185         mdb_printf("%%trapno = 0x%x\n", grs[REG_TRAPNO]);
 186         mdb_printf("   %%err = 0x%x\n", grs[REG_ERR]);
 187 
 188         return (DCMD_OK);
 189 }
 190 
 191 static const char *
 192 fpcw2str(uint32_t cw, char *buf, size_t nbytes)
 193 {
 194         char *end = buf + nbytes;
 195         char *p = buf;
 196 
 197         buf[0] = '\0';
 198 
 199         /*
 200          * Decode all masks in the 80387 control word.
 201          */
 202         if (cw & FPIM)
 203                 p += mdb_snprintf(p, (size_t)(end - p), "|IM");
 204         if (cw & FPDM)
 205                 p += mdb_snprintf(p, (size_t)(end - p), "|DM");
 206         if (cw & FPZM)
 207                 p += mdb_snprintf(p, (size_t)(end - p), "|ZM");
 208         if (cw & FPOM)