Handle SWAPGS.
[jmk] --rw-rw-r-- M 174505 glenda sys 50731 Nov 24 01:13 sys/src/libmach/8db.c
/n/sourcesdump/2005/1124/plan9/sys/src/libmach/8db.c:299,307 -
/n/sourcesdump/2005/1125/plan9/sys/src/libmach/8db.c:299,312
[0x03] 0,0, "MOVL %e,IDTR",
[0x04] 0,0, "MOVW MSW,%e", /* word */
[0x06] 0,0, "MOVW %e,MSW", /* word */
- [0x07] 0,0, "INVLPG %e", /* TO DO: distinguish SWAPGS? */
+ [0x07] 0,0, "INVLPG %e", /* or SWAPGS */
};
+ static Optable optab0F01F8[1]=
+ {
+ [0x00] 0,0, "SWAPGS",
+ };
+
/* 0F71 */
/* 0F72 */
/* 0F73 */
/n/sourcesdump/2005/1124/plan9/sys/src/libmach/8db.c:1571,1578 -
/n/sourcesdump/2005/1125/plan9/sys/src/libmach/8db.c:1576,1585
return 0;
if (modrm(map, ip, c) < 0)
return 0;
- c = ip->reg;
obase = (Optable*)op->proto;
+ if(ip->amd64 && obase == optab0F01 && c == 0xF8)
+ return optab0F01F8;
+ c = ip->reg;
goto newop;
case FRMOP: /* FP R/M field with op code (/digit) */
if (igetc(map, ip, &c) < 0)
|