Skip to content

Commit

Permalink
always put prefix as byte code
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Nov 7, 2023
1 parent 3374a15 commit b9e4bb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xbyak/xbyak.h
Original file line number Diff line number Diff line change
Expand Up @@ -1758,15 +1758,15 @@ class CodeGenerator : public CodeArray {
// except movsx(16bit, 32/64bit)
uint8_t p66 = (op1.isBit(16) && !op2.isBit(i32e)) || (op2.isBit(16) && !op1.isBit(i32e)) ? 0x66 : 0;
if (p66) db(p66);
if ((type & (T_VEX|T_EVEX|T_MUST_EVEX)) == 0) {
// if ((type & (T_VEX|T_EVEX|T_MUST_EVEX)) == 0) {
if ((type & T_F2) == T_F2) {
db(0xF2);
} else if (type & T_66) {
if (!p66) db(0x66); // only once
} else if (type & T_F3) {
db(0xF3);
}
}
// }
if (p2->isMEM()) {
const Reg& r = *static_cast<const Reg*>(p1);
const Address& addr = p2->getAddress();
Expand Down Expand Up @@ -2027,15 +2027,15 @@ class CodeGenerator : public CodeArray {
}
void writeCode2(int type, const Reg& r, int code)
{
if ((type & (T_VEX|T_EVEX|T_MUST_EVEX)) == 0) {
// if ((type & (T_VEX|T_EVEX|T_MUST_EVEX)) == 0) {
if (type & T_0F) {
db(0x0F);
} else if (type & T_0F38) {
db(0x0F); db(0x38);
} else if (type & T_0F3A) {
db(0x0F); db(0x3A);
}
}
// }
db(code | (type == 0 && !r.isBit(8)));
}
void opModR(const Reg& reg1, const Reg& reg2, int code0, int code1 = NONE, int code2 = NONE)
Expand Down

0 comments on commit b9e4bb2

Please sign in to comment.