Add vector instructions.

Use derived type variables with the 'LaneOf' function.

Add u8 immediates to be used for lane indexes and bit shifts.
This commit is contained in:
Jakob Stoklund Olesen
2016-05-20 15:36:03 -07:00
parent b44d6c6541
commit b1dd4ad373
8 changed files with 73 additions and 38 deletions

View File

@@ -159,6 +159,10 @@ pub fn write_instruction(w: &mut Write, func: &Function, inst: Inst) -> Result {
Select { opcode, args, .. } => {
writeln!(w, "{} {}, {}, {}", opcode, args[0], args[1], args[2])
}
InsertLane { opcode, lane, args, .. } => {
writeln!(w, "{} {}, {}, {}", opcode, args[0], lane, args[1])
}
ExtractLane { opcode, lane, arg, .. } => writeln!(w, "{} {}, {}", opcode, arg, lane),
Jump { opcode, ref data, .. } => writeln!(w, "{} {}", opcode, data),
Branch { opcode, ref data, .. } => writeln!(w, "{} {}", opcode, data),
BranchTable { opcode, arg, table, .. } => writeln!(w, "{} {}, {}", opcode, arg, table),