Add bitwise operations with an immediate operand.

This commit is contained in:
Jakob Stoklund Olesen
2016-08-23 14:42:03 -07:00
parent fe7ad84129
commit 5a5688e446

View File

@@ -442,6 +442,29 @@ bnot = Instruction(
""",
ins=x, outs=a)
# Bitwise binary ops with immediate arg.
x = Operand('x', iB)
Y = Operand('Y', imm64)
a = Operand('a', iB)
band_imm = Instruction(
'band_imm', """
Bitwise and with immediate.
""",
ins=(x, Y), outs=a)
bor_imm = Instruction(
'bor_imm', """
Bitwise or with immediate.
""",
ins=(x, Y), outs=a)
bxor_imm = Instruction(
'bxor_imm', """
Bitwise xor with immediate.
""",
ins=(x, Y), outs=a)
# Shift/rotate.
x = Operand('x', Int, doc='Scalar or vector value to shift')
y = Operand('y', iB, doc='Number of bits to shift')