Fix the Intel encoding of band_not.

The andnps instruction inverts its first argument while band_not inverts
is second argument.

Use a swapped-operands "fax" encoding recipe.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-27 18:14:13 -07:00
parent 1d481d7897
commit a274cdf275
4 changed files with 27 additions and 16 deletions

View File

@@ -239,14 +239,22 @@ rrx = TailRecipe(
modrm_rr(in_reg1, in_reg0, sink);
''')
# XX /r with FPR ins and outs. RM form.
frm = TailRecipe(
'frm', Binary, size=1, ins=(FPR, FPR), outs=0,
# XX /r with FPR ins and outs. A form.
fa = TailRecipe(
'fa', Binary, size=1, ins=(FPR, FPR), outs=0,
emit='''
PUT_OP(bits, rex2(in_reg1, in_reg0), sink);
modrm_rr(in_reg1, in_reg0, sink);
''')
# XX /r with FPR ins and outs. A form with input operands swapped.
fax = TailRecipe(
'fax', Binary, size=1, ins=(FPR, FPR), outs=1,
emit='''
PUT_OP(bits, rex2(in_reg0, in_reg1), sink);
modrm_rr(in_reg0, in_reg1, sink);
''')
# XX /r, but for a unary operator with separate input/output register, like
# copies. MR form.
umr = TailRecipe(