# HG changeset patch # User Bryan Cantrill # Date 1355426745 28800 # Node ID dbedaaf7ebd83d49296f96b53fdc1ac55078c769 # Parent 93cd9d7e48de596160c3c5558440045a960f9fcd 3413 isainfo -v overflows 80 columns 3417 mdb disassembler confuses rdtscp for invlpg Reviewed by: Robert Mustacchi Reviewed by: Hans Rosenfeld Approved by: Garrett D'Amore diff -r 93cd9d7e48de -r dbedaaf7ebd8 usr/src/cmd/isainfo/isainfo.c --- a/usr/src/cmd/isainfo/isainfo.c Wed Nov 14 10:16:04 2012 -0800 +++ b/usr/src/cmd/isainfo/isainfo.c Thu Dec 13 11:25:45 2012 -0800 @@ -23,7 +23,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ #include #include @@ -161,13 +163,13 @@ int linecnt = 0; for (p = strtok(buffer, " "); p; p = strtok(NULL, " ")) { + if (linecnt + strlen(p) > 68) { + (void) printf("\n"); + linecnt = 0; + } if (linecnt == 0) linecnt = printf("\t"); linecnt += printf("%s ", p); - if (linecnt > 68) { - (void) printf("\n"); - linecnt = 0; - } } if (linecnt != 0) (void) printf("\n"); diff -r 93cd9d7e48de -r dbedaaf7ebd8 usr/src/common/dis/i386/dis_tables.c --- a/usr/src/common/dis/i386/dis_tables.c Wed Nov 14 10:16:04 2012 -0800 +++ b/usr/src/common/dis/i386/dis_tables.c Thu Dec 13 11:25:45 2012 -0800 @@ -21,7 +21,7 @@ */ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* @@ -106,7 +106,7 @@ Mb, /* register or memory, always byte sized */ MO, /* memory only (no registers) */ PREF, - SWAPGS, + SWAPGS_RDTSCP, MONITOR_MWAIT, R, RA, @@ -500,7 +500,7 @@ const instable_t dis_op0F01[8] = { /* [0] */ TNSZ("sgdt",VMx,6), TNSZ("sidt",MONITOR_MWAIT,6), TNSZ("lgdt",XGETBV_XSETBV,6), TNSZ("lidt",SVM,6), -/* [4] */ TNSZ("smsw",M,2), INVALID, TNSZ("lmsw",M,2), TNS("invlpg",SWAPGS), +/* [4] */ TNSZ("smsw",M,2), INVALID, TNSZ("lmsw",M,2), TNS("invlpg",SWAPGS_RDTSCP), }; /* @@ -3493,14 +3493,21 @@ dtrace_get_operand(x, mode, r_m, wbit, 0); break; - case SWAPGS: + case SWAPGS_RDTSCP: if (cpu_mode == SIZE64 && mode == 3 && r_m == 0) { #ifdef DIS_TEXT (void) strncpy(x->d86_mnem, "swapgs", OPLEN); #endif NOMEM; break; + } else if (mode == 3 && r_m == 1) { +#ifdef DIS_TEXT + (void) strncpy(x->d86_mnem, "rdtscp", OPLEN); +#endif + NOMEM; + break; } + /*FALLTHROUGH*/ /* prefetch instruction - memory operand, but no memory acess */