one_byte_opcodes.isa revision 6460:59108c231208
12SN/A// Copyright (c) 2007-2008 The Hewlett-Packard Development Company 21762SN/A// All rights reserved. 32SN/A// 42SN/A// Redistribution and use of this software in source and binary forms, 52SN/A// with or without modification, are permitted provided that the 62SN/A// following conditions are met: 72SN/A// 82SN/A// The software must be used only for Non-Commercial Use which means any 92SN/A// use which is NOT directed to receiving any direct monetary 102SN/A// compensation for, or commercial advantage from such use. Illustrative 112SN/A// examples of non-commercial use are academic research, personal study, 122SN/A// teaching, education and corporate research & development. 132SN/A// Illustrative examples of commercial use are distributing products for 142SN/A// commercial advantage and providing services using the software for 152SN/A// commercial advantage. 162SN/A// 172SN/A// If you wish to use this software or functionality therein that may be 182SN/A// covered by patents for commercial use, please contact: 192SN/A// Director of Intellectual Property Licensing 202SN/A// Office of Strategy and Technology 212SN/A// Hewlett-Packard Company 222SN/A// 1501 Page Mill Road 232SN/A// Palo Alto, California 94304 242SN/A// 252SN/A// Redistributions of source code must retain the above copyright notice, 262SN/A// this list of conditions and the following disclaimer. Redistributions 272665Ssaidi@eecs.umich.edu// in binary form must reproduce the above copyright notice, this list of 282665Ssaidi@eecs.umich.edu// conditions and the following disclaimer in the documentation and/or 292SN/A// other materials provided with the distribution. Neither the name of 302SN/A// the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 313877Sbinkertn@umich.edu// contributors may be used to endorse or promote products derived from 323877Sbinkertn@umich.edu// this software without specific prior written permission. No right of 332147SN/A// sublicense is granted herewith. Derivatives of the software and 342SN/A// output created using the software may be prepared, but only for 352SN/A// Non-Commercial Uses. Derivatives of the software may be shared with 362SN/A// others provided: (i) the others agree to abide by the list of 377866Snate@binkert.org// conditions herein which includes the Non-Commercial Use restrictions; 382SN/A// and (ii) such Derivatives of the software include the above copyright 392SN/A// notice to acknowledge the contribution from this software where 407057Snate@binkert.org// applicable, this list of conditions and the disclaimer below. 417057Snate@binkert.org// 427057Snate@binkert.org// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 432SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 447057Snate@binkert.org// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 452SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 462SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 472SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 482SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 492SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 502SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 512SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 522SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 532SN/A// 542SN/A// Authors: Gabe Black 552SN/A 562SN/A//////////////////////////////////////////////////////////////////// 571078SN/A// 582SN/A// Decode the one byte opcodes 592SN/A// 601114SN/A 611114SN/A0x1: decode OPCODE_OP_TOP5 { 622SN/A format Inst { 632SN/A 0x00: decode OPCODE_OP_BOTTOM3 { 642SN/A 0x6: decode MODE_SUBMODE { 652SN/A 0x0: UD2(); 661114SN/A default: WarnUnimpl::push_ES(); 671114SN/A } 682SN/A 0x7: decode MODE_SUBMODE { 692SN/A 0x0: UD2(); 702SN/A default: WarnUnimpl::pop_ES(); 711114SN/A } 721114SN/A default: MultiInst::ADD(OPCODE_OP_BOTTOM3, 731114SN/A [Eb,Gb], [Ev,Gv], 741114SN/A [Gb,Eb], [Gv,Ev], 751114SN/A [rAb,Ib], [rAv,Iz]); 761114SN/A } 771114SN/A 0x01: decode OPCODE_OP_BOTTOM3 { 781114SN/A 0x6: decode MODE_SUBMODE { 791114SN/A 0x0: UD2(); 802SN/A default: WarnUnimpl::push_CS(); 812SN/A } 823877Sbinkertn@umich.edu //Any time this is seen, it should generate a two byte opcode 832SN/A 0x7: M5InternalError::error( 84502SN/A {{"Saw a one byte opcode whose value was 0x0F!"}}); 852SN/A default: MultiInst::OR(OPCODE_OP_BOTTOM3, 862SN/A [Eb,Gb], [Ev,Gv], 877866Snate@binkert.org [Gb,Eb], [Gv,Ev], 887866Snate@binkert.org [rAb,Ib], [rAv,Iz]); 897866Snate@binkert.org } 902SN/A 0x02: decode OPCODE_OP_BOTTOM3 { 913877Sbinkertn@umich.edu 0x6: decode MODE_SUBMODE { 923877Sbinkertn@umich.edu 0x0: UD2(); 931114SN/A default: WarnUnimpl::push_SS(); 942SN/A } 952SN/A 0x7: decode MODE_SUBMODE { 962SN/A 0x0: UD2(); 972SN/A default: WarnUnimpl::pop_SS(); 982SN/A } 992SN/A default: MultiInst::ADC(OPCODE_OP_BOTTOM3, 1008220Snate@binkert.org [Eb,Gb], [Ev,Gv], 1012SN/A [Gb,Eb], [Gv,Ev], 1022SN/A [rAb,Ib], [rAv,Iz]); 1032SN/A } 1048220Snate@binkert.org 0x03: decode OPCODE_OP_BOTTOM3 { 1052SN/A 0x6: decode MODE_SUBMODE { 1062SN/A 0x0: UD2(); 1072SN/A default: WarnUnimpl::push_DS(); 1088220Snate@binkert.org } 1092SN/A 0x7: decode MODE_SUBMODE { 1102SN/A 0x0: UD2(); 1112SN/A default: WarnUnimpl::pop_DS(); 1128220Snate@binkert.org } 1132SN/A default: MultiInst::SBB(OPCODE_OP_BOTTOM3, 1142SN/A [Eb,Gb], [Ev,Gv], 1152SN/A [Gb,Eb], [Gv,Ev], 1168220Snate@binkert.org [rAb,Ib], [rAv,Iz]); 1172SN/A } 1182SN/A 0x04: decode OPCODE_OP_BOTTOM3 { 1192SN/A 0x6: M5InternalError::error( 1208220Snate@binkert.org {{"Tried to execute the ES segment override prefix!"}}); 1212SN/A 0x7: decode MODE_SUBMODE { 1222SN/A 0x0: UD2(); 1233877Sbinkertn@umich.edu default: WarnUnimpl::daa(); 124 } 125 default: MultiInst::AND(OPCODE_OP_BOTTOM3, 126 [Eb,Gb], [Ev,Gv], 127 [Gb,Eb], [Gv,Ev], 128 [rAb,Ib], [rAv,Iz]); 129 } 130 0x05: decode OPCODE_OP_BOTTOM3 { 131 0x6: M5InternalError::error( 132 {{"Tried to execute the CS segment override prefix!"}}); 133 0x7: decode MODE_SUBMODE { 134 0x0: UD2(); 135 default: WarnUnimpl::das(); 136 } 137 default: MultiInst::SUB(OPCODE_OP_BOTTOM3, 138 [Eb,Gb], [Ev,Gv], 139 [Gb,Eb], [Gv,Ev], 140 [rAb,Ib], [rAv,Iz]); 141 } 142 0x06: decode OPCODE_OP_BOTTOM3 { 143 0x6: M5InternalError::error( 144 {{"Tried to execute the SS segment override prefix!"}}); 145 0x7: decode MODE_SUBMODE { 146 0x0: UD2(); 147 default: WarnUnimpl::aaa(); 148 } 149 default: MultiInst::XOR(OPCODE_OP_BOTTOM3, 150 [Eb,Gb], [Ev,Gv], 151 [Gb,Eb], [Gv,Ev], 152 [rAb,Ib], [rAv,Iz]); 153 } 154 0x07: decode OPCODE_OP_BOTTOM3 { 155 0x6: M5InternalError::error( 156 {{"Tried to execute the DS segment override prefix!"}}); 157 0x7: decode MODE_SUBMODE { 158 0x0: UD2(); 159 default: WarnUnimpl::aas(); 160 } 161 default: MultiInst::CMP(OPCODE_OP_BOTTOM3, 162 [Eb,Gb], [Ev,Gv], 163 [Gb,Eb], [Gv,Ev], 164 [rAb,Ib], [rAv,Iz]); 165 } 166 0x08: decode MODE_SUBMODE { 167 0x0: M5InternalError::error ( 168 {{"Tried to execute an REX prefix!"}}); 169 default: INC(Bv); 170 } 171 0x09: decode MODE_SUBMODE { 172 0x0: M5InternalError::error ( 173 {{"Tried to execute an REX prefix!"}}); 174 default: DEC(Bv); 175 } 176 0x0A: PUSH(Bv); 177 0x0B: POP(Bv); 178 0x0C: decode OPCODE_OP_BOTTOM3 { 179 0x0: decode MODE_SUBMODE { 180 0x0: UD2(); 181 default: PUSHA(); 182 } 183 0x1: decode MODE_SUBMODE { 184 0x0: UD2(); 185 default: POPA(); 186 } 187 0x2: decode MODE_SUBMODE { 188 0x0: UD2(); 189 default: BOUND(Gv,Mv); 190 } 191 0x3: decode MODE_SUBMODE { 192 //The second operand should really be of size "d", but it's 193 //set to "v" in order to have a consistent register size. 194 //This shouldn't affect behavior. 195 0x0: MOVSXD(Gv,Ev); 196 default: WarnUnimpl::arpl_Ew_Gw(); 197 } 198 0x4: M5InternalError::error( 199 {{"Tried to execute the FS segment override prefix!"}}); 200 0x5: M5InternalError::error( 201 {{"Tried to execute the GS segment override prefix!"}}); 202 0x6: M5InternalError::error( 203 {{"Tried to execute the operand size override prefix!"}}); 204 0x7: M5InternalError::error( 205 {{"Tried to execute the DS address size override prefix!"}}); 206 } 207 0x0D: decode OPCODE_OP_BOTTOM3 { 208 0x0: PUSH(Iz); 209 0x1: IMUL(Gv,Ev,Iz); 210 0x2: PUSH(Ib); 211 0x3: IMUL(Gv,Ev,Ib); 212 0x4: StringInst::INS(Yb,rD); 213 0x5: StringInst::INS(Yz,rD); 214 0x6: StringInst::OUTS(rD,Xb); 215 0x7: StringInst::OUTS(rD,Xz); 216 } 217 0x0E: decode OPCODE_OP_BOTTOM3 { 218 0x0: JO(Jb); 219 0x1: JNO(Jb); 220 0x2: JB(Jb); 221 0x3: JNB(Jb); 222 0x4: JZ(Jb); 223 0x5: JNZ(Jb); 224 0x6: JBE(Jb); 225 0x7: JNBE(Jb); 226 } 227 0x0F: decode OPCODE_OP_BOTTOM3 { 228 0x0: JS(Jb); 229 0x1: JNS(Jb); 230 0x2: JP(Jb); 231 0x3: JNP(Jb); 232 0x4: JL(Jb); 233 0x5: JNL(Jb); 234 0x6: JLE(Jb); 235 0x7: JNLE(Jb); 236 } 237 0x10: decode OPCODE_OP_BOTTOM3 { 238 //0x0: group1_Eb_Ib(); 239 0x0: decode MODRM_REG { 240 0x0: ADD(Eb,Ib); 241 0x1: OR(Eb,Ib); 242 0x2: ADC(Eb,Ib); 243 0x3: SBB(Eb,Ib); 244 0x4: AND(Eb,Ib); 245 0x5: SUB(Eb,Ib); 246 0x6: XOR(Eb,Ib); 247 0x7: CMP(Eb,Ib); 248 } 249 //0x1: group1_Ev_Iz(); 250 0x1: decode MODRM_REG { 251 0x0: ADD(Ev,Iz); 252 0x1: OR(Ev,Iz); 253 0x2: ADC(Ev,Iz); 254 0x3: SBB(Ev,Iz); 255 0x4: AND(Ev,Iz); 256 0x5: SUB(Ev,Iz); 257 0x6: XOR(Ev,Iz); 258 0x7: CMP(Ev,Iz); 259 } 260 0x2: decode MODE_SUBMODE { 261 0x0: UD2(); 262 //default: group1_Eb_Ib(); 263 default: decode MODRM_REG { 264 0x0: ADD(Eb,Ib); 265 0x1: OR(Eb,Ib); 266 0x2: ADC(Eb,Ib); 267 0x3: SBB(Eb,Ib); 268 0x4: AND(Eb,Ib); 269 0x5: SUB(Eb,Ib); 270 0x6: XOR(Eb,Ib); 271 0x7: CMP(Eb,Ib); 272 } 273 } 274 //0x3: group1_Ev_Ib(); 275 0x3: decode MODRM_REG { 276 0x0: ADD(Ev,Ib); 277 0x1: OR(Ev,Ib); 278 0x2: ADC(Ev,Ib); 279 0x3: SBB(Ev,Ib); 280 0x4: AND(Ev,Ib); 281 0x5: SUB(Ev,Ib); 282 0x6: XOR(Ev,Ib); 283 0x7: CMP(Ev,Ib); 284 } 285 0x4: TEST(Eb,Gb); 286 0x5: TEST(Ev,Gv); 287 0x6: XCHG(Eb,Gb); 288 0x7: XCHG(Ev,Gv); 289 } 290 0x11: decode OPCODE_OP_BOTTOM3 { 291 0x0: MOV(Eb,Gb); 292 0x1: MOV(Ev,Gv); 293 0x2: MOV(Gb,Eb); 294 0x3: MOV(Gv,Ev); 295 0x4: decode MODRM_REG { 296 0x0, 0x1, 0x2, 297 0x3, 0x4, 0x5: MOV(Ev,Sv); 298 } 299 0x5: LEA(Gv,M); 300 0x6: decode MODE_SUBMODE { 301 0x3, 0x4: MOV_REAL(Sv,Ev); 302 default: decode MODRM_REG { 303 0x1: UD2(); // Moving to the CS selector is illegal. 304 0x2: MOVSS(Sv,Ev); 305 0x0, 0x3, 306 0x4, 0x5: MOV(Sv,Ev); 307 default: UD2(); 308 } 309 } 310 //0x7: group10_Ev(); 311 0x7: decode MODRM_REG { 312 0x0: POP(Ev); 313 default: UD2(); 314 } 315 } 316 0x12: decode OPCODE_OP_BOTTOM3 { 317 0x0: NOP(); //XXX repe makes this a "pause" 318 default: XCHG(Bv,rAv); 319 } 320 0x13: decode OPCODE_OP_BOTTOM3 { 321 0x0: CDQE(rAv); 322 0x1: CQO(rAv,rDv); 323 0x2: decode MODE_SUBMODE { 324 0x0: UD2(); 325 default: WarnUnimpl::call_far_Ap(); 326 } 327 0x3: WarnUnimpl::fwait(); //aka wait 328 0x4: PUSHF(); 329 0x5: POPF(); 330 //The 64 bit versions of both of these should be illegal only 331 //if CPUID says it isn't supported. For now, we'll just assume 332 //that it's supported. 333 0x6: SAHF(); 334 0x7: LAHF(); 335 } 336 0x14: decode OPCODE_OP_BOTTOM3 { 337 0x0: MOV(rAb, Ob); 338 0x1: MOV(rAv, Ov); 339 0x2: MOV(Ob, rAb); 340 0x3: MOV(Ov, rAv); 341 0x4: StringInst::MOVS(Yb,Xb); 342 0x5: StringInst::MOVS(Yv,Xv); 343 0x6: StringTestInst::CMPS(Yb,Xb); 344 0x7: StringTestInst::CMPS(Yv,Xv); 345 } 346 0x15: decode OPCODE_OP_BOTTOM3 { 347 0x0: TEST(rAb,Ib); 348 0x1: TEST(rAv,Iz); 349 0x2: StringInst::STOS(Yb); 350 0x3: StringInst::STOS(Yv); 351 0x4: StringInst::LODS(Xb); 352 0x5: StringInst::LODS(Xv); 353 0x6: StringTestInst::SCAS(Yb); 354 0x7: StringTestInst::SCAS(Yv); 355 } 356 0x16: MOV(Bb,Ib); 357 0x17: MOV(Bv,Iv); 358 0x18: decode OPCODE_OP_BOTTOM3 { 359 //0x0: group2_Eb_Ib(); 360 0x0: decode MODRM_REG { 361 0x0: ROL(Eb,Ib); 362 0x1: ROR(Eb,Ib); 363 0x2: RCL(Eb,Ib); 364 0x3: RCR(Eb,Ib); 365 0x4: SAL(Eb,Ib); 366 0x5: SHR(Eb,Ib); 367 0x6: SAL(Eb,Ib); 368 0x7: SAR(Eb,Ib); 369 } 370 //0x1: group2_Ev_Ib(); 371 0x1: decode MODRM_REG { 372 0x0: ROL(Ev,Ib); 373 0x1: ROR(Ev,Ib); 374 0x2: RCL(Ev,Ib); 375 0x3: RCR(Ev,Ib); 376 0x4: SAL(Ev,Ib); 377 0x5: SHR(Ev,Ib); 378 0x6: SAL(Ev,Ib); 379 0x7: SAR(Ev,Ib); 380 } 381 0x2: RET_NEAR(Iw); 382 0x3: RET_NEAR(); 383 0x4: decode MODE_SUBMODE { 384 0x0: UD2(); 385 default: WarnUnimpl::les_Gz_Mp(); 386 } 387 0x5: decode MODE_SUBMODE { 388 0x0: UD2(); 389 default: WarnUnimpl::lds_Gz_Mp(); 390 } 391 //0x6: group12_Eb_Ib(); 392 0x6: decode MODRM_REG { 393 0x0: MOV(Eb,Ib); 394 default: UD2(); 395 } 396 //0x7: group12_Ev_Iz(); 397 0x7: decode MODRM_REG { 398 0x0: MOV(Ev,Iz); 399 default: UD2(); 400 } 401 } 402 format WarnUnimpl { 403 0x19: decode OPCODE_OP_BOTTOM3 { 404 // The second parameter here should be of size b, but 405 // immediate sizes are determined elsewhere and this would 406 // confuse the instruction type specialization code. 407 0x0: Inst::ENTER(Iw,Iw); 408 0x1: Inst::LEAVE(); 409 0x2: ret_far_Iw(); 410 0x3: decode MODE_SUBMODE { 411 0x3, 0x4: ret_far_real(); 412 default: Inst::RET_FAR(); 413 } 414 0x4: int3(); 415#if FULL_SYSTEM 416 0x5: int_Ib(); 417#else 418 // Really only the LSB matters, but the predecoder will sign 419 // extend it, and there's no easy way to specify only checking 420 // the first byte. 421 0x5: decode IMMEDIATE { 422 0xffffffffffffff80: 423 SyscallInst::int80('xc->syscall(Rax)', IsSyscall); 424 default: int_Ib(); 425 } 426#endif 427 0x6: decode MODE_SUBMODE { 428 0x0: Inst::UD2(); 429 default: into(); 430 } 431 0x7: decode MODE_SUBMODE { 432 0x4: Inst::IRET_REAL(); 433 0x3: Inst::IRET_VIRT(); 434 default: Inst::IRET_PROT(); 435 } 436 } 437 } 438 0x1A: decode OPCODE_OP_BOTTOM3 { 439 //0x0: group2_Eb_1(); 440 0x0: decode MODRM_REG { 441 0x0: ROL_1(Eb); 442 0x1: ROR_1(Eb); 443 0x2: RCL_1(Eb); 444 0x3: RCR_1(Eb); 445 0x4: SAL_1(Eb); 446 0x5: SHR_1(Eb); 447 0x6: SAL_1(Eb); 448 0x7: SAR_1(Eb); 449 } 450 //0x1: group2_Ev_1(); 451 0x1: decode MODRM_REG { 452 0x0: ROL_1(Ev); 453 0x1: ROR_1(Ev); 454 0x2: RCL_1(Ev); 455 0x3: RCR_1(Ev); 456 0x4: SAL_1(Ev); 457 0x5: SHR_1(Ev); 458 0x6: SAL_1(Ev); 459 0x7: SAR_1(Ev); 460 } 461 //0x2: group2_Eb_Cl(); 462 0x2: decode MODRM_REG { 463 0x0: ROL(Eb,rCb); 464 0x1: ROR(Eb,rCb); 465 0x2: RCL(Eb,rCb); 466 0x3: RCR(Eb,rCb); 467 0x4: SAL(Eb,rCb); 468 0x5: SHR(Eb,rCb); 469 0x6: SAL(Eb,rCb); 470 0x7: SAR(Eb,rCb); 471 } 472 //The second operand should have size "b", but to have 473 //consistent register sizes it's "v". This shouldn't have 474 //any affect on functionality. 475 //0x3: group2_Ev_Cl(); 476 0x3: decode MODRM_REG { 477 0x0: ROL(Ev,rCv); 478 0x1: ROR(Ev,rCv); 479 0x2: RCL(Ev,rCv); 480 0x3: RCR(Ev,rCv); 481 0x4: SAL(Ev,rCv); 482 0x5: SHR(Ev,rCv); 483 0x6: SAL(Ev,rCv); 484 0x7: SAR(Ev,rCv); 485 } 486 0x4: decode MODE_SUBMODE { 487 0x0: UD2(); 488 default: WarnUnimpl::aam_Ib(); 489 } 490 0x5: decode MODE_SUBMODE { 491 0x0: UD2(); 492 default: WarnUnimpl::aad_Ib(); 493 } 494 0x6: decode MODE_SUBMODE { 495 0x0: UD2(); 496 default: SALC(rAb); 497 } 498 0x7: XLAT(); 499 } 500 ##include "x87.isa" 501 0x1C: decode OPCODE_OP_BOTTOM3 { 502 0x0: LOOPNE(Jb); 503 0x1: LOOPE(Jb); 504 0x2: LOOP(Jb); 505 0x3: JRCX(Jb); 506 0x4: IN(rAb,Ib); 507 0x5: IN(rAv,Iv); 508 0x6: OUT(Ib,rAb); 509 0x7: OUT(Iv,rAv); 510 } 511 0x1D: decode OPCODE_OP_BOTTOM3 { 512 0x0: CALL_NEAR(Jz); 513 0x1: JMP(Jz); 514 0x2: decode MODE_SUBMODE { 515 0x0: UD2(); 516 0x1: JMP_FAR(Iz); 517 0x2: JMP_FAR(Iz); 518 0x3: JMP_FAR_REAL(Iz); 519 0x4: JMP_FAR_REAL(Iz); 520 } 521 0x3: JMP(Jb); 522 0x4: IN(rAb,rD); 523 0x5: IN(rAv,rD); 524 0x6: OUT(rD,rAb); 525 0x7: OUT(rD,rAv); 526 } 527 0x1E: decode OPCODE_OP_BOTTOM3 { 528 0x0: M5InternalError::error( 529 {{"Tried to execute the lock prefix!"}}); 530 0x1: WarnUnimpl::int1(); 531 0x2: M5InternalError::error( 532 {{"Tried to execute the repne prefix!"}}); 533 0x3: M5InternalError::error( 534 {{"Tried to execute the rep/repe prefix!"}}); 535 0x4: HLT(); 536 0x5: CMC(); 537 //0x6: group3_Eb(); 538 0x6: decode MODRM_REG { 539 0x0: TEST(Eb,Iz); 540 0x1: TEST(Eb,Iz); 541 0x2: NOT(Eb); 542 0x3: NEG(Eb); 543 0x4: MUL_B(Eb); 544 0x5: IMUL_B(Eb); 545 //This should be Eb, but it access the entire word value ax. 546 0x6: DIV_B(Ew); 547 0x7: IDIV(Eb); 548 } 549 //0x7: group3_Ev(); 550 0x7: decode MODRM_REG { 551 0x0: TEST(Ev,Iz); 552 0x1: TEST(Ev,Iz); 553 0x2: NOT(Ev); 554 0x3: NEG(Ev); 555 0x4: MUL(Ev); 556 0x5: IMUL(Ev); 557 0x6: DIV(Ev); 558 0x7: IDIV(Ev); 559 } 560 } 561 0x1F: decode OPCODE_OP_BOTTOM3 { 562 0x0: CLC(); 563 0x1: STC(); 564 0x2: CLI(); 565 0x3: STI(); 566 0x4: CLD(); 567 0x5: STD(); 568 //0x6: group4(); 569 0x6: decode MODRM_REG { 570 0x0: INC(Eb); 571 0x1: DEC(Eb); 572 default: UD2(); 573 } 574 //0x7: group5(); 575 0x7: decode MODRM_REG { 576 0x0: INC(Ev); 577 0x1: DEC(Ev); 578 0x2: CALL_NEAR(Ev); 579 0x3: WarnUnimpl::call_far_Mp(); 580 0x4: JMP(Ev); 581 0x5: decode MODE_SUBMODE { 582 0x0: JMP_FAR(Mz); 583 0x1: JMP_FAR(Mz); 584 0x2: JMP_FAR(Mz); 585 0x3: JMP_FAR_REAL(Mz); 586 0x4: JMP_FAR_REAL(Mz); 587 } 588 0x6: PUSH(Ev); 589 0x7: UD2(); 590 } 591 } 592 } 593 default: FailUnimpl::oneByteOps(); 594} 595