Add packed integer add opcodes (v128) to instruction set enum
This commit is contained in:
@@ -391,6 +391,10 @@ pub enum SseOpcode {
|
||||
Mulsd,
|
||||
Orps,
|
||||
Orpd,
|
||||
Paddb,
|
||||
Paddd,
|
||||
Paddq,
|
||||
Paddw,
|
||||
Psllw,
|
||||
Pslld,
|
||||
Psllq,
|
||||
@@ -479,6 +483,10 @@ impl SseOpcode {
|
||||
| SseOpcode::Mulpd
|
||||
| SseOpcode::Mulsd
|
||||
| SseOpcode::Orpd
|
||||
| SseOpcode::Paddb
|
||||
| SseOpcode::Paddd
|
||||
| SseOpcode::Paddq
|
||||
| SseOpcode::Paddw
|
||||
| SseOpcode::Psllw
|
||||
| SseOpcode::Pslld
|
||||
| SseOpcode::Psllq
|
||||
@@ -559,6 +567,10 @@ impl fmt::Debug for SseOpcode {
|
||||
SseOpcode::Mulsd => "mulsd",
|
||||
SseOpcode::Orpd => "orpd",
|
||||
SseOpcode::Orps => "orps",
|
||||
SseOpcode::Paddb => "paddb",
|
||||
SseOpcode::Paddd => "paddd",
|
||||
SseOpcode::Paddq => "paddq",
|
||||
SseOpcode::Paddw => "paddw",
|
||||
SseOpcode::Psllw => "psllw",
|
||||
SseOpcode::Pslld => "pslld",
|
||||
SseOpcode::Psllq => "psllq",
|
||||
|
||||
@@ -1659,6 +1659,10 @@ pub(crate) fn emit(
|
||||
SseOpcode::Mulsd => (LegacyPrefix::_F2, 0x0F59),
|
||||
SseOpcode::Orpd => (LegacyPrefix::_66, 0x0F56),
|
||||
SseOpcode::Orps => (LegacyPrefix::None, 0x0F56),
|
||||
SseOpcode::Paddb => (LegacyPrefix::_66, 0x0FFC),
|
||||
SseOpcode::Paddd => (LegacyPrefix::_66, 0x0FFE),
|
||||
SseOpcode::Paddq => (LegacyPrefix::_66, 0x0FD4),
|
||||
SSeOpcode::Paddw => (LegacyPrefix::_66, 0x0FFD),
|
||||
SseOpcode::Subps => (LegacyPrefix::None, 0x0F5C),
|
||||
SseOpcode::Subpd => (LegacyPrefix::_66, 0x0F5C),
|
||||
SseOpcode::Subss => (LegacyPrefix::_F3, 0x0F5C),
|
||||
|
||||
@@ -349,10 +349,12 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
|
||||
let lhs = input_to_reg(ctx, inputs[0]);
|
||||
let rhs = input_to_reg_mem_imm(ctx, inputs[1]);
|
||||
let dst = output_to_reg(ctx, outputs[0]);
|
||||
let ty = ty.unwrap();
|
||||
|
||||
// TODO For commutative operations (add, mul, and, or, xor), try to commute the
|
||||
// operands if one is an immediate.
|
||||
|
||||
println!("Type: {}", ty);
|
||||
let is_64 = int_ty_is_64(ty.unwrap());
|
||||
let alu_op = match op {
|
||||
Opcode::Iadd | Opcode::IaddIfcout => AluRmiROpcode::Add,
|
||||
|
||||
Reference in New Issue
Block a user