From 94935b77da2665200c82b0f83625a504fa6a6fd9 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 11 Oct 2020 00:40:07 -0700 Subject: more pseudo-op cleanup, track predication, record float sf field, more tests also make immediate representation more consistent --- src/lib.rs | 788 +++++++++++++++++------ tests/test.rs | 1967 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 2542 insertions(+), 213 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 491b3d1..d03c49b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -482,22 +482,77 @@ pub enum Opcode { Fcmp_unord_unc, Fclass_m_unc, Fclass_m, - Fma_s_sf, - Fma_sf, - Fpma_sf, - Fma_d_sf, - Fms_s_sf, - Fms_sf, - Fpms_sf, - Fms_d_sf, - Fnma_s_sf, - Fnma_sf, - Fpnma_sf, - Fnma_d_sf, + Fnorm, + Fnorm_d, + Fnorm_s, + Fmpy, + Fmpy_d, + Fmpy_s, + Fma_s, + Fma, + Fpma, + Fma_d, + Fms_s, + Fms, + Fpms, + Fms_d, + Fnma_s, + Fnma, + Fpnma, + Fnma_d, Xma_l, Xma_hu, Xma_h, Fselect, + + Cmp4_eq, + Cmp4_eq_and, + Cmp4_eq_or, + Cmp4_eq_or_andcm, + Cmp4_eq_unc, + Cmp4_ge_and, + Cmp4_ge_or, + Cmp4_ge_or_andcm, + Cmp4_gt_and, + Cmp4_gt_or, + Cmp4_gt_or_andcm, + Cmp4_le_and, + Cmp4_le_or, + Cmp4_le_or_andcm, + Cmp4_lt, + Cmp4_lt_and, + Cmp4_lt_or, + Cmp4_lt_or_andcm, + Cmp4_lt_unc, + Cmp4_ltu, + Cmp4_ltu_unc, + Cmp4_ne_and, + Cmp4_ne_or, + Cmp4_ne_or_andcm, + Cmp_eq, + Cmp_eq_and, + Cmp_eq_or, + Cmp_eq_or_andcm, + Cmp_eq_unc, + Cmp_ge_and, + Cmp_ge_or, + Cmp_ge_or_andcm, + Cmp_gt_and, + Cmp_gt_or, + Cmp_gt_or_andcm, + Cmp_le_and, + Cmp_le_or, + Cmp_le_or_andcm, + Cmp_lt, + Cmp_lt_and, + Cmp_lt_or, + Cmp_lt_or_andcm, + Cmp_lt_unc, + Cmp_ltu, + Cmp_ltu_unc, + Cmp_ne_and, + Cmp_ne_or, + Cmp_ne_or_andcm, } impl fmt::Display for Opcode { @@ -960,23 +1015,77 @@ impl fmt::Display for Opcode { Opcode::Fcmp_unord_unc => { write!(f, "fcmp.unord.unc") } Opcode::Fclass_m_unc => { write!(f, "fclass.m.unc") } Opcode::Fclass_m => { write!(f, "fclass.m") } - Opcode::Fma_s_sf => { write!(f, "fma.s.sf") } - Opcode::Fma_sf => { write!(f, "fma.sf") } - Opcode::Fpma_sf => { write!(f, "fpma.sf") } - Opcode::Fma_d_sf => { write!(f, "fma.d.sf") } - Opcode::Fms_s_sf => { write!(f, "fms.s.sf") } - Opcode::Fms_sf => { write!(f, "fms.sf") } - Opcode::Fpms_sf => { write!(f, "fpms.sf") } - Opcode::Fms_d_sf => { write!(f, "fms.d.sf") } - Opcode::Fnma_s_sf => { write!(f, "fnma.s.sf") } - Opcode::Fnma_sf => { write!(f, "fnma.sf") } - Opcode::Fpnma_sf => { write!(f, "fpnma.sf") } - Opcode::Fnma_d_sf => { write!(f, "fnma.d.sf") } + Opcode::Fma_s => { write!(f, "fma.s") } + Opcode::Fnorm => { write!(f, "fnorm") } + Opcode::Fnorm_d => { write!(f, "fnorm.d") } + Opcode::Fnorm_s => { write!(f, "fnorm.s") } + Opcode::Fmpy => { write!(f, "fmpy") } + Opcode::Fmpy_d => { write!(f, "fmpy.d") } + Opcode::Fmpy_s => { write!(f, "fmpy.s") } + Opcode::Fma => { write!(f, "fma") } + Opcode::Fpma => { write!(f, "fpma") } + Opcode::Fma_d => { write!(f, "fma.d") } + Opcode::Fms_s => { write!(f, "fms.s") } + Opcode::Fms => { write!(f, "fms") } + Opcode::Fpms => { write!(f, "fpms") } + Opcode::Fms_d => { write!(f, "fms.d") } + Opcode::Fnma_s => { write!(f, "fnma.s") } + Opcode::Fnma => { write!(f, "fnma") } + Opcode::Fpnma => { write!(f, "fpnma") } + Opcode::Fnma_d => { write!(f, "fnma.d") } Opcode::Xma_l => { write!(f, "xma.l") } Opcode::Xma_hu => { write!(f, "xma.hu") } Opcode::Xma_h => { write!(f, "xma.h") } Opcode::Fselect => { write!(f, "fselect") } + Opcode::Cmp4_eq => { write!(f, "cmp4.eq") }, + Opcode::Cmp4_eq_and => { write!(f, "cmp4.eq.and") }, + Opcode::Cmp4_eq_or => { write!(f, "cmp4.eq.or") }, + Opcode::Cmp4_eq_or_andcm => { write!(f, "cmp4.eq.or.andcm") }, + Opcode::Cmp4_eq_unc => { write!(f, "cmp4.eq.unc") }, + Opcode::Cmp4_ge_and => { write!(f, "cmp4.ge.and") }, + Opcode::Cmp4_ge_or => { write!(f, "cmp4.ge.or") }, + Opcode::Cmp4_ge_or_andcm => { write!(f, "cmp4.ge.or.andcm") }, + Opcode::Cmp4_gt_and => { write!(f, "cmp4.gt.and") }, + Opcode::Cmp4_gt_or => { write!(f, "cmp4.gt.or") }, + Opcode::Cmp4_gt_or_andcm => { write!(f, "cmp4.gt.or.andcm") }, + Opcode::Cmp4_le_and => { write!(f, "cmp4.le.and") }, + Opcode::Cmp4_le_or => { write!(f, "cmp4.le.or") }, + Opcode::Cmp4_le_or_andcm => { write!(f, "cmp4.le.or.andcm") }, + Opcode::Cmp4_lt => { write!(f, "cmp4.lt") }, + Opcode::Cmp4_lt_and => { write!(f, "cmp4.lt.and") }, + Opcode::Cmp4_lt_or => { write!(f, "cmp4.lt.or") }, + Opcode::Cmp4_lt_or_andcm => { write!(f, "cmp4.lt.or.andcm") }, + Opcode::Cmp4_lt_unc => { write!(f, "cmp4.lt.unc") }, + Opcode::Cmp4_ltu => { write!(f, "cmp4.ltu") }, + Opcode::Cmp4_ltu_unc => { write!(f, "cmp4.ltu.unc") }, + Opcode::Cmp4_ne_and => { write!(f, "cmp4.ne.and") }, + Opcode::Cmp4_ne_or => { write!(f, "cmp4.ne.or") }, + Opcode::Cmp4_ne_or_andcm => { write!(f, "cmp4.ne.or.andcm") }, + Opcode::Cmp_eq => { write!(f, "cmp.eq") }, + Opcode::Cmp_eq_and => { write!(f, "cmp.eq.and") }, + Opcode::Cmp_eq_or => { write!(f, "cmp.eq.or") }, + Opcode::Cmp_eq_or_andcm => { write!(f, "cmp.eq.or.andcm") }, + Opcode::Cmp_eq_unc => { write!(f, "cmp.eq.unc") }, + Opcode::Cmp_ge_and => { write!(f, "cmp.ge.and") }, + Opcode::Cmp_ge_or => { write!(f, "cmp.ge.or") }, + Opcode::Cmp_ge_or_andcm => { write!(f, "cmp.ge.or.andcm") }, + Opcode::Cmp_gt_and => { write!(f, "cmp.gt.and") }, + Opcode::Cmp_gt_or => { write!(f, "cmp.gt.or") }, + Opcode::Cmp_gt_or_andcm => { write!(f, "cmp.gt.or.andcm") }, + Opcode::Cmp_le_and => { write!(f, "cmp.le.and") }, + Opcode::Cmp_le_or => { write!(f, "cmp.le.or") }, + Opcode::Cmp_le_or_andcm => { write!(f, "cmp.le.or.andcm") }, + Opcode::Cmp_lt => { write!(f, "cmp.lt") }, + Opcode::Cmp_lt_and => { write!(f, "cmp.lt.and") }, + Opcode::Cmp_lt_or => { write!(f, "cmp.lt.or") }, + Opcode::Cmp_lt_or_andcm => { write!(f, "cmp.lt.or.andcm") }, + Opcode::Cmp_lt_unc => { write!(f, "cmp.lt.unc") }, + Opcode::Cmp_ltu => { write!(f, "cmp.ltu") }, + Opcode::Cmp_ltu_unc => { write!(f, "cmp.ltu.unc") }, + Opcode::Cmp_ne_and => { write!(f, "cmp.ne.and") }, + Opcode::Cmp_ne_or => { write!(f, "cmp.ne.or") }, + Opcode::Cmp_ne_or_andcm => { write!(f, "cmp.ne.or.andcm") }, } } } @@ -984,26 +1093,62 @@ impl fmt::Display for Opcode { #[derive(Default, Debug, PartialEq, Eq)] pub struct Instruction { opcode: Opcode, - // specify which operand, if any, is the last written operand in an instruction + sf: Option, // for float instructions, `sf` may indicate which FPSR status field to use. + predicate: u8, + // specify which operand, if any, is the last written operand in an instruction. dest_boundary: Option, operands: [Operand; 5], prefetch_hint: Option, } impl fmt::Display for Instruction { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - if let Opcode::Addl = self.opcode { + if self.predicate != 0 { + write!(f, "(p{:02}) ", self.predicate)?; + } + if let Opcode::Alloc = self.opcode { + return write!(f, "alloc {}={},{},{},{}", + self.operands[0], + self.operands[1], + self.operands[2].as_unsigned_imm(), + self.operands[3].as_unsigned_imm(), + self.operands[4].as_unsigned_imm(), + ); + } else if let Opcode::Addl = self.opcode { if self.operands[1] == Operand::GPRegister(GPRegister(0)) { return write!(f, "mov {}={}", self.operands[0], self.operands[2] ); } - } - if let Opcode::Br_cond = self.opcode { - return write!(f, "br{}{}{} {}", - [".few", ".many"][self.operands[1].as_unsigned_imm() as usize], + } else if let Opcode::Adds = self.opcode { + if self.operands[1] == Operand::ImmI64(0) { + return write!(f, "mov {}={}", + self.operands[0], + self.operands[2] + ); + } + } else if let Opcode::Br_cond = self.opcode { + return write!(f, "br{}{}{} {}{}", ["", ".spnt", ".dptk", ".dpnt"][self.operands[2].as_unsigned_imm() as usize], + [".few", ".many"][self.operands[1].as_unsigned_imm() as usize], ["", ".clr"][self.operands[3].as_unsigned_imm() as usize], + if let Operand::ImmI64(_) = self.operands[0] { + "$+" + } else { + "" + }, + self.operands[0], + ) + } else if let Opcode::Br_ret = self.opcode { + return write!(f, "br.ret{}{}{} {}{}", + [".sptk", ".spnt", ".dptk", ".dpnt"][self.operands[2].as_unsigned_imm() as usize], + [".few", ".many"][self.operands[1].as_unsigned_imm() as usize], + ["", ".clr"][self.operands[3].as_unsigned_imm() as usize], + if let Operand::ImmI64(_) = self.operands[0] { + "$+" + } else { + "" + }, self.operands[0], ) } else if self.opcode == Opcode::Mov_mwh_ih { @@ -1020,8 +1165,10 @@ impl fmt::Display for Instruction { self.operands[0], self.operands[1], ) - } else { - write!(f, "{}", self.opcode)?; + } + write!(f, "{}", self.opcode)?; + if let Some(sf) = self.sf { + write!(f, ".s{}", sf)?; } for (i, op) in self.operands.iter().enumerate() { if op == &Operand::None { @@ -1162,9 +1309,86 @@ impl fmt::Display for BranchRegister { pub struct ApplicationRegister(pub u8); // 128 64-bit(?) registers impl fmt::Display for ApplicationRegister { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "ar{}", self.0) + match self.0 { + 0 => write!(f, "ar.kr0"), + 1 => write!(f, "ar.kr1"), + 2 => write!(f, "ar.kr2"), + 3 => write!(f, "ar.kr3"), + 4 => write!(f, "ar.kr4"), + 5 => write!(f, "ar.kr5"), + 6 => write!(f, "ar.kr6"), + 7 => write!(f, "ar.kr7"), + 16 => write!(f, "ar.rsc"), + 17 => write!(f, "ar.bsp"), + 18 => write!(f, "ar.bspstore"), + 19 => write!(f, "ar.rnat"), + 21 => write!(f, "ar.fcr"), + 24 => write!(f, "ar.eflag"), + 25 => write!(f, "ar.csd"), + 26 => write!(f, "ar.ssd"), + 27 => write!(f, "ar.cflg"), + 28 => write!(f, "ar.fsr"), + 29 => write!(f, "ar.fir"), + 30 => write!(f, "ar.fdr"), + 32 => write!(f, "ar.ccv"), + 36 => write!(f, "ar.unat"), + 40 => write!(f, "ar.fpsr"), + 44 => write!(f, "ar.itc"), + 45 => write!(f, "ar.ruc"), + 64 => write!(f, "ar.pfs"), + 65 => write!(f, "ar.lc"), + 66 => write!(f, "ar.ec"), + other => write!(f, "ar{}", other) + } } } + +/// constants in this module are derived from the table `3.1.8 Application Registers`. +impl ApplicationRegister { + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR0: ApplicationRegister = ApplicationRegister(0); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR1: ApplicationRegister = ApplicationRegister(1); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR2: ApplicationRegister = ApplicationRegister(2); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR3: ApplicationRegister = ApplicationRegister(3); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR4: ApplicationRegister = ApplicationRegister(4); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR5: ApplicationRegister = ApplicationRegister(5); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR6: ApplicationRegister = ApplicationRegister(6); + /// `3.1.8.1 Kernel Registers (KR 0-7 - AR 0-7)` + pub const KR7: ApplicationRegister = ApplicationRegister(7); + /// `3.1.8.2 Register Stack Configuration Register (RSC - AR 16)` + pub const RSC: ApplicationRegister = ApplicationRegister(16); + /// `3.1.8.3 RSE Backing Store Pointer (BSP - AR 17)` + pub const BSP: ApplicationRegister = ApplicationRegister(17); + /// `3.1.8.4 RSE Backing Store Pointer for Memory Stores (BSPSTORE - AR 18)` + pub const BSPSTORE: ApplicationRegister = ApplicationRegister(18); + /// `3.1.8.5 RSE NaT Collection Register (RNAT - AR 19)` + pub const RNAT: ApplicationRegister = ApplicationRegister(19); + /// `3.1.8.6 Compare and Store Data Register (CSD - AR 25)` + pub const CSD: ApplicationRegister = ApplicationRegister(25); + /// `3.1.8.7 Compare and Exchange Value Register (CCV - AR 32)` + pub const CCV: ApplicationRegister = ApplicationRegister(32); + /// `3.1.8.8 User NaT Collection Register (UNAT - AR 36)` + pub const UNAT: ApplicationRegister = ApplicationRegister(36); + /// `3.1.8.9 Floating-point Status Register (FPSR - AR 40)` + pub const FPSR: ApplicationRegister = ApplicationRegister(40); + /// `3.1.8.10 Interval Time Counter (ITC - AR 44)` + pub const ITC: ApplicationRegister = ApplicationRegister(44); + /// `3.1.8.11 Resource Utilization Counter (RUC - AR 45)` + pub const RUC: ApplicationRegister = ApplicationRegister(45); + /// `3.1.8.12 Previous Function State (PFS - AR 64)` + pub const PFS: ApplicationRegister = ApplicationRegister(64); + /// `3.1.8.13 Loop Count (LC - AR 65)` + pub const LC: ApplicationRegister = ApplicationRegister(65); + /// `3.1.8.14 Epilog Count (EC - AR 66)` + pub const EC: ApplicationRegister = ApplicationRegister(66); +} + #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum Operand { None, @@ -1207,8 +1431,12 @@ impl fmt::Display for Operand { Operand::None => { unreachable!() }, Operand::GPRegister(reg) => { write!(f, "{}", reg) }, Operand::Memory(reg) => { write!(f, "[{}]", reg) }, - Operand::ImmU64(imm) => { write!(f, "{}", imm) }, - Operand::ImmI64(imm) => { write!(f, "{}", imm) }, + Operand::ImmU64(imm) => { write!(f, "{:#x}", imm) }, + Operand::ImmI64(imm) => { if imm < &0 { + write!(f, "-{:#x}", -imm) + } else { + write!(f, "{:#x}", imm) + } }, Operand::FloatRegister(reg) => { write!(f, "{}", reg) }, Operand::PredicateRegister(reg) => { write!(f, "{}", reg) }, Operand::ApplicationRegister(reg) => { write!(f, "{}", reg) }, @@ -1317,26 +1545,22 @@ impl Decoder for InstDecoder { // let instruction_bits = instruction_bytes.view_bits::(); let bundle_tag = instruction_bytes[0..5].load::(); inst.bundle_tag = bundle_tag; - eprintln!("{:?}", instruction_bytes); let instruction_words = [ &instruction_bytes[5..46], &instruction_bytes[46..87], &instruction_bytes[87..128], ]; - println!("bundle tag is now {:#05b}", bundle_tag); let (instruction_types, stop_mask) = BUNDLE_TAGS[bundle_tag as usize].ok_or(DecodeError::BadBundle)?; - eprintln!("bundle types: {:?}, stop_mask: {:#b}", instruction_types, stop_mask); fn decode_l_instruction(word: &BitSlice, word2: &BitSlice) -> Instruction { - eprintln!("as slice: {:?}", word); let tag = word[37..41].load::(); - eprintln!("tag: {:#x}", tag); let (opcode, operand_encoding) = get_l_opcode_and_encoding(tag, word); - eprintln!("L({}) {:?}/{:?}", tag, opcode, operand_encoding); let (dest_boundary, operands) = read_l_operands(operand_encoding, word, word2); Instruction { opcode, + sf: None, + predicate: word[0..6].load::(), dest_boundary, operands, // TODO: figure out hints @@ -1345,9 +1569,7 @@ impl Decoder for InstDecoder { } fn decode_instruction(word: &BitSlice, ty: InstructionType) -> Instruction { - eprintln!("as slice: {:?}", word); let tag = word[37..41].load::(); - eprintln!("tag: {:#x}", tag); let ty = if tag >= 8 && (ty == InstructionType::M || ty == InstructionType::I) { InstructionType::A @@ -1358,10 +1580,11 @@ impl Decoder for InstDecoder { match ty { InstructionType::I => { let (opcode, operand_encoding) = get_i_opcode_and_encoding(tag, word); - eprintln!("I({}) {:?}/{:?}", tag, opcode, operand_encoding); let (dest_boundary, operands) = read_i_operands(operand_encoding, word); Instruction { opcode, + sf: None, + predicate: word[0..6].load::(), dest_boundary, operands, // TODO: figure out hints @@ -1369,11 +1592,84 @@ impl Decoder for InstDecoder { } }, InstructionType::F => { - let (opcode, operand_encoding) = get_f_opcode_and_encoding(tag, word); - eprintln!("F({}) {:?}/{:?}", tag, opcode, operand_encoding); - let (dest_boundary, operands) = read_f_operands(operand_encoding, word); + let (mut opcode, operand_encoding) = get_f_opcode_and_encoding(tag, word); + // assume there will be an `sf`, then handle exceptions. this is constructed + // from reading over section 4.6 of the manual. + let mut sf = Some(word[34..36].load::()); + match (tag, word[27..33].load::()) { + (0, 0x00) | // break.f + (0, 0x01) | // nop.f, hint.f + (0, 0x10) | // fmerge.s + (0, 0x11) | // fmerge.ns + (0, 0x12) | // fmerge.se + (0, 0x1c) | // fcvt.xf + (0, 0x28) | // fpack + (0, 0x2c) | // fand + (0, 0x2d) | // fandcm + (0, 0x2e) | // for + (0, 0x2f) | // fxor + (0, 0x34) | // fswap + (0, 0x35) | // fswap.nl + (0, 0x36) | // fswap.nr + (0, 0x39) | // fmix.lr + (0, 0x3a) | // fmix.r + (0, 0x3b) | // fmix.l + (0, 0x3c) | // fsxt.r + (0, 0x3d) | // fsxt.l + + (1, 0x10) | // fpmerge.s + (1, 0x11) | // fpmerge.ns + (1, 0x12) | // fpmerge.se + // `4.6.3.2 Floating-point Class` does not use sf. + (5, _) => { + sf = None; + } + (0xe, _) => { + // by `4.6.2 Parallel Floating-point Select`, `fselect` does not use sf + // additionally relevant, `4.6.1.2 Fixed-point Multiply Add` + sf = None; + } + _ => { + // storing an `sf` is fine + } + } + let (dest_boundary, mut operands) = read_f_operands(operand_encoding, word); + // quoth `fma - Floating-point Multiply Add`, fma.* with `f2` set to register + // `f0` is actually `fmpy` + if operands[3] == Operand::FloatRegister(FloatRegister(0)) { + if opcode == Opcode::Fma { + if operands[2] == Operand::FloatRegister(FloatRegister(1)) { + opcode = Opcode::Fnorm; + operands[2] = Operand::None; + operands[3] = Operand::None; + } else { + opcode = Opcode::Fmpy; + operands[3] = Operand::None; + } + } else if opcode == Opcode::Fma_s { + if operands[2] == Operand::FloatRegister(FloatRegister(1)) { + opcode = Opcode::Fnorm_s; + operands[2] = Operand::None; + operands[3] = Operand::None; + } else { + opcode = Opcode::Fmpy_s; + operands[3] = Operand::None; + } + } else if opcode == Opcode::Fma_d { + if operands[2] == Operand::FloatRegister(FloatRegister(1)) { + opcode = Opcode::Fnorm_d; + operands[2] = Operand::None; + operands[3] = Operand::None; + } else { + opcode = Opcode::Fmpy_d; + operands[3] = Operand::None; + } + } + } Instruction { opcode, + sf, + predicate: word[0..6].load::(), dest_boundary, operands, // TODO: figure out hints @@ -1382,10 +1678,16 @@ impl Decoder for InstDecoder { }, InstructionType::B => { let (opcode, operand_encoding) = get_b_opcode_and_encoding(tag, word); - eprintln!("B({}) {:?}/{:?}", tag, opcode, operand_encoding); + let predicate = if operand_encoding == OperandEncodingB::B6 || operand_encoding == OperandEncodingB::B7 { + 0 + } else { + word[0..6].load::() + }; let (dest_boundary, operands) = read_b_operands(operand_encoding, word); Instruction { opcode, + sf: None, + predicate, dest_boundary, operands, // TODO: figure out hints @@ -1397,10 +1699,11 @@ impl Decoder for InstDecoder { }, InstructionType::A => { let (opcode, operand_encoding) = get_a_opcode_and_encoding(tag, word); - eprintln!("A({}) {:?}/{:?}", tag, opcode, operand_encoding); let (dest_boundary, operands) = read_a_operands(operand_encoding, word); Instruction { opcode, + sf: None, + predicate: word[0..6].load::(), dest_boundary, operands, // TODO: figure out hints @@ -1409,10 +1712,11 @@ impl Decoder for InstDecoder { } InstructionType::M => { let (opcode, operand_encoding) = get_m_opcode_and_encoding(tag, word); - eprintln!("M({}) {:?}/{:?}", tag, opcode, operand_encoding); let (dest_boundary, operands) = read_m_operands(operand_encoding, word); Instruction { opcode, + sf: None, + predicate: word[0..6].load::(), dest_boundary, operands, // TODO: figure out hints @@ -1426,12 +1730,10 @@ impl Decoder for InstDecoder { for ((i, word), ty) in instruction_words.iter().enumerate().zip(instruction_types.iter().cloned()) { if ty == InstructionType::L { let instruction = decode_l_instruction(word, &instruction_words[i + 1]); - eprintln!("{:?}/{:#046b}: {:?}", ty, word, instruction); inst.instructions[i] = instruction; break; } else { let instruction = decode_instruction(word, ty); - eprintln!("{:?}/{:#046b}: {:?}", ty, word, instruction); inst.instructions[i] = instruction; }; } @@ -1476,7 +1778,7 @@ fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: let imm20a = word[6..26].load::(); let i = word[36]; let imm41 = word2[0..41].load::(); - let imm = imm41 << 21 + (i as u64) << 20 + imm20a; + let imm = (imm41 << 21) + ((i as u64) << 20) + imm20a; // TODO: this is certainly assembled incorrectly one_op(false, Operand::ImmU64(imm as u64)) } @@ -1488,7 +1790,7 @@ fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: let i = word[36]; let imm41 = word2[0..41].load::(); // TODO: this is certainly assembled incorrectly - let imm = imm41 << 21 + (i as u64) << 20 + imm7b + immdc + (ic as u64); + let imm = (imm41 << 21) + ((i as u64) << 20) + imm7b + immdc + (ic as u64); two_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1507,8 +1809,7 @@ fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: let i = word[36]; let imm39 = word2[2..41].load::(); // TODO: this is certainly assembled incorrectly - let imm = imm39 << 21 + (i as u64) << 20 + imm20b; - eprintln!("x3 operands, btype={}, imm={}, p={}, wh={}, d={}", btype, imm, p, wh, d); + let imm = (imm39 << 21) + ((i as u64) << 20) + imm20b; one_op(false, Operand::ImmU64(imm as u64)) } X4 => { @@ -1520,8 +1821,7 @@ fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: let i = word[36]; let imm39 = word2[2..41].load::(); // TODO: this is certainly assembled incorrectly - let imm = imm39 << 21 + (i as u64) << 20 + imm20b; - eprintln!("x4 operands, b1={}, imm={}, p={}, wh={}, d={}", b1, imm, p, wh, d); + let imm = (imm39 << 21) + ((i as u64) << 20) + imm20b; two_op( Some(0), Operand::BranchRegister(BranchRegister(b1)), @@ -1533,8 +1833,7 @@ fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: let i = word[36]; let imm41 = word2[0..41].load::(); // TODO: this is certainly assembled incorrectly - let imm = imm41 << 21 + (i as u64) << 20 + imm20; - eprintln!("x5 operands, imm={}", imm); + let imm = (imm41 << 21) + ((i as u64) << 20) + imm20; one_op(false, Operand::ImmU64(imm as u64)) } } @@ -1546,21 +1845,34 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op panic!("should not explicitly check OperandEncodingB::None"); } B1 => { - let imm = word[13..33].load::(); + let imm20b = word[13..33].load::(); + let s = word[36]; + let imm = (((imm20b + ((s as u32) << 20)) as i32) << 11) >> 7; let wh = word[33..35].load::(); let d = word[35]; let p = word[12]; - eprintln!("b1 operands, imm={}, p={}, wh={}, d={}", imm, p, wh, d); - one_op(false, Operand::ImmU64(imm as u64)) + four_op( + Option::None, + Operand::ImmI64(imm as i64), + Operand::ImmU64(p as u64), + Operand::ImmU64(wh as u64), + Operand::ImmU64(d as u64), + ) } B2 => { - // TODO: missing four bits? - let imm = word[13..33].load::(); + let imm20b = word[13..33].load::(); + let s = word[36]; + let imm = (((imm20b + ((s as u32) << 20)) as i32) << 11) >> 7; let wh = word[33..35].load::(); let d = word[35]; let p = word[12]; - eprintln!("b2 operands, imm={}, p={}, wh={}, d={}", imm, p, wh, d); - one_op(false, Operand::ImmU64(imm as u64)) + four_op( + Option::None, + Operand::ImmI64(imm as i64), + Operand::ImmU64(p as u64), + Operand::ImmU64(wh as u64), + Operand::ImmU64(d as u64), + ) } B3 => { // TODO: missing four bits? @@ -1569,7 +1881,6 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op let d = word[35]; let p = word[12]; let b1 = word[6..9].load::(); - eprintln!("b3 operands, b1={}, imm={}, p={}, wh={}, d={}", b1, imm, p, wh, d); ( Option::None, [ @@ -1586,7 +1897,6 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op let wh = word[33..35].load::(); let d = word[35]; let p = word[12]; - eprintln!("b4 operands, b2={}, p={}, wh={}, d={}", b2, p, wh, d); four_op( Option::None, Operand::BranchRegister(BranchRegister(b2)), @@ -1601,7 +1911,6 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op let d = word[35]; let p = word[12]; let b1 = word[6..9].load::(); - eprintln!("b5 operands, b1={}, b2={}, p={}, wh={}, d={}", b1, b2, p, wh, d); ( Option::None, [ @@ -1623,7 +1932,6 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op let tag = (t2e << 7) + timm7a; let ih = word[33..35].load::(); let s = word[36] as u8; - eprintln!("b6 operands, imm={}, tag={}, ih={}, wh={}", imm20b, tag, ih, s); four_op( Option::None, Operand::ImmI64(imm20b as i64), @@ -1640,7 +1948,6 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op let t2e = word[33..35].load::(); let tag = (t2e << 7) + timm7a; let ih = word[35] as u8; - eprintln!("b7 operands, b2={}, tag={}, ih={}, wh={}", b2, tag, ih, wh); four_op( Option::None, Operand::BranchRegister(BranchRegister(b2)), @@ -1650,13 +1957,11 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op ) } B8 => { - eprintln!("b8 operands"); one_op(false, Operand::None) } B9 => { let imm20b = word[6..26].load::(); - let imm = (word[20] as u32) << 20 + imm20b; - eprintln!("b9 operands, imm={}", imm); + let imm = ((word[20] as u32) << 20) + imm20b; one_op(false, Operand::ImmU64(imm as u64)) } } @@ -1672,7 +1977,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let f4 = word[27..34].load::(); - eprintln!("f1 operands, f1={}, f2={}, f3={}, f4={}", f1, f2, f3, f4); four_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1686,7 +1990,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let f4 = word[27..34].load::(); - eprintln!("f2 operands, f1={}, f2={}, f3={}, f4={}", f1, f2, f3, f4); four_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1700,7 +2003,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let f4 = word[27..34].load::(); - eprintln!("f3 operands, f1={}, f2={}, f3={}, f4={}", f1, f2, f3, f4); four_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1714,7 +2016,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("f4 operands, p1={}, f2={}, f3={}, p2={}", p1, f2, f3, p2); four_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -1730,7 +2031,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let fc2 = word[33..35].load::(); let fclass = fc2 << 7 + fclass7c; let p2 = word[27..33].load::(); - eprintln!("f5 operands, p1={}, f2={}, fclass={}, p2={}", p1, f2, fclass, p2); four_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -1744,7 +2044,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("f6 operands, f1={}, f2={}, f3={}, p2={}", f1, f2, f3, p2); four_op( Some(1), Operand::FloatRegister(FloatRegister(f1)), @@ -1758,7 +2057,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let _ = word[13..20].load::(); let f3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("f7 operands, f1={}, f3={}, p2={}", f1, f3, p2); three_op( Some(1), Operand::FloatRegister(FloatRegister(f1)), @@ -1771,7 +2069,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let _ = word[27..33].load::(); - eprintln!("f8 operands, f1={}, f2={}, f3={}", f1, f2, f3); three_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1784,7 +2081,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let f3 = word[20..27].load::(); let _ = word[27..33].load::(); - eprintln!("f9 operands, f1={}, f2={}, f3={}", f1, f2, f3); three_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1797,7 +2093,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let _ = word[20..27].load::(); let _ = word[27..33].load::(); - eprintln!("f10 operands, f1={}, f2={}", f1, f2); two_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1809,7 +2104,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let _ = word[20..27].load::(); let _ = word[27..33].load::(); - eprintln!("f11 operands, f1={}, f2={}", f1, f2); two_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -1821,7 +2115,6 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op let amask = word[13..20].load::(); let omask = word[20..27].load::(); let _ = word[27..33].load::(); - eprintln!("f12 operands, amask={}, omask={}", amask, omask); two_op( Option::None, Operand::ImmU64(amask as u64), @@ -1829,14 +2122,12 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op ) } F13 => { - eprintln!("f13 operands"); one_op(false, Operand::None) } F14 => { let imm20a = word[6..26].load::(); // TODO: missing 4 bits? - let imm = (word[36] as u32) << 20 + imm20a; - eprintln!("f14 operands, imm={}", imm); + let imm = ((word[36] as u32) << 20) + imm20a; one_op( false, Operand::ImmU64(imm as u64), @@ -1844,8 +2135,7 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op } F15 => { let imm20a = word[6..26].load::(); - let imm = (word[36] as u32) << 20 + imm20a; - eprintln!("f15 operands, imm={}", imm); + let imm = ((word[36] as u32) << 20) + imm20a; one_op( false, Operand::ImmU64(imm as u64), @@ -1853,8 +2143,7 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op } F16 => { let imm20a = word[6..26].load::(); - let imm = (word[36] as u32) << 20 + imm20a; - eprintln!("f16 operands, imm={}", imm); + let imm = ((word[36] as u32) << 20) + imm20a; one_op( false, Operand::ImmU64(imm as u64), @@ -1873,7 +2162,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let count = word[30..32].load::(); - eprintln!("i1 operands, r1={}, r2={}, r3={}, count={}", r1, r2, r3, count); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1886,7 +2174,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); - eprintln!("i2 operands, r1={}, r2={}, r3={}", r1, r2, r3); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1898,7 +2185,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let mbt = word[20..24].load::(); - eprintln!("i3 operands, r1={}, r2={}, mbt={}", r1, r2, mbt); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1910,7 +2196,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let mht = word[20..28].load::(); - eprintln!("i4 operands, r1={}, r2={}, mht={}", r1, r2, mht); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1922,7 +2207,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); - eprintln!("i5 operands, r1={}, r2={}, r3={}", r1, r2, r3); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1934,7 +2218,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let count = word[14..19].load::(); let r3 = word[20..27].load::(); - eprintln!("i6 operands, r1={}, r3={}, count={}", r1, r3, count); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1946,7 +2229,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); - eprintln!("i7 operands, r1={}, r2={}, r3={}", r1, r2, r3); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1958,7 +2240,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let count = word[20..25].load::(); - eprintln!("i8 operands, r1={}, r2={}, count={}", r1, r2, count); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1972,7 +2253,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op // TODO: error on this properly? is this a #ud-like? assert_eq!(z, 0); let r3 = word[20..27].load::(); - eprintln!("i9 operands, r1={}, r3={}", r1, r3); two_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1984,7 +2264,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let count = word[27..33].load::(); - eprintln!("i10 operands, r1={}, r2={}, r3={}, count={}", r1, r2, r3, count); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -1998,7 +2277,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let pos = word[14..20].load::(); let r3 = word[20..27].load::(); let len = word[27..33].load::(); - eprintln!("i11 operands, r1={}, pos={}, r3={}, len={}", r1, pos, r3, len); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2012,7 +2290,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let cpos = word[20..26].load::(); let len = word[27..33].load::(); - eprintln!("i12 operands, r1={}, r2={}, cpos={}, len={}", r1, r2, cpos, len); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2027,7 +2304,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let imm = ((word[36] as u8) << 7 + imm7b) as i8; let cpos = word[20..26].load::(); let len = word[27..33].load::(); - eprintln!("i13 operands, r1={}, imm={}, cpos={}, len={}", r1, imm, cpos, len); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2042,7 +2318,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r3 = word[20..27].load::(); let cpos = word[14..20].load::(); let len = word[27..33].load::(); - eprintln!("i14 operands, r1={}, imm={}, r3={}, cpos={}, len={}", r1, imm, r3, cpos, len); ( Some(0), [ @@ -2060,7 +2335,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let r3 = word[20..27].load::(); let len = word[27..31].load::(); let cpos = word[31..37].load::(); - eprintln!("i15 operands, r1={}, r2={}, r3={}, cpos={}, len={}", r1, r2, r3, cpos, len); ( Some(0), [ @@ -2077,7 +2351,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let pos = word[14..20].load::(); let r3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("i16 operands, p1={}, p2={}, r3={}, pos={}", p1, p2, r3, pos); four_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -2090,7 +2363,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let p1 = word[6..12].load::(); let r3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("i17 operands, p1={}, p2={}, r3={}", p1, p2, r3); three_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -2100,8 +2372,7 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op } I18 => { let imm20 = word[6..26].load::(); - let imm = imm20 + (word[36] as u32) << 20; - eprintln!("i18 operands, imm={}", imm); + let imm = imm20 + ((word[36] as u32) << 20); one_op( false, Operand::ImmU64(imm as u64), @@ -2109,8 +2380,7 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op } I19 => { let imm20 = word[6..26].load::(); - let imm = imm20 + (word[36] as u32) << 20; - eprintln!("i19 operands, imm={}", imm); + let imm = imm20 + ((word[36] as u32) << 20); one_op( false, Operand::ImmU64(imm as u64), @@ -2120,7 +2390,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let p1 = word[6..12].load::(); let r3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("i20 operands, p1={}, p2={}, r3={}", p1, p2, r3); three_op( Option::None, Operand::PredicateRegister(PredicateRegister(p1)), @@ -2134,7 +2403,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let wh = word[20..22].load::(); let ih = word[23]; let tag = word[24..33].load::(); - eprintln!("i21 operands, b1={}, r2={}, tag={}, ih={}, wh={}", b1, r2, tag, ih, wh); ( Some(0), [ @@ -2149,7 +2417,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op I22 => { let r1 = word[6..13].load::(); let b2 = word[13..16].load::(); - eprintln!("i22 operands, r1={}, b2={}", r1, b2); two_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2163,7 +2430,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let _s = word[36] as u32; // TODO: this is .. missing two bits? let mask = (mask8c << 7) + mask7a; - eprintln!("i23 operands, r2={}, mask={}", r2, mask); three_op( Some(0), Operand::PR, @@ -2175,7 +2441,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let imm = word[6..33].load::(); let _s = word[36] as u32; // TODO: this is missing ... 17 bits? sign extend? - eprintln!("i24 operands, imm={}", imm); two_op( Some(0), Operand::PR, @@ -2185,7 +2450,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op I25 => { let r1 = word[6..13].load::(); let x6 = word[27..33].load::(); - eprintln!("i25 operands, r1={}, x6={}", r1, x6); let src = match x6 { 30 => Operand::IP, 33 => Operand::PR, @@ -2203,7 +2467,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op I26 => { let r2 = word[13..20].load::(); let ar3 = word[20..27].load::(); - eprintln!("i26 operands, ar3={}, r2={}", ar3, r2); two_op( Some(0), Operand::ApplicationRegister(ApplicationRegister(ar3)), @@ -2214,7 +2477,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op let imm7b = word[13..20].load::(); let imm = (((word[36] as u8) << 7) + imm7b) as i8; let ar3 = word[20..27].load::(); - eprintln!("i27 operands, ar3={}, imm={}", ar3, imm); two_op( Some(0), Operand::ApplicationRegister(ApplicationRegister(ar3)), @@ -2224,7 +2486,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op I28 => { let r1 = word[6..13].load::(); let ar3 = word[20..27].load::(); - eprintln!("i28 operands, ar3={}, r1={}", ar3, r1); two_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2234,7 +2495,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op I29 => { let r1 = word[6..13].load::(); let r3 = word[20..27].load::(); - eprintln!("i29 operands, r3={}, r1={}", r3, r1); two_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2248,7 +2508,6 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op // TODO: what happens when this field isn't actually zero? assert_eq!(z, 0); let p2 = word[27..33].load::(); - eprintln!("i30 operands, p1={}, p2={}, imm={}", p1, p2, imm); three_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -2266,7 +2525,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let _ = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m1 operands, r1={}, r3={}, hint={}", r1, r3, hint); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2279,7 +2537,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m2 operands, r1={}, r2={}, r3={}, hint={}", r1, r2, r3, hint); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2293,7 +2550,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let imm = word[13..20].load::() + (word[27] as u16) << 7 + (word[36] as u16) << 8; let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m3 operands, r1={}, imm={}, r3={}, hint={}", r1, imm, r3, hint); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2307,7 +2563,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m4 operands, r2={}, r3={}, hint={}", r2, r3, hint); three_op( Some(0), Operand::Memory(GPRegister(r2)), @@ -2324,7 +2579,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m5 operands, r2={}, r3={}, imm={}, hint={}", r2, r3, imm, hint); four_op( Some(0), Operand::Memory(GPRegister(r2)), @@ -2338,7 +2592,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let _ = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m6 operands, f1={}, r3={}, hint={}", f1, r3, hint); three_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -2351,7 +2604,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m7 operands, f1={}, r3={}, r2={}, hint={}", f1, r3, r2, hint); four_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -2369,7 +2621,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let imm = (((imm as i16) << 7) >> 7) as i64; let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m8 operands, f1={}, r3={}, imm={}, hint={}", f1, r3, imm, hint); four_op( Some(0), Operand::FloatRegister(FloatRegister(f1)), @@ -2383,7 +2634,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m9 operands, f2={}, r3={}, hint={}", f2, r3, hint); three_op( Some(0), Operand::Memory(GPRegister(r3)), @@ -2401,7 +2651,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r3 = word[20..27].load::(); let hint = word[28..30].load::(); // TODO: memory operand here? - eprintln!("m10 operands, r3={}, f2={}, imm={}, hint={}", r3, f2, imm, hint); four_op( Some(0), Operand::Memory(GPRegister(r3)), @@ -2415,7 +2664,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let f2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m11 operands, f1={}, f2={}, r3={}, hint={}", f1, f2, r3, hint); four_op( Some(1), Operand::FloatRegister(FloatRegister(f1)), @@ -2437,7 +2685,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op 8 }; let hint = word[28..30].load::(); - eprintln!("m12 operands, f1={}, f2={}, r3={}, hint={}", f1, f2, r3, hint); ( Some(1), [ @@ -2454,7 +2701,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let _ = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m13 operands, r3={}, hint={}", r3, hint); two_op( Option::None, Operand::Memory(GPRegister(r3)), @@ -2466,7 +2712,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m14 operands, r2={}, r3={}, hint={}", r2, r3, hint); three_op( Option::None, Operand::Memory(GPRegister(r3)), @@ -2480,7 +2725,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let hint = word[28..30].load::(); - eprintln!("m16 operands, r1={}, r2={}, r3={}, hint={}", r1, r2, r3, hint); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2489,11 +2733,44 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op Operand::ImmU64(hint as u64) ) } + M17 => { + let r1 = word[6..13].load::(); + let i = word[13..16].load::() as i8; + let imm = ((i << 5) >> 5) as i64; + let r3 = word[20..27].load::(); + let hint = word[28..30].load::(); + four_op( + Some(0), + Operand::GPRegister(GPRegister(r1)), + Operand::Memory(GPRegister(r3)), + Operand::ImmI64(imm), + Operand::ImmU64(hint as u64) + ) + } + M18 => { + let f1 = word[6..13].load::(); + let r2 = word[13..20].load::(); + let _ = word[20..27].load::(); + two_op( + Some(0), + Operand::FloatRegister(FloatRegister(f1)), + Operand::GPRegister(GPRegister(r2)), + ) + } + M19 => { + let r1 = word[6..13].load::(); + let f2 = word[13..20].load::(); + let _ = word[20..27].load::(); + two_op( + Some(0), + Operand::GPRegister(GPRegister(r1)), + Operand::FloatRegister(FloatRegister(f2)), + ) + } M29 => { let _ = word[6..13].load::(); let r2 = word[13..20].load::(); let ar3 = word[20..27].load::(); - eprintln!("m29 operands, r2={}, ar3={}", r2, ar3); two_op( Some(0), Operand::ApplicationRegister(ApplicationRegister(ar3)), @@ -2504,7 +2781,6 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let _ = word[13..20].load::(); let ar3 = word[20..27].load::(); - eprintln!("m31 operands, r1={}, ar3={}", r1, ar3); two_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2516,19 +2792,19 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op let sof = word[13..20].load::(); let sol = word[20..27].load::(); let sor = word[27..31].load::(); - eprintln!("m34 operands, r1={}, sof={}, sol={}, sor={}", r1, sof, sol, sor); - four_op( + ( Some(0), - Operand::GPRegister(GPRegister(r1)), - // ar.pfs? which number is pfs? - Operand::ImmU64(sof as u64), - Operand::ImmU64(sol as u64), - Operand::ImmU64(sor as u64), + [ + Operand::GPRegister(GPRegister(r1)), + Operand::ApplicationRegister(ApplicationRegister::PFS), + Operand::ImmU64(sof as u64), + Operand::ImmU64(sol as u64), + Operand::ImmU64(sor as u64), + ] ) } M48 => { - let i = word[6..26].load::() + (word[36] as u32) << 20; - eprintln!("m48 operands, imm={}", i); + let i = word[6..26].load::() + ((word[36] as u32) << 20); one_op( false, Operand::ImmU64(i as u64), @@ -2548,7 +2824,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); - eprintln!("a1 operands, r1={}, r2={}, r3={}", r1, r2, r3); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2561,7 +2836,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let ct = word[27..29].load::(); - eprintln!("a2 operands, r1={}, r2={}, r3={}, ct={}", r1, r2, r3, ct); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2576,7 +2850,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let immb = word[13..20].load::(); let s = word[36]; let imm = (immb + ((s as u8) << 7)) as i8 as i32; - eprintln!("a3 operands, r1={}, r3={}, imm={}", r1, r3, imm); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2590,10 +2863,8 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let immb = word[13..20].load::(); let immd = word[27..33].load::(); let s = word[36]; - eprintln!("immb: {:#b}, immd: {:#b}, s: {}", immb, immd, s); let imm = ((s as u16) << 13) + (immd << 7) + immb; let imm = (((imm as i16) << 2) >> 2) as i32; - eprintln!("a4 operands, r1={}, r3={}, imm={}", r1, r3, imm); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2608,7 +2879,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let immc_d_s = word[22..37].load::(); let imm = (immc_d_s << 7) + immb; let imm = ((imm as i32) << 10) >> 10; - eprintln!("a5 operands, r1={}, r3={}, imm={}", r1, r3, imm); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2621,7 +2891,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("a6 operands, r2={}, r3={}, p1={}, p2={}", r2, r3, p1, p2); four_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -2637,7 +2906,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op assert_eq!(r2, 0); let r3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("a7 operands, r3={}, p1={}, p2={}", r3, p1, p2); four_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -2653,7 +2921,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let imm = (imm7b + (s as u8) << 7) as i8 as i32; let r3 = word[20..27].load::(); let p2 = word[27..33].load::(); - eprintln!("a8 operands, imm={}, r3={}, p1={}, p2={}", imm, r3, p1, p2); four_op( Some(1), Operand::PredicateRegister(PredicateRegister(p1)), @@ -2666,7 +2933,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let r1 = word[6..13].load::(); let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); - eprintln!("a9 operands, r1={}, r2={}, r3={}", r1, r2, r3); three_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2679,7 +2945,6 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op let r2 = word[13..20].load::(); let r3 = word[20..27].load::(); let ct = word[27..29].load::(); - eprintln!("a10 operands, r1={}, r2={}, r3={}, ct={}", r1, r2, r3, ct); four_op( Some(0), Operand::GPRegister(GPRegister(r1)), @@ -2757,7 +3022,6 @@ fn get_b_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope ]; let index = word[27..33].load::(); - eprintln!("table 4-48 idx {:#b}", index); if index == 0b100000 { // `Indirect Branch (Table 4-49)` const TABLE4_49: [(Opcode, OperandEncodingB); 8] = [ @@ -2838,9 +3102,9 @@ fn get_f_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope // `Table 4-59 Miscellaneous Floating-point 1-bit Opcode Extensions` if word[33] { if word[36] { - (Frcpa, F6) - } else { (Frsqta, F7) + } else { + (Frcpa, F6) } } else { // `Table 4-60 Opcode 0 Miscellaneous Floating-point 6-bit Opcode Extensions` @@ -2880,9 +3144,9 @@ fn get_f_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope // `Table 4-59 Miscellaneous Floating-point 1-bit Opcode Extensions` if word[33] { if word[36] { - (Fprcpa, F6) - } else { (Fprsqrta, F7) + } else { + (Fprcpa, F6) } } else { // `Table 4-61 Opcode 1 Miscellaneous Floating-point 6-bit Opcode Extensions` @@ -2933,49 +3197,49 @@ fn get_f_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope 0x8 => { // from section 4.6.1.1 if word[36] { - (Fma_s_sf, F1) + (Fma_s, F1) } else { - (Fma_sf, F1) + (Fma, F1) } }, 0x9 => { // from section 4.6.1.1 if word[36] { - (Fpma_sf, F1) + (Fpma, F1) } else { - (Fma_d_sf, F1) + (Fma_d, F1) } }, 0xa => { // from section 4.6.1.1 if word[36] { - (Fms_s_sf, F1) + (Fms_s, F1) } else { - (Fms_sf, F1) + (Fms, F1) } }, 0xb => { // from section 4.6.1.1 if word[36] { - (Fpms_sf, F1) + (Fpms, F1) } else { - (Fms_d_sf, F1) + (Fms_d, F1) } }, 0xc => { // from section 4.6.1.1 if word[36] { - (Fnma_s_sf, F1) + (Fnma_s, F1) } else { - (Fnma_sf, F1) + (Fnma, F1) } }, 0xd => { // from section 4.6.1.1 if word[36] { - (Fpnma_sf, F1) + (Fpnma, F1) } else { - (Fnma_d_sf, F1) + (Fnma_d, F1) } }, 0xe => { @@ -3001,8 +3265,6 @@ fn get_i_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope use Opcode::*; use OperandEncodingI::*; - eprintln!("i tag {}", tag); - match tag { 0 => { let x3 = word[33..36].load::(); @@ -3227,7 +3489,6 @@ fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope use Opcode::*; use OperandEncodingM::*; - eprintln!("m tag {}", tag); match tag { 0 => { @@ -3280,7 +3541,6 @@ fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope }, 1 => { let x3 = word[33..36].load::(); - eprintln!("x3: {:#b}", x3); // `Table 4-44 Opcode 1 System/Memory Management 3-bit Opcode Extensions` if x3 == 0 { // `Table 4-45 System/Memory Management 6-bit Ext` @@ -3291,7 +3551,6 @@ fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope (Fc, M28),(Probe_rw_fault_imm, M40), (Probe_r_fault_imm, M40), (Probe_w_fault_imm, M40), (Ptc_e, M47), (Purple, None), (Purple, None), (Purple, None), (Probe_r, M38), (Probe_w, M38), (Purple, None), (Purple, None), (Purple, None), (Purple, None), (Purple, None), (Purple, None), ]; let index = word[27..33].load::(); - eprintln!("idx2: {:#b}", index); TABLE4_45[index as usize] } else { const TABLE4_44: [(Opcode, OperandEncodingM); 8] = [ @@ -3388,9 +3647,6 @@ fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope ]; let index = ((word[36] as u8) << 1) + (word[27] as u8); - eprintln!("table {}", index); - eprintln!(" subidx {:b}", word[30..36].load::() as usize); - eprintln!(" x6l {:#b}, x6h {:#b}", word[30..32].load::(), word[32..36].load::()); if let Some(op_table) = TABLE4_28[index as usize] { op_table[word[30..36].load::() as usize] } else { @@ -3554,7 +3810,6 @@ fn get_a_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope match tag { 8 => { let x2a = word[34..36].load::(); - eprintln!("zb: {}", word[33]); if word[33] && x2a != 1 { // purple (table 4-8 ve=1, x2a = 0, 2, or 3) return (Purple, None); @@ -3671,37 +3926,160 @@ fn get_a_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope 0xa => (Purple, None), 0xb => (Purple, None), 0xc => { + // these two bits are necessary in th index regardless of other details + let index = + word[12] as u8 + // `c` + ((word[33] as u8) << 1); // `ta` + let x2 = word[34..36].load::(); - let encoding = if x2 > 1 { + if x2 > 1 { + // for table 4-11, the index includes bit 34 + let index = index + + ((word[34] as u8) << 2); // `x2`. `x2` is two buts but we only care about the lower one. // `Table 4-11 Integer Compare Immediate Opcode Extensions` - A8 + const TABLE4_11: [Opcode; 8] = [ + Cmp_lt, + Cmp_lt_unc, + Cmp_eq_and, + Cmp_ne_and, + Cmp4_lt, + Cmp4_lt_unc, + Cmp4_eq_and, + Cmp4_ne_and, + ]; + + (TABLE4_11[index as usize], A8) } else { + // for table 4-10, the index includes bits 36 and 34 + let index = index + + ((word[36] as u8) << 2) + // `tb` + ((word[34] as u8) << 2); // `x2`. `x2` is two buts but we only care about the lower one. // `Table 4-10 Integer Compare Opcode Extensions` - if word[36] { A7 } else { A6 } - }; - unimplemented!("type a, tag c"); + let encoding = if word[36] { A7 } else { A6 }; + const TABLE4_10: [Opcode; 16] = [ + Cmp_lt, + Cmp_lt_unc, + Cmp_eq_and, + Cmp_ne_and, + Cmp_gt_and, + Cmp_le_and, + Cmp_ge_and, + Cmp_lt_and, + Cmp4_lt, + Cmp4_lt_unc, + Cmp4_eq_and, + Cmp4_ne_and, + Cmp4_gt_and, + Cmp4_le_and, + Cmp4_ge_and, + Cmp4_lt_and, + ]; + (TABLE4_10[index as usize], encoding) + } } 0xd => { + // these two bits are necessary in th index regardless of other details + let index = + word[12] as u8 + // `c` + ((word[33] as u8) << 1); // `ta` + let x2 = word[34..36].load::(); - let encoding = if x2 > 1 { + if x2 > 1 { + // for table 4-11, the index includes bit 34 + let index = index + + ((word[34] as u8) << 2); // `x2`. `x2` is two buts but we only care about the lower one. // `Table 4-11 Integer Compare Immediate Opcode Extensions` - A8 + const TABLE4_11: [Opcode; 8] = [ + Cmp_ltu, + Cmp_ltu_unc, + Cmp_eq_or, + Cmp_ne_or, + Cmp4_ltu, + Cmp4_ltu_unc, + Cmp4_eq_or, + Cmp4_ne_or, + ]; + + (TABLE4_11[index as usize], A8) } else { + // for table 4-10, the index includes bits 36 and 34 + let index = index + + ((word[36] as u8) << 2) + // `tb` + ((word[34] as u8) << 2); // `x2`. `x2` is two buts but we only care about the lower one. // `Table 4-10 Integer Compare Opcode Extensions` - if word[36] { A7 } else { A6 } - }; - unimplemented!("type a, tag d"); + let encoding = if word[36] { A7 } else { A6 }; + const TABLE4_10: [Opcode; 16] = [ + Cmp_ltu, + Cmp_ltu_unc, + Cmp_eq_or, + Cmp_ne_or, + Cmp_gt_or, + Cmp_le_or, + Cmp_ge_or, + Cmp_lt_or, + Cmp4_ltu, + Cmp4_ltu_unc, + Cmp4_eq_or, + Cmp4_ne_or, + Cmp4_gt_or, + Cmp4_le_or, + Cmp4_ge_or, + Cmp4_lt_or, + ]; + (TABLE4_10[index as usize], encoding) + } } 0xe => { + // these two bits are necessary in th index regardless of other details + let index = + word[12] as u8 + // `c` + ((word[33] as u8) << 1); // `ta` + let x2 = word[34..36].load::(); - let encoding = if x2 > 1 { + if x2 > 1 { + // for table 4-11, the index includes bit 34 + let index = index + + ((word[34] as u8) << 2); // `x2`. `x2` is two buts but we only care about the lower one. // `Table 4-11 Integer Compare Immediate Opcode Extensions` - A8 + const TABLE4_11: [Opcode; 8] = [ + Cmp_eq, + Cmp_eq_unc, + Cmp_eq_or_andcm, + Cmp_ne_or_andcm, + Cmp4_eq, + Cmp4_eq_unc, + Cmp4_eq_or_andcm, + Cmp4_ne_or_andcm, + ]; + + (TABLE4_11[index as usize], A8) } else { + // for table 4-10, the index includes bits 36 and 34 + let index = index + + ((word[36] as u8) << 2) + // `tb` + ((word[34] as u8) << 2); // `x2`. `x2` is two buts but we only care about the lower one. // `Table 4-10 Integer Compare Opcode Extensions` - if word[36] { A7 } else { A6 } - }; - unimplemented!("type a, tag e"); + let encoding = if word[36] { A7 } else { A6 }; + const TABLE4_10: [Opcode; 16] = [ + Cmp_eq, + Cmp_eq_unc, + Cmp_eq_or_andcm, + Cmp_ne_or_andcm, + Cmp_gt_or_andcm, + Cmp_le_or_andcm, + Cmp_ge_or_andcm, + Cmp_lt_or_andcm, + Cmp4_eq, + Cmp4_eq_unc, + Cmp4_eq_or_andcm, + Cmp4_ne_or_andcm, + Cmp4_gt_or_andcm, + Cmp4_le_or_andcm, + Cmp4_ge_or_andcm, + Cmp4_lt_or_andcm, + ]; + (TABLE4_10[index as usize], encoding) + } } 0xf => (Purple, None), _ => { @@ -3813,7 +4191,7 @@ enum OperandEncodingM { M48, } -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] enum OperandEncodingB { None, B1, diff --git a/tests/test.rs b/tests/test.rs index a035c37..e589f2f 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -14,8 +14,6 @@ fn test_a_bundle() { let decoder = InstDecoder::default(); let inst = decoder.decode(data[..].iter().cloned()).unwrap(); - println!("{:?}", inst); - println!("{}", inst); } #[test] @@ -27,15 +25,10 @@ fn test_br_cosmetics() { let stringy = format!("{}", inst); // assert_eq!(stringy, "[MIB] ld8 r1=[r15]; mov b6=r16; br.few b6;;"); - let data = [0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0]; - let inst = decoder.decode(data[..].iter().cloned()).unwrap(); - let stringy = format!("{}", inst); -// assert_eq!(stringy, "[MLX] nop.m 0; brl.sptk.few tgt;;"); - let data = [0x19, 0x50, 0x40, 0x19, 0x3f, 0x23, 0x80, 0x00, 0x00, 0x00, 0x48, 0x80, 0x00, 0x00, 0x84, 0x02]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); let stringy = format!("{}", inst); - assert_eq!(stringy, "[MMB] adds r10=-48,r12; mov r8=0; br.ret.dptk.few b0"); + assert_eq!(stringy, "[MMB] adds r10=-0x30,r12; mov r8=0x0; br.ret.dptk.few b0;;"); } // from elf64-ia64-vms.c @@ -60,3 +53,1961 @@ fn test_br_cosmetics() { // 0918 0016 1810 0002 8030 2080 04e9 b79f // 0818 0146 1810 4002 9030 2000 0000 0400 // 1000 2806 9811 5002 2000 4200 50a5 ff58 + +// from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 +// bfd reports immediates in decimal in many places. all immediates are corrected to hex, as +// yaxpeax-ia64 only reports immediates as hexadecimal. +#[test] +fn test_bash_tilde_expand_word() { + // 400000000019b100 : + let expected = "[MMI] alloc r39=ar.pfs,12,9,0; adds r12=-16,r12; mov r38=b0"; + let data = "08 38 31 12 80 05 c0 80 33 7e 46 c0 04 00 c4 00"; + let expected = "[MMB] cmp.eq p6,p7=0,r32; adds r36=1,r32; (p06) br.cond.dpnt.few 400000000019b6e0 ;;"; + let data = "19 30 00 40 07 39 40 0a 80 00 42 03 d0 05 00 43"; + let expected = "[MMI] ld1 r14=[r32]; mov r40=r1; mov r33=r32;;"; + let data = "09 70 00 40 00 10 80 02 04 00 42 20 04 00 01 84"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] cmp4.eq p6,p7=126,r14; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019b410 ;;"; + let data = "11 30 f8 1d 87 39 00 00 00 02 80 03 d0 02 00 43"; + let expected = "[MMI] nop.m 0x0; ld1 r14=[r36]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 90 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14;;; cmp4.eq p7,p6=47,r14;;"; + let data = "03 00 00 00 01 00 e0 00 38 28 00 e0 f0 72 18 e6"; + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=0,r14; (p06) br.cond.dptk.few 400000000019b1f0 "; + let data = "10 00 00 00 01 00 70 00 38 8c 73 03 80 00 00 42"; + let expected = "[MMI] addl r41=-1576,r1; nop.m 0x0; mov r34=1;;"; + let data = "09 48 61 fb f3 27 00 00 00 02 00 40 14 00 00 90"; + let expected = "[MIB] ld8 r41=[r41]; nop.i 0x0; br.call.sptk.many b0=4000000000070480 ;;"; + let data = "11 48 01 52 18 10 00 00 00 02 00 00 f8 52 ed 58"; + let expected = "[MMI] cmp.eq p7,p6=0,r8; nop.m 0x0; mov r1=r40"; + let data = "08 38 00 10 06 39 00 00 00 02 00 20 00 40 01 84"; + let expected = "[MMB] mov r32=r8; nop.m 0x0; (p07) br.cond.dpnt.few 400000000019b530 ;;"; + let data = "19 00 01 10 00 21 00 00 00 02 80 03 80 03 00 43"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r39; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 00 38 01 55 00 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov b0=r38; adds r12=16,r12;;"; + let data = "01 00 00 00 01 00 00 30 05 80 03 80 01 61 00 84"; + let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many 400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>;;"; + let data = "11 10 0c 00 80 05 00 00 00 02 00 00 68 fd ff 48"; + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=4000000000026c20 <_init@@Base+0x1b00>;;"; + let data = "11 48 01 40 00 21 00 00 00 02 00 00 38 ba e8 58"; + let expected = "[MIB] mov r1=r40; mov r41=r8; br.call.sptk.many b0=40000000000fab00 ;;"; + let data = "11 08 00 50 00 21 90 02 20 00 42 00 08 f9 f5 58"; + let expected = "[MMI] mov r35=r8; ld1 r15=[r36]; mov r1=r40;;"; + let data = "09 18 01 10 00 21 f0 00 90 00 20 20 00 40 01 84"; + let expected = "[MII] nop.m 0x0; sxt1 r15=r15;;; cmp4.eq p7,p6=0,r15"; + let data = "02 00 00 00 01 00 f0 00 3c 28 00 e0 00 78 18 e6"; + let expected = "[MMI] cmp4.eq p9,p8=47,r15;;; (p06) mov r16=1; (p08) mov r14=1;;"; + let data = "0b 48 bc 1e 88 b9 01 09 00 00 48 c4 11 00 00 90"; + let expected = "[MII] (p07) mov r16=r0; (p09) mov r14=r0;;; and r14=r14,r16;;"; + let data = "e3 80 00 00 00 61 e2 00 00 00 42 c0 e1 80 30 80"; + let expected = "[MIB] cmp4.eq p6,p7=0,r14; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019b570 ;;"; + let data = "11 30 00 1c 87 39 00 00 00 02 00 03 20 03 00 43"; + let expected = "[MMI] (p07) mov r16=1; (p07) adds r17=2,r32; (p07) mov r14=2;;"; + let data = "e9 80 04 00 00 e4 11 11 80 00 c2 c3 21 00 00 90"; + let expected = "[MMI] add r18=r35,r16; nop.m 0x0; adds r19=1,r14"; + let data = "08 90 8c 20 00 20 00 00 00 02 00 60 12 70 00 84"; + let expected = "[MII] mov r16=r14; mov r36=r14;;; adds r18=-1,r18;;"; + let data = "03 80 00 1c 00 21 40 02 38 00 42 40 f2 97 fc 8c"; + let expected = "[MMI] st1 [r18]=r15;;; ld1 r15=[r17],1; nop.i 0x0;;"; + let data = "0b 00 3c 24 80 11 f0 08 44 00 28 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r15=r15;;; cmp4.eq p7,p6=0,r15;;"; + let data = "03 00 00 00 01 00 f0 00 3c 28 00 e0 00 78 18 e6"; + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=47,r15; (p07) br.cond.dpnt.few 400000000019b310 ;;"; + let data = "11 00 00 00 01 00 70 78 3d 8c f3 03 60 00 00 43"; + let expected = "[MII] add r18=r35,r16; mov r14=r19;;; adds r18=-1,r18"; + let data = "02 90 8c 20 00 20 e0 00 4c 00 42 40 f2 97 fc 8c"; + let expected = "[MMI] mov r36=r14; mov r16=r14; adds r19=1,r14;;"; + let data = "09 20 01 1c 00 21 00 01 38 00 42 60 12 70 00 84"; + let expected = "[MMI] st1 [r18]=r15;;; ld1 r15=[r17],1; nop.i 0x0;;"; + let data = "0b 00 3c 24 80 11 f0 08 44 00 28 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r15=r15;;; cmp4.eq p7,p6=0,r15;;"; + let data = "03 00 00 00 01 00 f0 00 3c 28 00 e0 00 78 18 e6"; + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=47,r15; (p06) br.cond.dptk.few 400000000019b2c0 "; + let data = "10 00 00 00 01 00 70 78 3d 8c 73 03 c0 ff ff 4a"; + let expected = "[MMI] adds r14=-1,r14; nop.m 0x0; nop.i 0x0;;"; + let data = "09 70 fc 1d 3f 23 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] add r14=r35,r14; nop.m 0x0; mov r41=r35;;"; + let data = "09 70 8c 1c 00 20 00 00 00 02 00 20 05 18 01 84"; + let expected = "[MMI] st1 [r14]=r0; nop.m 0x0; addl r14=19688,r1;;"; + let data = "09 00 00 1c 80 11 00 00 00 02 00 c0 81 0e 64 92"; + let expected = "[MMI] nop.m 0x0; ld8 r8=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 00 38 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.eq p6,p7=0,r8; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019b470 ;;"; + let data = "11 30 00 10 07 39 00 00 00 02 00 03 20 01 00 43"; + let expected = "[MMI] ld8 r14=[r8],8;;; nop.m 0x0; mov b6=r14"; + let data = "0a 70 20 10 18 14 00 00 00 02 00 c0 e0 08 00 07"; + let expected = "[MMB] ld8 r1=[r8]; nop.m 0x0; br.call.sptk.many b0=b6;;"; + let data = "19 08 00 10 18 10 00 00 00 02 00 00 68 00 80 10"; + let expected = "[MMI] cmp.eq p6,p7=0,r8; mov r1=r40; mov r42=r33"; + let data = "08 30 00 10 07 39 10 00 a0 00 42 40 05 08 01 84"; + let expected = "[MMB] mov r43=r36; mov r37=r8; (p06) br.cond.dpnt.few 400000000019b470 ;;"; + let data = "19 58 01 48 00 21 50 02 20 00 42 03 e0 00 00 43"; + let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>;;"; + let data = "11 48 01 10 00 21 00 00 00 02 00 00 a8 fb ff 58"; + let expected = "[MMI] adds r14=16,r12; mov r1=r40; mov r41=r35;;"; + let data = "09 70 40 18 00 21 10 00 a0 00 42 20 05 18 01 84"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = "11 00 20 1c 98 11 00 00 00 02 00 00 08 fa f5 58"; + let expected = "[MIB] mov r1=r40; mov r41=r37; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = "11 08 00 50 00 21 90 02 94 00 42 00 f8 f9 f5 58"; + let expected = "[MMI] adds r14=16,r12; nop.m 0x0; mov r1=r40;;"; + let data = "09 70 40 18 00 21 00 00 00 02 00 20 00 40 01 84"; + let expected = "[MII] ld8 r8=[r14]; mov.i ar.pfs=r39;;; mov b0=r38"; + let data = "02 40 00 1c 18 10 00 38 01 55 00 00 60 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=16,r12; br.ret.sptk.many b0;;"; + let data = "19 00 00 00 01 00 c0 80 30 00 42 80 08 00 84 00"; + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=4000000000026c20 <_init@@Base+0x1b00>;;"; + let data = "11 48 01 40 00 21 00 00 00 02 00 00 18 b8 e8 58"; + let expected = "[MIB] mov r1=r40; adds r41=1,r8; br.call.sptk.many b0=40000000000fab00 ;;"; + let data = "11 08 00 50 00 21 90 0a 20 00 42 00 e8 f6 f5 58"; + let expected = "[MMI] mov r1=r40; nop.m 0x0; mov r41=r8"; + let data = "08 08 00 50 00 21 00 00 00 02 00 20 05 40 00 84"; + let expected = "[MMB] mov r42=r32; nop.m 0x0; br.call.sptk.many b0=40000000000267e0 <_init@@Base+0x16c0>;;"; + let data = "19 50 01 40 00 21 00 00 00 02 00 00 a8 b3 e8 58"; + let expected = "[MII] mov r1=r40; mov.i ar.pfs=r39;;; mov b0=r38"; + let data = "02 08 00 50 00 21 00 38 01 55 00 00 60 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=16,r12; br.ret.sptk.many b0;;"; + let data = "19 00 00 00 01 00 c0 80 30 00 42 80 08 00 84 00"; + let expected = "[MIB] mov r41=r35; nop.i 0x0; br.call.sptk.many b0=4000000000025e60 <_init@@Base+0xd40>;;"; + let data = "11 48 01 46 00 21 00 00 00 02 00 00 f8 a9 e8 58"; + let expected = "[MMI] adds r14=32,r8; cmp.eq p7,p6=0,r8; mov r1=r40"; + let data = "08 70 80 10 00 21 70 00 20 0c 72 20 00 40 01 84"; + let expected = "[MMB] mov r42=r33; mov r43=r36; (p07) br.cond.dpnt.few 400000000019b580 ;;"; + let data = "19 50 01 42 00 21 b0 02 90 00 c2 03 f0 00 00 43"; + let expected = "[MBB] ld8 r41=[r14]; br.call.sptk.many b0=400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>; nop.b 0x0;;"; + let data = "13 48 01 1c 18 10 00 54 fd 7f 2c 00 00 00 00 20"; + let expected = "[MMI] mov r1=r40; nop.m 0x0; nop.i 0x0"; + let data = "08 08 00 50 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r14=16,r12; nop.m 0x0; mov r41=r35;;"; + let data = "09 70 40 18 00 21 00 00 00 02 00 20 05 18 01 84"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = "11 00 20 1c 98 11 00 00 00 02 00 00 f8 f8 f5 58"; + let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=4000000000027140 <_init@@Base+0x2020>;;"; + let data = "11 08 00 50 00 21 00 00 00 02 00 00 68 bc e8 58"; + let expected = "[MMI] adds r14=16,r12; nop.m 0x0; mov r1=r40;;"; + let data = "09 70 40 18 00 21 00 00 00 02 00 20 00 40 01 84"; + let expected = "[MMI] ld8 r8=[r14]; nop.m 0x0; nop.i 0x0"; + let data = "08 40 00 1c 18 10 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r39;;; mov b0=r38"; + let data = "02 00 00 00 01 00 00 38 01 55 00 00 60 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=16,r12; br.ret.sptk.many b0;;"; + let data = "19 00 00 00 01 00 c0 80 30 00 42 80 08 00 84 00"; + let expected = "[MIB] mov r34=1; nop.i 0x0; br.call.sptk.many b0=400000000006dd80 ;;"; + let data = "11 10 05 00 00 24 00 00 00 02 00 00 58 28 ed 58"; + let expected = "[MMI] mov r32=r8; mov r1=r40; mov.i ar.pfs=r39;;"; + let data = "09 00 01 10 00 21 10 00 a0 00 42 00 70 02 aa 00"; + let expected = "[MII] nop.m 0x0; mov b0=r38; adds r12=16,r12;;"; + let data = "01 00 00 00 01 00 00 30 05 80 03 80 01 61 00 84"; + let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many 400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>"; + let data = "10 10 0c 00 80 05 00 00 00 02 00 00 e8 f9 ff 48"; + let expected = "[MIB] mov r14=r0; mov r36=1; br.few 400000000019b320 ;;"; + let data = "11 70 00 00 00 21 40 0a 00 00 48 00 b0 fd ff 48"; + let expected = "[MMI] addl r14=19680,r1; nop.m 0x0; mov r41=r35;;"; + let data = "09 70 80 03 99 24 00 00 00 02 00 20 05 18 01 84"; + let expected = "[MMI] nop.m 0x0; ld8 r8=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 00 38 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.eq p6,p7=0,r8; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019b650 ;;"; + let data = "11 30 00 10 07 39 00 00 00 02 00 03 b0 00 00 43"; + let expected = "[MMI] ld8 r14=[r8],8;;; nop.m 0x0; mov b6=r14"; + let data = "0a 70 20 10 18 14 00 00 00 02 00 c0 e0 08 00 07"; + let expected = "[MMB] ld8 r1=[r8]; nop.m 0x0; br.call.sptk.many b0=b6;;"; + let data = "19 08 00 10 18 10 00 00 00 02 00 00 68 00 80 10"; + let expected = "[MMI] cmp.eq p6,p7=0,r8; mov r1=r40; mov r37=r8"; + let data = "08 30 00 10 07 39 10 00 a0 00 42 a0 04 40 00 84"; + let expected = "[MMB] mov r43=r36; mov r42=r33; (p06) br.cond.dpnt.few 400000000019b650 ;;"; + let data = "19 58 01 48 00 21 a0 02 84 00 42 03 70 00 00 43"; + let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>;;"; + let data = "11 48 01 10 00 21 00 00 00 02 00 00 58 f9 ff 58"; + let expected = "[MMI] adds r14=16,r12; mov r1=r40; mov r41=r37;;"; + let data = "09 70 40 18 00 21 10 00 a0 00 42 20 05 28 01 84"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = "11 00 20 1c 98 11 00 00 00 02 00 00 b8 f7 f5 58"; + let expected = "[MMI] adds r14=16,r12; nop.m 0x0; mov r1=r40;;"; + let data = "09 70 40 18 00 21 00 00 00 02 00 20 00 40 01 84"; + let expected = "[MMI] nop.m 0x0; ld8 r8=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 00 38 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0,r8; (p06) br.cond.sptk.few 400000000019b4c0 "; + let data = "10 00 00 00 01 00 70 00 20 0c 72 03 80 fe ff 48"; + let expected = "[MIB] mov r41=r33; nop.i 0x0; br.call.sptk.many b0=4000000000026c20 <_init@@Base+0x1b00>;;"; + let data = "11 48 01 42 00 21 00 00 00 02 00 00 d8 b5 e8 58"; + let expected = "[MIB] mov r1=r40; adds r41=1,r8; br.call.sptk.many b0=40000000000fab00 ;;"; + let data = "11 08 00 50 00 21 90 0a 20 00 42 00 a8 f4 f5 58"; + let expected = "[MMI] mov r42=r33; nop.m 0x0; mov r1=r40"; + let data = "08 50 01 42 00 21 00 00 00 02 00 20 00 40 01 84"; + let expected = "[MMB] mov r41=r8; nop.m 0x0; br.call.sptk.many b0=40000000000267e0 <_init@@Base+0x16c0>;;"; + let data = "19 48 01 10 00 21 00 00 00 02 00 00 68 b1 e8 58"; + let expected = "[MMI] adds r14=16,r12; mov r1=r40; mov r41=r35;;"; + let data = "09 70 40 18 00 21 10 00 a0 00 42 20 05 18 01 84"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = "11 00 20 1c 98 11 00 00 00 02 00 00 28 f7 f5 58"; + let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=4000000000027140 <_init@@Base+0x2020>;;"; + let data = "11 08 00 50 00 21 00 00 00 02 00 00 98 ba e8 58"; + let expected = "[MMI] adds r14=16,r12; nop.m 0x0; mov r1=r40;;"; + let data = "09 70 40 18 00 21 00 00 00 02 00 20 00 40 01 84"; + let expected = "[MIB] ld8 r8=[r14]; nop.i 0x0; br.few 400000000019b510 ;;"; + let data = "11 40 00 1c 18 10 00 00 00 02 00 00 40 fe ff 48"; + let expected = "[MII] mov r8=r0; mov.i ar.pfs=r39;;; mov b0=r38"; + let data = "02 40 00 00 00 21 00 38 01 55 00 00 60 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=16,r12; br.ret.sptk.many b0;;"; + let data = "19 00 00 00 01 00 c0 80 30 00 42 80 08 00 84 00"; +} + +// from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 +// bfd reports immediates in decimal in many places. all immediates are corrected to hex, as +// yaxpeax-ia64 only reports immediates as hexadecimal. +#[test] +fn test_bash_rl_insert_close() { + // 400000000019bdc0 : + let expected = "[MMB] alloc r44=ar.pfs,20,15,0; adds r12=-144,r12; nop.b 0x0"; + let data = "18 60 51 1e 80 05 c0 80 33 7c 46 00 00 00 00 20"; + let expected = "[MII] addl r14=18388,r1; mov.i r46=ar.lc; mov r45=r1;;"; + let data = "01 70 50 03 8f 24 e0 02 04 65 00 a0 05 08 00 84"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; mov r43=b0;;"; + let data = "09 00 00 00 01 00 00 00 00 02 00 60 05 00 c4 00"; + let expected = "[MMI] nop.m 0x0; ld4 r14=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 38 20 20 00 00 00 04 00"; + let expected = "[MIB] cmp4.eq p7,p6=0,r14; addl r14=15824,r1; (p06) br.cond.dpnt.few 400000000019be30 ;;"; + let data = "11 38 00 1c 86 39 e0 80 06 f6 48 03 30 00 00 43"; + let expected = "[MMI] nop.m 0x0; ld4 r14=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 38 20 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r14; (p06) br.cond.dpnt.few 400000000019be70 "; + let data = "10 00 00 00 01 00 70 00 38 0c 73 03 50 00 00 43"; + let expected = "[MIB] mov r47=r32; mov r48=r33; br.call.sptk.many b0=400000000018b380 <_rl_insert_char@@Base>;;"; + let data = "11 78 01 40 00 21 00 03 84 00 42 00 58 f5 fe 58"; + let expected = "[MMI] mov r8=r0; mov r1=r45; mov.i ar.pfs=r44;;"; + let data = "09 40 00 00 00 21 10 00 b4 00 42 00 c0 02 aa 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r46;;; mov b0=r43"; + let data = "02 00 00 00 01 00 00 70 05 55 00 00 b0 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=144,r12; br.ret.sptk.many b0;;"; + let data = "19 00 00 00 01 00 c0 80 30 02 42 80 08 00 84 00"; + let expected = "[MMI] addl r41=15688,r1; addl r34=20208,r1; nop.i 0x0"; + let data = "08 48 21 03 7a 24 20 82 07 3a 49 00 00 00 04 00"; + let expected = "[MMB] mov r47=1; mov r48=r33; br.call.sptk.many b0=400000000018b380 <_rl_insert_char@@Base>;;"; + let data = "19 78 05 00 00 24 00 03 84 00 42 00 08 f5 fe 58"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] ld8 r14=[r41];;; ld8 r15=[r14],8; nop.i 0x0;;"; + let data = "0b 70 00 52 18 10 f0 40 38 30 28 00 00 00 04 00"; + let expected = "[MIB] ld8 r1=[r14]; mov b6=r15; br.call.sptk.many b0=b6;;"; + let data = "11 08 00 1c 18 10 60 78 04 80 03 00 68 00 80 10"; + let expected = "[MMI] ld4 r37=[r34]; mov r1=r45; cmp4.eq p6,p7=93,r33;;"; + let data = "09 28 01 44 10 10 10 00 b4 00 42 c0 d0 0d 1d e6"; + let expected = "[MMI] addl r14=18272,r1;;; nop.m 0x0; nop.i 0x0;;"; + let data = "0b 70 80 03 8e 24 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] ld8 r14=[r14]; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c360 ;;"; + let data = "11 70 00 1c 18 10 00 00 00 02 00 03 80 04 00 43"; + let expected = "[MIB] cmp4.eq p6,p7=125,r33; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019bf50 ;;"; + let data = "11 30 f4 43 87 39 00 00 00 02 00 03 60 00 00 43"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=41,r33; (p06) br.cond.dpnt.few 400000000019c350 "; + let data = "10 00 00 00 01 00 60 48 85 0e 73 03 50 04 00 43"; + let expected = "[MMI] mov r8=-1; nop.m 0x0; nop.i 0x0"; + let data = "08 40 fc f9 ff 27 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 00 60 01 55 00 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r46;;; mov b0=r43"; + let data = "02 00 00 00 01 00 00 70 05 55 00 00 b0 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=144,r12; br.ret.sptk.many b0"; + let data = "18 00 00 00 01 00 c0 80 30 02 42 80 08 00 84 00"; + let expected = "[MMI] mov r42=123; nop.m 0x0; nop.i 0x0"; + let data = "08 50 ed 01 00 24 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r37=-2,r37; nop.m 0x0; addl r40=15552,r1"; + let data = "08 28 f9 4b 3f 23 00 00 00 02 00 00 05 0c e4 91"; + let expected = "[MMI] mov r39=1; nop.m 0x0; mov r36=r0;;"; + let data = "09 38 05 00 00 24 00 00 00 02 00 80 04 00 00 84"; + let expected = "[MII] nop.m 0x0; sxt4 r35=r37; addp4 r15=r37,r0"; + let data = "00 00 00 00 01 00 30 02 94 2c 00 e0 51 02 20 80"; + let expected = "[MMB] nop.m 0x0; cmp4.lt p6,p7=r37,r0; (p06) br.cond.dpnt.few 400000000019bf10 ;;"; + let data = "19 00 00 00 01 00 60 28 01 0e 61 03 80 ff ff 4b"; + let expected = "[MMI] nop.m 0x0; add r35=r14,r35; mov.i ar.lc=r15;;"; + let data = "09 00 00 00 01 00 30 72 8c 00 40 00 f0 08 aa 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r36; (p06) br.cond.dptk.few 400000000019c000 ;;"; + let data = "11 00 00 00 01 00 60 00 90 0e 73 03 40 00 00 42"; + let expected = "[MMI] ld1 r14=[r35];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 46 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MMI] cmp4.eq p6,p7=r14,r36;;; (p06) mov r36=r0; nop.i 0x0;;"; + let data = "0b 30 38 48 87 b8 41 02 00 00 42 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c070 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 03 80 00 00 43"; + let expected = "[MMI] nop.m 0x0; ld8 r47=[r40]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 02 a0 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.eq p6,p7=0,r47; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c0a0 ;;"; + let data = "11 30 00 5e 07 39 00 00 00 02 00 03 90 00 00 43"; + let expected = "[MMI] ld1 r38=[r35];;; nop.m 0x0; sxt1 r38=r38;;"; + let data = "0b 30 01 46 00 10 00 00 00 02 00 c0 04 30 51 00"; + let expected = "[MIB] mov r48=r38; nop.i 0x0; br.call.sptk.many b0=4000000000026c00 <_init@@Base+0x1ae0>;;"; + let data = "11 80 01 4c 00 21 00 00 00 02 00 00 d8 ab e8 58"; + let expected = "[MMI] nop.m 0x0; cmp.eq p7,p6=0,r8; mov r1=r45"; + let data = "08 00 00 00 01 00 70 00 20 0c 72 20 00 68 01 84"; + let expected = "[MMB] nop.m 0x0; nop.m 0x0; (p07) br.cond.dpnt.few 400000000019c0a0 ;;"; + let data = "19 00 00 00 01 00 00 00 00 02 80 03 50 00 00 43"; + let expected = "[MMI] (p06) mov r36=r38; nop.m 0x0; nop.i 0x0"; + let data = "c8 20 01 4c 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r39; (p06) br.cond.dpnt.few 400000000019c100 "; + let data = "10 00 00 00 01 00 60 00 9c 0e 73 03 90 00 00 43"; + let expected = "[MIB] adds r37=-1,r37; adds r35=-1,r35; br.cloop.sptk.few 400000000019bfc0 "; + let data = "10 28 fd 4b 3f 23 30 fa 8f 7e 46 a0 40 ff ff 48"; + let expected = "[MIB] nop.m 0x0; mov r8=-1; br.few 400000000019bf20 ;;"; + let data = "11 00 00 00 01 00 80 f8 f3 ff 4f 00 90 fe ff 48"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r36; (p06) br.cond.dptk.few 400000000019c070 "; + let data = "10 00 00 00 01 00 70 00 90 0c 73 03 d0 ff ff 4a"; + let expected = "[MMI] ld1 r14=[r35];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 46 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MMI] cmp4.eq p7,p6=r14,r33;;; (p07) adds r39=1,r39; nop.i 0x0;;"; + let data = "0b 38 38 42 86 f8 71 0a 9c 00 42 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019c070 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 80 03 a0 ff ff 4b"; + let expected = "[MMI] cmp4.eq p7,p6=r42,r14;;; (p07) adds r39=-1,r39; nop.i 0x0;;"; + let data = "0b 38 a8 1c 86 f8 71 fa 9f 7e 46 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r39; (p07) br.cond.dptk.few 400000000019c080 ;;"; + let data = "11 00 00 00 01 00 60 00 9c 0e f3 03 90 ff ff 4a"; + let expected = "[MMI] nop.m 0x0; adds r14=32,r12; mov.i ar.lc=15;;"; + let data = "09 00 00 00 01 00 e0 00 31 00 42 00 f0 08 2a 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] st8 [r14]=r0,8; nop.i 0x0; br.cloop.sptk.few 400000000019c120 "; + let data = "10 40 00 1c 98 15 00 00 00 02 00 a0 00 00 00 40"; + let expected = "[MMI] addl r35=18368,r1;;; nop.m 0x0; nop.i 0x0;;"; + let data = "0b 18 01 03 8f 24 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] ld8 r47=[r35]; nop.i 0x0; br.call.sptk.many b0=4000000000027040 <_init@@Base+0x1f20>;;"; + let data = "11 78 01 46 18 10 00 00 00 02 00 00 08 af e8 58"; + let expected = "[MIB] nop.m 0x0; extr r36=r8,31,1; nop.b 0x0"; + let data = "10 00 00 00 01 00 40 fa 21 00 29 00 00 00 00 20"; + let expected = "[MMI] adds r14=32,r12; ld8 r47=[r35]; mov r1=r45;;"; + let data = "09 70 80 18 00 21 f0 02 8c 30 20 20 00 68 01 84"; + let expected = "[MII] nop.m 0x0; shr.u r36=r36,58;;; add r36=r36,r8;;"; + let data = "03 00 00 00 01 00 40 a2 93 0a 29 80 44 42 00 80"; + let expected = "[MII] nop.m 0x0; extr r36=r36,6,26;;; shladd r36=r36,3,r14;;"; + let data = "03 00 00 00 01 00 40 6a 90 32 29 80 44 72 48 80"; + let expected = "[MIB] ld8 r38=[r36]; nop.i 0x0; br.call.sptk.many b0=4000000000027040 <_init@@Base+0x1f20>;;"; + let data = "11 30 01 48 18 10 00 00 00 02 00 00 b8 ae e8 58"; + let expected = "[MIB] nop.m 0x0; extr r17=r8,31,1; nop.b 0x0"; + let data = "10 00 00 00 01 00 10 f9 21 00 29 00 00 00 00 20"; + let expected = "[MMI] mov r1=r45; mov r20=1; adds r15=16,r12;;"; + let data = "09 08 00 5a 00 21 40 09 00 00 48 e0 01 61 00 84"; + let expected = "[MMI] addl r14=15828,r1; nop.m 0x0; shr.u r17=r17,58"; + let data = "08 70 50 03 7b 24 00 00 00 02 00 20 42 8f 14 52"; + let expected = "[MMI] ld8 r18=[r41]; ld4 r35=[r34]; nop.i 0x0;;"; + let data = "09 90 00 52 18 10 30 02 88 20 20 00 00 00 04 00"; + let expected = "[MLX] ld4 r16=[r14]; movl r14=0x431bde82d7b634db"; + let data = "04 80 00 1c 10 90 d7 82 de 1b 43 c0 b1 d5 a6 61"; + let expected = "[MMI] add r8=r8,r17; st4 [r34]=r37; nop.i 0x0;;"; + let data = "09 40 20 22 00 20 00 28 89 20 23 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; sxt4 r16=r16; nop.b 0x0"; + let data = "10 00 00 00 01 00 00 01 40 2c 00 00 00 00 00 20"; + let expected = "[MMI] setf.sig f7=r14; nop.m 0x0; and r8=63,r8;;"; + let data = "09 38 38 00 e1 18 00 00 00 02 00 00 f1 43 b0 80"; + let expected = "[MII] setf.sig f6=r16; shr r19=r16,63; sub r17=r8,r17;;"; + let data = "01 30 40 00 e1 18 30 f9 43 00 29 20 82 88 14 80"; + let expected = "[MII] nop.m 0x0; sxt4 r17=r17;;; shl r20=r20,r17;;"; + let data = "03 00 00 00 01 00 10 01 44 2c 00 80 42 89 20 79"; + let expected = "[MFI] nop.m 0x0; xmpy.h f6=f6,f7; or r38=r38,r20;;"; + let data = "0d 00 00 00 01 00 60 00 18 0e 77 c0 64 a2 38 80"; + let expected = "[MMI] st8 [r36]=r38;;; getf.sig r14=f6; nop.i 0x0;;"; + let data = "0b 00 98 48 98 11 e0 30 00 c2 21 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; shr r14=r14,18;;; sub r14=r14,r19;;"; + let data = "03 00 00 00 01 00 e0 28 39 5a 29 c0 e1 98 14 80"; + let expected = "[MII] nop.m 0x0; shl r17=r14,5; sxt4 r19=r14;;"; + let data = "01 00 00 00 01 00 10 71 e8 f4 29 60 02 70 58 00"; + let expected = "[MMI] sub r17=r17,r14; st8 [r15]=r19,8; nop.i 0x0;;"; + let data = "09 88 44 1c 05 20 80 98 3c 30 2b 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; shl r19=r17,6;;; sub r17=r19,r17;;"; + let data = "03 00 00 00 01 00 30 89 e4 f2 29 20 32 89 14 80"; + let expected = "[MMI] shladd r14=r17,3,r14;;; nop.m 0x0; shl r14=r14,6;;"; + let data = "0b 70 44 1c 12 20 00 00 00 02 00 c0 e1 c8 e5 53"; + let expected = "[MMI] sub r16=r16,r14;;; nop.m 0x0; sxt4 r16=r16;;"; + let data = "0b 80 40 1c 05 20 00 00 00 02 00 00 02 80 58 00"; + let expected = "[MMI] st8 [r15]=r16;;; ld8 r14=[r18],8; nop.i 0x0;;"; + let data = "0b 00 40 1e 98 11 e0 40 48 30 28 00 00 00 04 00"; + let expected = "[MIB] ld8 r1=[r18]; mov b6=r14; br.call.sptk.many b0=b6;;"; + let data = "11 08 00 24 18 10 60 70 04 80 03 00 68 00 80 10"; + let expected = "[MMI] mov r1=r45; mov r47=1; adds r48=32,r12"; + let data = "08 08 00 5a 00 21 f0 0a 00 00 48 00 06 62 00 84"; + let expected = "[MMI] mov r49=r0; mov r50=r0; adds r51=16,r12;;"; + let data = "09 88 01 00 00 21 20 03 00 00 42 60 06 61 00 84"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=4000000000026360 <_init@@Base+0x1240>;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 68 a0 e8 58"; + let expected = "[MMB] st4 [r34]=r35; mov r8=r0; nop.b 0x0"; + let data = "18 00 8c 44 90 11 80 00 00 00 42 00 00 00 00 20"; + let expected = "[MII] mov r1=r45; mov.i ar.pfs=r44;;; mov.i ar.lc=r46;;"; + let data = "03 08 00 5a 00 21 00 60 01 55 00 00 e0 0a aa 00"; + let expected = "[MII] nop.m 0x0; mov b0=r43; nop.i 0x0"; + let data = "00 00 00 00 01 00 00 58 05 80 03 00 00 00 04 00"; + let expected = "[MMB] adds r12=144,r12; nop.m 0x0; br.ret.sptk.many b0"; + let data = "18 60 40 18 01 21 00 00 00 02 00 80 08 00 84 00"; + let expected = "[MIB] nop.m 0x0; mov r42=40; br.few 400000000019bf60 ;;"; + let data = "11 00 00 00 01 00 a0 42 01 00 48 00 10 fc ff 48"; + let expected = "[MIB] nop.m 0x0; mov r42=91; br.few 400000000019bf60 ;;"; + let data = "11 00 00 00 01 00 a0 da 02 00 48 00 00 fc ff 48"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; +} + +// from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 +// bfd reports immediates in decimal in many places. all immediates are corrected to hex, as +// yaxpeax-ia64 only reports immediates as hexadecimal. +#[test] +fn test_bash_rl_set_paren_blink_timeout() { + // 400000000019c500 : + let expected = "[MII] addl r14=15828,r1; cmp4.lt p7,p6=0,r32;;; nop.i 0x0"; + let data = "02 70 50 03 7b 24 70 00 80 0c 63 00 00 00 04 00"; + let expected = "[MMB] ld4 r8=[r14]; (p07) st4 [r14]=r32; br.ret.sptk.many b0;;"; + let data = "19 40 00 1c 10 d0 01 00 39 20 23 80 08 00 84 00"; + let expected = "[MII] nop.m 0x6; nop.i 0x7; nop.i 0x8"; + let data = "00 30 00 00 01 00 70 00 00 02 00 00 01 00 04 00"; + let expected = "[MII] nop.m 0x6; nop.i 0x7; nop.i 0x8"; + let data = "00 30 00 00 01 00 70 00 00 02 00 00 01 00 04 00"; + let expected = "[MMB] alloc r39=ar.pfs,14,9,0; addl r35=-2512,r1; nop.b 0x0"; + let data = "18 38 39 12 80 05 30 82 f5 d9 4f 00 00 00 00 20"; + let expected = "[MII] addl r42=1008,r1; mov r38=b0; mov r40=r1;;"; + let data = "01 50 c1 03 07 24 60 02 00 62 00 00 05 08 00 84"; + let expected = "[MMI] ld8 r35=[r35]; nop.m 0x0; mov r41=r0"; + let data = "08 18 01 46 18 10 00 00 00 02 00 20 05 00 00 84"; + let expected = "[MMI] mov r43=5; ld8 r42=[r42]; nop.i 0x0;;"; + let data = "09 58 15 00 00 24 a0 02 a8 30 20 00 00 00 04 00"; + let expected = "[MIB] ld8 r36=[r35]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 20 01 46 18 10 00 00 00 02 00 00 48 9e e8 58"; + let expected = "[MMI] mov r37=r8; cmp.eq p7,p6=0,r33; mov r1=r40"; + let data = "08 28 01 10 00 21 70 00 84 0c 72 20 00 40 01 84"; + let expected = "[MMB] mov r44=r33; mov r45=r34; (p07) br.cond.dpnt.few 400000000019c630 ;;"; + let data = "19 60 01 42 00 21 d0 02 88 00 c2 03 90 00 00 43"; + let expected = "[MMI] mov r43=r37; nop.m 0x0; mov r41=r36"; + let data = "08 58 01 4a 00 21 00 00 00 02 00 20 05 20 01 84"; + let expected = "[MMB] mov r42=1; nop.m 0x0; br.call.sptk.many b0=4000000000027440 <_init@@Base+0x2320>;;"; + let data = "19 50 05 00 00 24 00 00 00 02 00 00 88 ae e8 58"; + let expected = "[MMI] nop.m 0x0; mov r1=r40; nop.i 0x0"; + let data = "08 00 00 00 01 00 10 00 a0 00 42 00 00 00 04 00"; + let expected = "[MMB] ld8 r41=[r35]; nop.m 0x0; br.call.sptk.many b0=40000000000260e0 <_init@@Base+0xfc0>;;"; + let data = "19 48 01 46 18 10 00 00 00 02 00 00 08 9b e8 58"; + let expected = "[MMI] mov r1=r40; mov r41=r32; nop.i 0x0"; + let data = "08 08 00 50 00 21 90 02 80 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r42=r33; mov r43=r34; br.call.sptk.many b0=400000000007dd00 ;;"; + let data = "19 50 01 42 00 21 b0 02 88 00 42 00 08 17 ee 58"; + let expected = "[MMI] mov r1=r40; nop.m 0x0; mov.i ar.pfs=r39;;"; + let data = "09 08 00 50 00 21 00 00 00 02 00 00 70 02 aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r38; br.ret.sptk.many b0"; + let data = "10 00 00 00 01 00 00 30 05 80 03 80 08 00 84 00"; + let expected = "[MMI] addl r42=1016,r1; mov r41=r0; mov r43=5;;"; + let data = "09 50 e1 03 07 24 90 02 00 00 42 60 55 00 00 90"; + let expected = "[MIB] ld8 r42=[r42]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 50 01 54 18 10 00 00 00 02 00 00 88 9d e8 58"; + let expected = "[MMI] mov r44=r8; mov r43=r37; mov r45=r34"; + let data = "08 60 01 10 00 21 b0 02 94 00 42 a0 05 10 01 84"; + let expected = "[MMI] mov r1=r40; mov r41=r36; mov r42=1;;"; + let data = "09 08 00 50 00 21 90 02 90 00 42 40 15 00 00 90"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=4000000000027440 <_init@@Base+0x2320>;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 d8 ad e8 58"; + let expected = "[MMI] nop.m 0x0; mov r1=r40; nop.i 0x0"; + let data = "08 00 00 00 01 00 10 00 a0 00 42 00 00 00 04 00"; + let expected = "[MMB] ld8 r41=[r35]; nop.m 0x0; br.call.sptk.many b0=40000000000260e0 <_init@@Base+0xfc0>;;"; + let data = "19 48 01 46 18 10 00 00 00 02 00 00 58 9a e8 58"; + let expected = "[MMI] mov r1=r40; mov r41=r32; nop.i 0x0"; + let data = "08 08 00 50 00 21 90 02 80 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r42=r33; mov r43=r34; br.call.sptk.many b0=400000000007dd00 ;;"; + let data = "19 50 01 42 00 21 b0 02 88 00 42 00 58 16 ee 58"; + let expected = "[MMI] mov r1=r40; nop.m 0x0; mov.i ar.pfs=r39;;"; + let data = "09 08 00 50 00 21 00 00 00 02 00 00 70 02 aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r38; br.ret.sptk.many b0;;"; + let data = "11 00 00 00 01 00 00 30 05 80 03 80 08 00 84 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] alloc r44=ar.pfs,18,15,0; adds r35=-8,r32; mov r43=b0"; + let data = "08 60 49 1e 80 05 30 c2 83 7e 46 60 05 00 c4 00"; + let expected = "[MII] cmp.eq p6,p7=0,r32; mov r45=r1;;; mov.i r46=ar.lc"; + let data = "02 30 00 40 07 39 d0 02 04 00 42 c0 05 08 ca 00"; + let expected = "[MMB] mov r47=r0; mov r49=5; (p06) br.cond.dpnt.few 400000000019cbc0 ;;"; + let data = "19 78 01 00 00 21 10 2b 00 00 48 03 a0 04 00 43"; + let expected = "[MMI] ld1 r14=[r35];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 46 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MMI] cmp4.eq p6,p7=-42,r14;;; (p06) adds r14=-4,r32; (p07) mov r37=r32;;"; + let data = "0b 30 58 1d 87 bb e1 e0 83 7e c6 a3 04 00 01 84"; + let expected = "[MMI] (p06) ld4 r37=[r14];;; (p06) sub r37=r32,r37; nop.i 0x0;;"; + let data = "cb 28 01 1c 10 90 51 02 95 0a 40 00 00 00 04 00"; + let expected = "[MMI] (p06) adds r35=-8,r37;;; (p06) ld1 r14=[r35]; nop.i 0x0;;"; + let data = "cb 18 e1 4b 3f a3 e1 00 8c 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; (p06) sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 80 e1 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] cmp4.eq p6,p7=-9,r14; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c7f0 ;;"; + let data = "11 30 dc 1d 87 3b 00 00 00 02 00 03 70 00 00 43"; + let expected = "[MMI] cmp4.eq p7,p6=84,r14;;; (p07) addl r48=1024,r1; nop.i 0x0;;"; + let data = "0b 38 50 1d 86 f9 01 03 04 10 48 00 00 00 04 00"; + let expected = "[MMI] (p06) addl r48=1032,r1;;; (p07) ld8 r48=[r48]; nop.i 0x0;;"; + let data = "cb 80 21 02 08 e4 01 03 c0 30 20 00 00 00 04 00"; + let expected = "[MIB] (p06) ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "d1 80 01 60 18 10 00 00 00 02 00 00 18 9c e8 58"; + let expected = "[MMI] mov r47=r8; mov r1=r45; nop.i 0x0"; + let data = "08 78 01 10 00 21 10 00 b4 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 80 01 42 00 21 10 03 88 00 42 00 78 fd ff 58"; + let expected = "[MMI] mov r1=r45; nop.m 0x0; nop.i 0x0;;"; + let data = "09 08 00 5a 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r14=2,r35; mov r15=21845; nop.i 0x0"; + let data = "08 70 08 46 00 21 f0 a8 02 54 49 00 00 00 04 00"; + let expected = "[MMI] addl r47=1040,r1; mov r48=r33; mov r49=r34;;"; + let data = "09 78 41 02 08 24 00 03 84 00 42 20 06 10 01 84"; + let expected = "[MMI] ld2 r14=[r14]; ld8 r47=[r47]; nop.i 0x0;;"; + let data = "09 70 00 1c 08 10 f0 02 bc 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp4.eq p6,p7=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c850 ;;"; + let data = "11 30 38 1e 87 38 00 00 00 02 00 03 30 00 00 43"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 18 fd ff 58"; + let expected = "[MMI] mov r1=r45; nop.m 0x0; nop.i 0x0;;"; + let data = "09 08 00 5a 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r42=1,r35; adds r39=4,r35; addl r41=1152,r1;;"; + let data = "09 50 05 46 00 21 70 22 8c 00 42 20 05 08 24 90"; + let expected = "[MMI] ld1 r36=[r42]; ld4 r15=[r39]; nop.i 0x0;;"; + let data = "09 20 01 54 00 10 f0 00 9c 20 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r36=r36; nop.i 0x0"; + let data = "00 00 00 00 01 00 40 02 90 28 00 00 00 00 04 00"; + let expected = "[MII] ld8 r41=[r41]; adds r14=19,r15;;; sxt4 r38=r36"; + let data = "02 48 01 52 18 10 e0 98 3c 00 42 c0 04 20 59 00"; + let expected = "[MMI] and r14=-8,r14;;; shladd r16=r38,3,r41; addp4 r14=r14,r0;;"; + let data = "0b 70 e0 1d 2c 22 00 31 a5 24 40 c0 e1 00 20 80"; + let expected = "[MMI] ld8 r40=[r16]; nop.m 0x0; addp4 r16=r15,r0;;"; + let data = "09 40 01 20 18 10 00 00 00 02 00 00 f2 00 20 80"; + let expected = "[MIB] cmp.ltu p7,p6=r40,r14; mov r14=r0; (p07) br.cond.dpnt.few 400000000019cbe0 ;;"; + let data = "11 38 a0 1c 06 34 e0 00 00 00 c2 03 30 03 00 43"; + let expected = "[MMI] add r37=r37,r16;;; mov r16=r37; adds r17=2,r37"; + let data = "0a 28 95 20 00 20 00 01 94 00 42 20 22 28 01 84"; + let expected = "[MMI] adds r37=3,r37;;; ld1 r18=[r16],1; nop.i 0x0"; + let data = "0a 28 0d 4a 00 21 20 09 40 00 28 00 00 00 04 00"; + let expected = "[MMI] ld1 r17=[r17];;; nop.m 0x0; dep r14=r18,r14,0,8"; + let data = "0a 88 00 22 00 10 00 00 00 02 00 c0 21 71 dc 4f"; + let expected = "[MMI] ld1 r18=[r16]; ld1 r16=[r37]; nop.i 0x0;;"; + let data = "09 90 00 20 00 10 00 01 94 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r18,r14,8,8;;; dep r14=r17,r14,16,8;;"; + let data = "03 00 00 00 01 00 e0 90 38 ee 26 c0 11 71 dc 4b"; + let expected = "[MII] nop.m 0x0; dep r14=r16,r14,24,8; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 80 38 ee 24 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r15,r14; (p06) br.cond.dpnt.few 400000000019c980 "; + let data = "10 00 00 00 01 00 60 78 38 0e 71 03 60 00 00 43"; + let expected = "[MMI] addl r48=1056,r1; mov r47=r0; mov r49=5;;"; + let data = "09 80 81 02 08 24 f0 02 00 00 42 20 56 00 00 90"; + let expected = "[MIB] ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 80 01 60 18 10 00 00 00 02 00 00 88 9a e8 58"; + let expected = "[MMI] mov r47=r8; mov r1=r45; nop.i 0x0"; + let data = "08 78 01 10 00 21 10 00 b4 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 80 01 42 00 21 10 03 88 00 42 00 e8 fb ff 58"; + let expected = "[MMI] mov r1=r45; nop.m 0x0; nop.i 0x0"; + let data = "08 08 00 5a 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p7,p6=9,r36; (p07) br.cond.dpnt.few 400000000019ccc0 ;;"; + let data = "11 00 00 00 01 00 70 48 90 0c e3 03 40 03 00 43"; + let expected = "[MMI] nop.m 0x0; addl r37=36672,r1; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 50 02 06 3c 4a 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; ld4 r49=[r39]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 10 03 9c 20 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r49; (p06) br.cond.dptk.few 400000000019cb40 ;;"; + let data = "11 00 00 00 01 00 60 00 c4 0e 73 03 80 01 00 42"; + let expected = "[MIB] nop.m 0x0; cmp4.ltu p6,p7=32,r49; (p06) br.cond.dptk.few 400000000019ce90 "; + let data = "10 00 00 00 01 00 60 00 c5 0e 6b 03 c0 04 00 42"; + let expected = "[MMI] addp4 r49=r49,r0;;; cmp.ltu p7,p6=7,r49; nop.i 0x0;;"; + let data = "0b 88 c5 00 08 20 70 38 c4 0c 6a 00 00 00 04 00"; + let expected = "[MII] (p07) adds r14=-1,r49; (p07) and r49=7,r49;;; (p07) shr.u r14=r14,3;;"; + let data = "e3 70 fc 63 3f e3 11 3b c4 58 c0 c3 61 70 f0 52"; + let expected = "[MMI] (p06) mov r14=r0; nop.m 0x0; cmp.ltu p6,p7=7,r49;;"; + let data = "c9 70 00 00 00 21 00 00 00 02 00 c0 70 88 1d d4"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dptk.few 400000000019d070 "; + let data = "10 00 00 00 01 00 00 00 00 02 80 03 60 06 00 42"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-49; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 78 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 40 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] cmp.eq p6,p7=0,r14; nop.m 0x0; mov r15=-49;;"; + let data = "09 30 00 1c 07 39 00 00 00 02 00 e0 f1 e4 ff 9f"; + let expected = "[MMI] nop.m 0x0; st1 [r32]=r15; (p07) adds r14=-1,r14"; + let data = "08 00 00 00 01 00 00 78 80 00 a3 c3 f1 77 fc 8c"; + let expected = "[MMB] nop.m 0x0; (p07) adds r32=1,r32; (p07) br.cond.dptk.few 400000000019ca20 ;;"; + let data = "19 00 00 00 01 c0 01 0a 80 00 c2 03 00 ff ff 4a"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p7,p6=29,r36; (p07) br.cond.dpnt.few 400000000019cd90 "; + let data = "10 00 00 00 01 00 70 e8 90 0c e3 03 50 02 00 43"; + let expected = "[MMI] add r15=r37,r38;;; ld1 r14=[r15]; nop.i 0x0;;"; + let data = "0b 78 94 4c 00 20 e0 00 3c 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=1,r14; (p07) br.cond.dpnt.few 400000000019cde0 "; + let data = "10 00 00 00 01 00 70 08 38 0c f3 03 70 02 00 43"; + let expected = "[MMI] st1 [r15]=r0; addl r15=36704,r1; mov r14=r35;;"; + let data = "09 00 00 1e 80 11 f0 00 07 3c 4a c0 01 18 01 84"; + let expected = "[MMI] nop.m 0x0;;; shladd r38=r38,3,r15; mov r15=84;;"; + let data = "0b 00 00 00 01 00 60 32 3d 24 40 e0 41 05 00 90"; + let expected = "[MMI] st1 [r14]=r15,8; ld8 r15=[r38]; nop.i 0x0"; + let data = "08 40 3c 1c 80 15 f0 00 98 30 20 00 00 00 04 00"; + let expected = "[MMI] st8 [r38]=r35;;; st8 [r14]=r15; nop.i 0x0"; + let data = "0a 00 8c 4c 98 11 00 78 38 30 23 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44;;; mov.i ar.lc=r46;;"; + let data = "03 00 00 00 01 00 00 60 01 55 00 00 e0 0a aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0"; + let data = "10 00 00 00 01 00 00 58 05 80 03 80 08 00 84 00"; + let expected = "[MMI] addl r48=1048,r1; mov r47=r0; mov r49=5;;"; + let data = "09 80 61 02 08 24 f0 02 00 00 42 20 56 00 00 90"; + let expected = "[MIB] ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 80 01 60 18 10 00 00 00 02 00 00 d8 97 e8 58"; + let expected = "[MMI] mov r47=r8; mov r1=r45; nop.i 0x0"; + let data = "08 78 01 10 00 21 10 00 b4 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 80 01 42 00 21 10 03 88 00 42 00 38 f9 ff 58"; + let expected = "[MMI] ld4 r15=[r39]; mov r14=r0; mov r1=r45;;"; + let data = "09 78 00 4e 10 10 e0 00 00 00 42 20 00 68 01 84"; + let expected = "[MMI] addp4 r16=r15,r0;;; add r37=r37,r16; nop.i 0x0;;"; + let data = "0b 80 3c 00 08 20 50 2a 41 00 40 00 00 00 04 00"; + let expected = "[MMI] mov r16=r37; adds r17=2,r37; adds r37=3,r37;;"; + let data = "09 80 00 4a 00 21 10 11 94 00 42 a0 34 28 01 84"; + let expected = "[MMI] ld1 r18=[r16],1; ld1 r17=[r17]; nop.i 0x0;;"; + let data = "09 90 04 20 00 14 10 01 44 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r18,r14,0,8; nop.i 0x0"; + let data = "00 00 00 00 01 00 e0 90 38 ee 27 00 00 00 04 00"; + let expected = "[MMI] ld1 r18=[r16]; ld1 r16=[r37]; nop.i 0x0;;"; + let data = "09 90 00 20 00 10 00 01 94 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r18,r14,8,8;;; dep r14=r17,r14,16,8;;"; + let data = "03 00 00 00 01 00 e0 90 38 ee 26 c0 11 71 dc 4b"; + let expected = "[MII] nop.m 0x0; dep r14=r16,r14,24,8; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 80 38 ee 24 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r15,r14; (p07) br.cond.dptk.few 400000000019c930 "; + let data = "10 00 00 00 01 00 60 78 38 0e f1 03 90 fc ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019c980 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 d0 fc ff 48"; + let expected = "[MIB] add r37=r35,r40; mov r47=r0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = "11 28 8d 50 00 20 f0 02 00 00 42 00 88 a6 e8 58"; + let expected = "[MIB] mov r1=r45; cmp.eq p7,p6=r8,r37; (p06) br.cond.dptk.few 400000000019c990 ;;"; + let data = "11 08 00 5a 00 21 70 40 94 0c 70 03 c0 fc ff 4a"; + let expected = "[MIB] addl r37=36672,r1; cmp4.lt p6,p7=12,r36; (p06) br.cond.dpnt.few 400000000019cd50 ;;"; + let data = "11 28 01 03 1e 25 60 60 90 0e 63 03 70 00 00 43"; + let expected = "[MMI] nop.m 0x0;;; add r14=r37,r38; nop.i 0x0;;"; + let data = "0b 00 00 00 01 00 e0 28 99 00 40 00 00 00 04 00"; + let expected = "[MMI] ld1 r14=[r14];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 1c 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MIB] cmp4.eq p7,p6=0,r14; addl r14=36704,r1; (p06) br.cond.dpnt.few 400000000019cd50 ;;"; + let data = "11 38 00 1c 86 39 e0 00 07 3c 4a 03 40 00 00 43"; + let expected = "[MMI] nop.m 0x0;;; shladd r14=r38,3,r14; nop.i 0x0;;"; + let data = "0b 00 00 00 01 00 e0 30 39 24 40 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; ld8 r14=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 38 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0,r14; (p06) br.cond.dpnt.few 400000000019c9b0 "; + let data = "10 00 00 00 01 00 60 00 38 0e 72 03 70 fc ff 4b"; + let expected = "[MIB] sub r47=r0,r40; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = "11 78 01 50 05 20 00 00 00 02 00 00 f8 a5 e8 58"; + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r46; mov r1=r45;;"; + let data = "01 00 00 00 01 00 00 70 05 55 00 20 00 68 01 84"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 00 60 01 55 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0"; + let data = "10 00 00 00 01 00 00 58 05 80 03 80 08 00 84 00"; + let expected = "[MMI] addl r47=1064,r1; mov r48=r33; mov r49=r34;;"; + let data = "09 78 a1 02 08 24 00 03 84 00 42 20 06 10 01 84"; + let expected = "[MIB] ld8 r47=[r47]; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "11 78 01 5e 18 10 00 00 00 02 00 00 a8 f7 ff 58"; + let expected = "[MMI] add r15=r37,r38; nop.m 0x0; mov r1=r45;;"; + let data = "09 78 94 4c 00 20 00 00 00 02 00 20 00 68 01 84"; + let expected = "[MMI] ld1 r14=[r15];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 1e 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=1,r14; (p06) br.cond.dptk.few 400000000019cb80 "; + let data = "10 00 00 00 01 00 70 08 38 0c 73 03 b0 fd ff 4a"; + let expected = "[MMI] adds r39=-1,r36; addl r14=36672,r1; adds r36=-3,r36;;"; + let data = "09 38 fd 49 3f 23 e0 00 06 3c 4a 80 d4 27 fd 8c"; + let expected = "[MII] nop.m 0x0; sxt4 r40=r39; nop.i 0x0"; + let data = "00 00 00 00 01 00 80 02 9c 2c 00 00 00 00 04 00"; + let expected = "[MMB] nop.m 0x0; cmp4.lt p7,p6=1,r39; (p06) br.cond.dpnt.few 400000000019cbc0 ;;"; + let data = "19 00 00 00 01 00 70 08 9c 0c 63 03 c0 fd ff 4b"; + let expected = "[MMI] add r14=r14,r40; nop.m 0x0; addp4 r36=r36,r0;;"; + let data = "09 70 38 50 00 20 00 00 00 02 00 80 44 02 20 80"; + let expected = "[MMI] ld1 r14=[r14];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 1c 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r14; (p06) br.cond.dpnt.few 400000000019cf00 ;;"; + let data = "11 00 00 00 01 00 60 00 38 0e 73 03 d0 00 00 43"; + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r36; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 00 20 05 55 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; adds r39=-1,r39; br.cloop.sptk.few 400000000019ced0 "; + let data = "10 00 00 00 01 00 70 fa 9f 7e 46 a0 70 00 00 40"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44;;; mov.i ar.lc=r46;;"; + let data = "03 00 00 00 01 00 00 60 01 55 00 00 e0 0a aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0;;"; + let data = "11 00 00 00 01 00 00 58 05 80 03 80 08 00 84 00"; + let expected = "[MMI] mov r47=r32; nop.m 0x0; mov r48=207"; + let data = "08 78 01 40 00 21 00 00 00 02 00 00 f6 04 04 90"; + let expected = "[MMB] addp4 r49=r49,r0; nop.m 0x0; br.call.sptk.many b0=4000000000026e60 <_init@@Base+0x1d40>;;"; + let data = "19 88 c5 00 08 20 00 00 00 02 00 00 c8 9f e8 58"; + let expected = "[MIB] mov r1=r45; cmp4.lt p7,p6=29,r36; (p06) br.cond.dptk.few 400000000019cb50 "; + let data = "10 08 00 5a 00 21 70 e8 90 0c 63 03 a0 fc ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019cd90 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 d0 fe ff 48"; + let expected = "[MII] nop.m 0x0; sxt4 r40=r39;;; add r14=r37,r40;;"; + let data = "03 00 00 00 01 00 80 02 9c 2c 00 c0 51 42 01 80"; + let expected = "[MMI] ld1 r14=[r14];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 1c 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r14; (p06) br.cond.dptk.few 400000000019ce60 "; + let data = "10 00 00 00 01 00 70 00 38 0c 73 03 70 ff ff 4a"; + let expected = "[MMI] shladd r14=r40,3,r41; shladd r38=r38,3,r41; sxt1 r39=r39;;"; + let data = "09 70 a0 52 12 20 60 32 a5 24 40 e0 04 38 51 00"; + let expected = "[MMI] ld8 r36=[r14]; ld8 r47=[r38]; nop.i 0x0;;"; + let data = "09 20 01 1c 18 10 f0 02 98 30 20 00 00 00 04 00"; + let expected = "[MIB] mov r48=r36; nop.i 0x0; br.call.sptk.many b0=400000000019f2a0 ;;"; + let data = "11 80 01 48 00 21 00 00 00 02 00 00 88 23 00 50"; + let expected = "[MMI] adds r14=-1,r8; nop.m 0x0; mov r15=84"; + let data = "08 70 fc 11 3f 23 00 00 00 02 00 e0 41 05 00 90"; + let expected = "[MII] st1 [r42]=r39; mov r1=r45;;; cmp4.lt p7,p6=0,r14"; + let data = "02 00 9c 54 80 11 10 00 b4 00 42 e0 00 70 18 c6"; + let expected = "[MMB] st1 [r35]=r15; nop.m 0x0; (p06) br.cond.dpnt.few 400000000019d100 ;;"; + let data = "19 00 3c 46 80 11 00 00 00 02 00 03 b0 01 00 43"; + let expected = "[MMI] (p07) adds r15=-1,r14; (p07) mov r14=r35; (p07) mov r17=84;;"; + let data = "e9 78 fc 1d 3f e3 e1 00 8c 00 c2 23 42 05 00 90"; + let expected = "[MII] (p07) addp4 r15=r15,r0; adds r16=8,r14;;; (p07) mov.i ar.lc=r15"; + let data = "e2 78 3c 00 08 20 00 41 38 00 c2 03 f0 08 aa 00"; + let expected = "[MII] add r15=r14,r36; nop.i 0x0;;; mov r14=r15"; + let data = "02 78 38 48 00 20 00 00 00 02 00 c0 01 78 00 84"; + let expected = "[MMI] st8 [r16]=r15;;; st1 [r14]=r17,1; nop.i 0x0;;"; + let data = "0b 00 3c 20 98 11 10 88 38 00 2b 00 00 00 04 00"; + let expected = "[MIB] st1 [r14]=r39; nop.i 0x0; br.cloop.sptk.few 400000000019d0b0 ;;"; + let data = "11 00 9c 1c 80 11 00 00 00 02 00 a0 10 01 00 40"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r8=-2,r8; setf.sig f7=r36; addl r14=36704,r1"; + let data = "08 40 f8 11 3f 23 70 20 01 c2 31 c0 01 0e 78 94"; + let expected = "[MMI] nop.m 0x0; add r37=r37,r40; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 50 2a a1 00 40 00 00 00 04 00"; + let expected = "[MMI] addp4 r8=r8,r0; nop.m 0x0; nop.i 0x0"; + let data = "08 40 20 00 08 20 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] st1 [r37]=r0;;; setf.sig f6=r8; shladd r40=r40,3,r14;;"; + let data = "0b 00 00 4a 80 11 60 40 00 c2 31 00 85 72 48 80"; + let expected = "[MMI] ld8 r14=[r40]; st8 [r40]=r35; nop.i 0x0;;"; + let data = "09 70 00 50 18 10 00 18 a1 30 23 00 00 00 04 00"; + let expected = "[MMF] nop.m 0x0; nop.m 0x0; xma.l f6=f6,f7,f7;;"; + let data = "0f 00 00 00 01 00 00 00 00 02 00 c0 70 30 1c e8"; + let expected = "[MMI] getf.sig r36=f6;;; add r36=r35,r36; nop.i 0x0;;"; + let data = "0b 20 19 00 e1 10 40 1a 91 00 40 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; adds r36=8,r36; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 40 42 90 00 42 00 00 00 04 00"; + let expected = "[MMI] st8 [r36]=r14; nop.m 0x0; nop.i 0x0"; + let data = "08 00 38 48 98 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44;;; mov.i ar.lc=r46;;"; + let data = "03 00 00 00 01 00 00 60 01 55 00 00 e0 0a aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0"; + let data = "10 00 00 00 01 00 00 58 05 80 03 80 08 00 84 00"; + let expected = "[MMI] addl r15=1136,r1;;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = "0b 78 c0 03 08 24 f0 00 3c 30 20 00 00 00 04 00"; + let expected = "[MMI] shladd r49=r49,3,r15;;; ld8 r15=[r49]; nop.i 0x0;;"; + let data = "0b 88 c5 1e 12 20 f0 00 c4 30 20 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; add r15=r49,r15; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 88 3d 00 40 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; mov b6=r15; br.few b6;;"; + let data = "11 00 00 00 01 00 60 78 04 80 03 00 60 00 80 00"; + let expected = "[MMI] mov r14=r15;;; add r15=r14,r36; adds r16=8,r14;;"; + let data = "0b 70 00 1e 00 21 f0 70 90 00 40 00 82 70 00 84"; + let expected = "[MMI] mov r14=r15; st8 [r16]=r15; nop.i 0x0;;"; + let data = "09 70 00 1e 00 21 00 78 40 30 23 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; st1 [r14]=r17,1; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 10 88 38 00 2b 00 00 00 04 00"; + let expected = "[MIB] st1 [r14]=r39; nop.i 0x0; br.cloop.sptk.few 400000000019d0b0 "; + let data = "10 00 9c 1c 80 11 00 00 00 02 00 a0 d0 ff ff 48"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019cfc0 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 d0 fe ff 48"; + let expected = "[MMI] addl r14=36704,r1; add r37=r37,r40; mov r36=r35;;"; + let data = "09 70 80 03 1e 25 50 2a a1 00 40 80 04 18 01 84"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; adds r36=8,r36"; + let data = "08 00 00 00 01 00 00 00 00 02 00 80 84 20 01 84"; + let expected = "[MMI] st1 [r37]=r0;;; shladd r40=r40,3,r14; nop.i 0x0;;"; + let data = "0b 00 00 4a 80 11 80 42 39 24 40 00 00 00 04 00"; + let expected = "[MMI] ld8 r14=[r40]; st8 [r40]=r35; nop.i 0x0;;"; + let data = "09 70 00 50 18 10 00 18 a1 30 23 00 00 00 04 00"; + let expected = "[MIB] st8 [r36]=r14; nop.i 0x0; br.few 400000000019d050 ;;"; + let data = "11 00 38 48 98 11 00 00 00 02 00 00 10 ff ff 48"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] alloc r48=ar.pfs,22,19,0; adds r12=-256,r12; mov.i r50=ar.lc"; + let data = "08 80 59 26 80 05 c0 00 30 7c 46 40 06 08 ca 00"; + let expected = "[MMI] addl r35=19708,r1; adds r15=19,r32; mov r49=r1;;"; + let data = "09 18 f1 03 99 24 f0 98 80 00 42 20 06 08 00 84"; + let expected = "[MMI] ld4 r14=[r35]; and r15=-8,r15; mov r47=b0;;"; + let data = "09 70 00 46 10 10 f0 c0 3f 58 44 e0 05 00 c4 00"; + let expected = "[MIB] cmp4.eq p7,p6=0,r14; extr r14=r14,1,31; (p07) br.cond.dpnt.few 400000000019d680 ;;"; + let data = "11 38 00 1c 86 39 e0 18 38 3c a9 03 d0 04 00 43"; + let expected = "[MMI] nop.m 0x0; cmp.lt p7,p6=r14,r15; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 70 70 3c 0c 60 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; (p06) mov r36=1; (p06) br.cond.dptk.few 400000000019d200 "; + let data = "10 00 00 00 01 80 41 0a 00 00 48 03 30 00 00 42"; + let expected = "[MMI] addl r14=19712,r1;;; ld4 r36=[r14]; nop.i 0x0;;"; + let data = "0b 70 00 02 9a 24 40 02 38 20 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=29,r36; (p06) br.cond.dpnt.few 400000000019d270 "; + let data = "10 00 00 00 01 00 60 e8 90 0e 63 03 80 00 00 43"; + let expected = "[MMI] addl r39=1152,r1; nop.m 0x0; sxt4 r37=r36;;"; + let data = "09 38 01 02 09 24 00 00 00 02 00 a0 04 20 59 00"; + let expected = "[MMI] ld8 r39=[r39];;; shladd r14=r37,3,r39; nop.i 0x0;;"; + let data = "0b 38 01 4e 18 10 e0 28 9d 24 40 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; ld8 r14=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 38 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.ltu p7,p6=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019d2e0 ;;"; + let data = "11 38 38 1e 06 34 00 00 00 02 00 03 b0 00 00 43"; + let expected = "[MMI] nop.m 0x0; (p07) sub r14=29,r36; nop.i 0x0;;"; + let data = "09 00 00 00 01 c0 e1 e8 90 4a 40 00 00 00 04 00"; + let expected = "[MII] (p07) addp4 r14=r14,r0; nop.i 0x0;;; (p07) mov.i ar.lc=r14;;"; + let data = "e3 70 38 00 08 20 00 00 00 02 80 03 e0 08 aa 00"; + let expected = "[MIB] nop.m 0x0; adds r36=1,r36; br.cloop.sptk.few 400000000019d2b0 ;;"; + let data = "11 00 00 00 01 00 40 0a 90 00 42 a0 50 00 00 40"; + let expected = "[MMI] mov r36=r0; nop.m 0x0; nop.i 0x0;;"; + let data = "09 20 01 00 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] mov r8=r36; mov.i ar.pfs=r48;;; mov.i ar.lc=r50;;"; + let data = "03 40 00 48 00 21 00 80 01 55 00 00 20 0b aa 00"; + let expected = "[MII] nop.m 0x0; mov b0=r47; nop.i 0x0"; + let data = "00 00 00 00 01 00 00 78 05 80 03 00 00 00 04 00"; + let expected = "[MMB] adds r12=256,r12; nop.m 0x0; br.ret.sptk.many b0"; + let data = "18 60 00 18 02 21 00 00 00 02 00 80 08 00 84 00"; + let expected = "[MII] nop.m 0x0; sxt4 r37=r36;;; shladd r14=r37,3,r39;;"; + let data = "03 00 00 00 01 00 50 02 90 2c 00 c0 51 3a 49 80"; + let expected = "[MMI] nop.m 0x0; ld8 r14=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 38 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.ltu p7,p6=r14,r15; (p07) br.cond.dptk.few 400000000019d260 "; + let data = "10 00 00 00 01 00 70 70 3c 0c e8 03 90 ff ff 4a"; + let expected = "[MMI] addl r38=36672,r1;;; nop.m 0x0; nop.i 0x0;;"; + let data = "0b 30 01 03 1e 25 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] add r14=r38,r37;;; ld1 r14=[r14]; nop.i 0x0;;"; + let data = "0b 70 98 4a 00 20 e0 00 38 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r14; (p06) br.cond.dpnt.few 400000000019d360 ;;"; + let data = "11 00 00 00 01 00 60 00 38 0e 73 03 50 00 00 43"; + let expected = "[MMI] adds r36=1,r36;;; nop.m 0x0; sxt4 r37=r36;;"; + let data = "0b 20 05 48 00 21 00 00 00 02 00 a0 04 20 59 00"; + let expected = "[MMI] add r14=r38,r37;;; ld1 r14=[r14]; nop.i 0x0;;"; + let data = "0b 70 98 4a 00 20 e0 00 38 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r14; (p06) br.cond.dptk.few 400000000019d320 "; + let data = "10 00 00 00 01 00 70 00 38 0c 73 03 d0 ff ff 4a"; + let expected = "[MMI] addl r42=19716,r1; nop.m 0x0; addl r41=36704,r1"; + let data = "08 50 11 02 9a 24 00 00 00 02 00 20 05 0e 78 94"; + let expected = "[MMI] add r15=r38,r37; nop.m 0x0; mov r16=1;;"; + let data = "09 78 98 4a 00 20 00 00 00 02 00 00 12 00 00 90"; + let expected = "[MMI] ld4 r14=[r42]; st1 [r15]=r16; nop.i 0x0"; + let data = "08 70 00 54 10 10 00 80 3c 00 23 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0;;; cmp4.lt p7,p6=r14,r36; shladd r14=r37,3,r41;;"; + let data = "0b 00 00 00 01 00 70 70 90 0c 61 c0 51 4a 49 80"; + let expected = "[MMI] ld8 r40=[r14]; (p07) st4 [r42]=r36; nop.i 0x0;;"; + let data = "09 40 01 1c 18 d0 01 20 a9 20 23 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0,r40; (p07) br.cond.dpnt.few 400000000019d9e0 "; + let data = "10 00 00 00 01 00 70 00 a0 0c f2 03 30 06 00 43"; + let expected = "[MMI] adds r35=8,r40; ld1 r14=[r40]; shladd r41=r37,3,r41"; + let data = "08 18 21 50 00 21 e0 00 a0 00 20 20 55 4a 49 80"; + let expected = "[MMI] add r37=r38,r37;;; ld8 r15=[r35]; sxt1 r14=r14"; + let data = "0a 28 99 4a 00 20 f0 00 8c 30 20 c0 01 70 50 00"; + let expected = "[MMI] nop.m 0x0; st1 [r37]=r0; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 00 00 94 00 23 00 00 00 04 00"; + let expected = "[MIB] st8 [r41]=r15; cmp4.eq p7,p6=84,r14; (p06) br.cond.dptk.few 400000000019d430 "; + let data = "10 00 3c 52 98 11 70 a0 3a 0c 73 03 40 00 00 42"; + let expected = "[MMI] adds r14=1,r40;;; ld1 r14=[r14]; nop.i 0x0;;"; + let data = "0b 70 04 50 00 21 e0 00 38 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r14,r36; (p06) br.cond.dpnt.few 400000000019d480 "; + let data = "10 00 00 00 01 00 60 70 90 0e 71 03 60 00 00 43"; + let expected = "[MMI] addl r52=1080,r1; mov r51=r0; mov r53=5;;"; + let data = "09 a0 e1 02 08 24 30 03 00 00 42 a0 56 00 00 90"; + let expected = "[MIB] ld8 r52=[r52]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 a0 01 68 18 10 00 00 00 02 00 00 88 8f e8 58"; + let expected = "[MMI] mov r51=r8; mov r1=r49; nop.i 0x0"; + let data = "08 98 01 10 00 21 10 00 c4 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r52=r33; mov r53=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 a0 01 42 00 21 50 03 88 00 42 00 e8 f0 ff 58"; + let expected = "[MMI] mov r1=r49; nop.m 0x0; nop.i 0x0"; + let data = "08 08 00 62 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r16=8,r32; mov r15=r40; extr r18=r32,8,8"; + let data = "08 80 20 40 00 21 f0 00 a0 00 42 40 12 01 1d 52"; + let expected = "[MMI] adds r14=4,r40; cmp.eq p7,p6=0,r32; mov r36=r35;;"; + let data = "09 70 10 50 00 21 70 00 80 0c 72 80 04 18 01 84"; + let expected = "[MMB] add r40=r40,r16; mov r16=-9; nop.b 0x0"; + let data = "18 40 a1 20 00 20 00 b9 f3 ff 4f 00 00 00 00 20"; + let expected = "[MMI] st4 [r14]=r32; nop.m 0x0; extr r17=r32,16,8;;"; + let data = "09 00 80 1c 90 11 00 00 00 02 00 20 12 02 1d 52"; + let expected = "[MMI] st1 [r15]=r16,2; mov r14=r40; mov r16=21845;;"; + let data = "09 10 40 1e 80 15 e0 00 a0 00 42 00 52 05 a8 92"; + let expected = "[MMB] st2 [r15]=r16; adds r16=2,r40; nop.b 0x0"; + let data = "18 00 40 1e 88 11 00 11 a0 00 42 00 00 00 00 20"; + let expected = "[MMI] st1 [r14]=r32,1; adds r40=3,r40; extr r15=r32,24,8;;"; + let data = "09 08 80 1c 80 15 80 1a a0 00 42 e0 11 03 1d 52"; + let expected = "[MMI] st1 [r14]=r18; st1 [r16]=r17; nop.i 0x0;;"; + let data = "09 00 48 1c 80 11 00 88 40 00 23 00 00 00 04 00"; + let expected = "[MIB] st1 [r40]=r15; nop.i 0x0; (p07) br.cond.dptk.few 400000000019d280 "; + let data = "10 00 3c 50 80 11 00 00 00 02 80 03 80 fd ff 4a"; + let expected = "[MIB] nop.m 0x0; cmp.ltu p6,p7=32,r32; (p06) br.cond.dptk.few 400000000019d7c0 ;;"; + let data = "11 00 00 00 01 00 60 00 81 0e 6a 03 b0 02 00 42"; + let expected = "[MMI] cmp.ltu p7,p6=7,r32;;; (p07) adds r14=-1,r32; (p07) and r32=7,r32;;"; + let data = "0b 38 1c 40 06 f5 e1 f8 83 7e c6 03 74 00 b1 80"; + let expected = "[MII] nop.m 0x0; (p07) shr.u r14=r14,3; nop.i 0x0;;"; + let data = "01 00 00 00 01 c0 e1 30 38 78 29 00 00 00 04 00"; + let expected = "[MMI] (p06) mov r14=r0; nop.m 0x0; cmp.ltu p6,p7=7,r32;;"; + let data = "c9 70 00 00 00 21 00 00 00 02 00 c0 70 00 1d d4"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dptk.few 400000000019d810 "; + let data = "10 00 00 00 01 00 00 00 00 02 80 03 c0 02 00 42"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; mov r15=-33; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 f2 ff 4f 00 00 00 04 00"; + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = "08 08 3c 46 80 15 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] cmp.eq p6,p7=0,r14; nop.m 0x0; mov r15=-33;;"; + let data = "09 30 00 1c 07 39 00 00 00 02 00 e0 f1 e5 ff 9f"; + let expected = "[MMI] nop.m 0x0; st1 [r35]=r15; (p07) adds r35=1,r35"; + let data = "08 00 00 00 01 00 00 78 8c 00 a3 63 14 18 01 84"; + let expected = "[MMB] mov r15=-33; (p07) adds r14=-1,r14; (p06) br.cond.dpnt.few 400000000019d280 ;;"; + let data = "19 78 7c f9 ff e7 e1 f8 3b 7e 46 03 20 fc ff 4b"; + let expected = "[MIB] st1 [r35]=r15,1; nop.i 0x0; br.few 400000000019d580 "; + let data = "10 08 3c 46 80 15 00 00 00 02 00 00 10 ff ff 48"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=4000000000026d00 <_init@@Base+0x1be0>;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 88 96 e8 58"; + let expected = "[MMI] st4 [r35]=r8; nop.m 0x0; mov r14=1023"; + let data = "08 00 20 46 90 11 00 00 00 02 00 c0 f1 07 1c 90"; + let expected = "[MII] mov r1=r49; mov r51=r0;;; cmp4.lt p6,p7=r14,r8;;"; + let data = "03 08 00 62 00 21 30 03 00 00 42 c0 e0 40 1c c2"; + let expected = "[MMI] nop.m 0x0; (p07) mov r14=1024; nop.i 0x0;;"; + let data = "09 00 00 00 01 c0 e1 00 00 10 48 00 00 00 04 00"; + let expected = "[MIB] (p07) st4 [r35]=r14; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = "f1 00 38 46 90 11 00 00 00 02 00 00 88 9c e8 58"; + let expected = "[MMI] ld4 r14=[r35]; nop.m 0x0; mov r1=r49;;"; + let data = "09 70 00 46 10 10 00 00 00 02 00 20 00 88 01 84"; + let expected = "[MII] adds r16=-1,r14; sxt4 r15=r14;;; sxt4 r16=r16;;"; + let data = "03 80 fc 1d 3f 23 f0 00 38 2c 00 00 02 80 58 00"; + let expected = "[MMI] and r16=r16,r8;;; sub r36=r15,r16; nop.i 0x0;;"; + let data = "0b 80 40 10 0c 20 40 7a 40 0a 40 00 00 00 04 00"; + let expected = "[MMI] cmp.lt p7,p6=r36,r0;;; (p07) add r36=r36,r15; nop.i 0x0;;"; + let data = "0b 38 90 00 06 f0 41 22 3d 00 40 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0,r36; (p07) br.cond.dpnt.few 400000000019d850 "; + let data = "10 00 00 00 01 00 60 00 90 0e f2 03 40 01 00 43"; + let expected = "[MMI] addl r16=15832,r1; mov r17=7; mov.i ar.lc=22"; + let data = "08 80 60 03 7b 24 10 39 00 00 48 00 60 09 2a 00"; + let expected = "[MMI] nop.m 0x0;;; ld8 r16=[r16]; nop.i 0x0;;"; + let data = "0b 00 00 00 01 00 00 01 40 30 20 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; ld8 r18=[r16],8; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 20 41 40 30 28 00 00 00 04 00"; + let expected = "[MIB] cmp.ltu p7,p6=r18,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019d770 ;;"; + let data = "11 38 48 1e 06 34 00 00 00 02 00 03 20 00 00 43"; + let expected = "[MIB] nop.m 0x0; adds r17=1,r17; br.cloop.sptk.few 400000000019d740 "; + let data = "10 00 00 00 01 00 10 09 44 00 42 a0 e0 ff ff 48"; + let expected = "[MMI] addl r15=19712,r1; nop.m 0x0; extr r14=r14,1,31;;"; + let data = "09 78 00 02 9a 24 00 00 00 02 00 c0 31 70 78 52"; + let expected = "[MII] st4 [r15]=r17; adds r15=19,r32;;; and r15=-8,r15;;"; + let data = "03 00 44 1e 90 11 f0 98 80 00 42 e0 81 7f b0 88"; + let expected = "[MMI] nop.m 0x0; cmp.lt p7,p6=r14,r15; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 70 70 3c 0c 60 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; (p06) mov r36=1; (p06) br.cond.dptk.few 400000000019d200 "; + let data = "10 00 00 00 01 80 41 0a 00 00 48 03 60 fa ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019d1e0 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 30 fa ff 48"; + let expected = "[MMI] mov r52=223; nop.m 0x0; mov r53=r32"; + let data = "08 a0 7d 01 01 24 00 00 00 02 00 a0 06 00 01 84"; + let expected = "[MMB] mov r51=r35; nop.m 0x0; br.call.sptk.many b0=4000000000026e60 <_init@@Base+0x1d40>;;"; + let data = "19 98 01 46 00 21 00 00 00 02 00 00 98 96 e8 58"; + let expected = "[MMI] mov r8=r36; mov r1=r49; mov.i ar.pfs=r48;;"; + let data = "09 40 00 48 00 21 10 00 c4 00 42 00 00 03 aa 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r50;;; mov b0=r47"; + let data = "02 00 00 00 01 00 00 90 05 55 00 00 f0 0a 00 07"; + let expected = "[MMB] nop.m 0x0; adds r12=256,r12; br.ret.sptk.many b0"; + let data = "18 00 00 00 01 00 c0 00 30 04 42 80 08 00 84 00"; + let expected = "[MMI] addl r15=1144,r1;;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = "0b 78 e0 03 08 24 f0 00 3c 30 20 00 00 00 04 00"; + let expected = "[MMI] shladd r32=r32,3,r15;;; ld8 r15=[r32]; nop.i 0x0;;"; + let data = "0b 00 81 1e 12 20 f0 00 80 30 20 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; add r15=r32,r15; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 00 3d 00 40 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; mov b6=r15; br.few b6;;"; + let data = "11 00 00 00 01 00 60 78 04 80 03 00 60 00 80 00"; + let expected = "[MIB] mov r51=r36; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = "11 98 01 48 00 21 00 00 00 02 00 00 f8 9a e8 58"; + let expected = "[MMI] cmp.eq p6,p7=-1,r8; mov r1=r49; shr r14=r36,5"; + let data = "08 30 fc 11 07 3b 10 00 c4 00 42 c0 b1 20 e9 52"; + let expected = "[MMB] and r18=31,r36; mov r21=84; (p06) br.cond.dpnt.few 400000000019d270 ;;"; + let data = "19 90 7c 48 2c 20 50 a1 02 00 48 03 00 fa ff 4b"; + let expected = "[MMI] cmp4.lt p6,p7=0,r14; addl r16=36704,r1; nop.i 0x0"; + let data = "08 30 00 1c 87 31 00 01 07 3c 4a 00 00 00 04 00"; + let expected = "[MMI] mov r22=r14; add r18=r8,r18; mov r20=2;;"; + let data = "09 b0 00 1c 00 21 20 41 48 00 40 80 22 00 00 90"; + let expected = "[MMI] nop.m 0x0; (p07) ld4 r14=[r35]; adds r19=32,r18"; + let data = "08 00 00 00 01 c0 e1 00 8c 20 20 60 02 92 00 84"; + let expected = "[MMI] nop.m 0x0;;; nop.m 0x0; (p07) sxt4 r15=r14"; + let data = "0a 00 00 00 01 00 00 00 00 02 80 e3 01 70 58 00"; + let expected = "[MMB] adds r16=16,r16; nop.m 0x0; (p07) br.cond.dpnt.few 400000000019d720 ;;"; + let data = "19 80 40 20 00 21 00 00 00 02 80 03 60 fe ff 4b"; + let expected = "[MMI] mov r15=r18; st8 [r16]=r18; mov r16=84"; + let data = "08 78 00 24 00 21 00 90 40 30 23 00 42 05 00 90"; + let expected = "[MMI] cmp4.eq p6,p7=1,r22;;; st1 [r15]=r16,1; mov r16=2;;"; + let data = "0b 30 04 2c 87 39 10 80 3c 00 2b 00 22 00 00 90"; + let expected = "[MIB] st1 [r15]=r16; mov r16=r18; (p06) br.cond.dpnt.few 400000000019d9a0 ;;"; + let data = "11 00 40 1e 80 11 00 01 48 00 42 03 b0 00 00 43"; + let expected = "[MMI] nop.m 0x0; adds r14=-2,r14; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 f0 3b 7e 46 00 00 00 04 00"; + let expected = "[MII] addp4 r15=r14,r0; mov r14=r19;;; mov.i ar.lc=r15;;"; + let data = "03 78 38 00 08 20 e0 00 4c 00 42 00 f0 08 aa 00"; + let expected = "[MMI] sub r17=r14,r19; nop.m 0x0; mov r15=r14"; + let data = "08 88 38 26 05 20 00 00 00 02 00 e0 01 70 00 84"; + let expected = "[MII] adds r16=32,r16; adds r14=32,r14;;; add r17=r18,r17;;"; + let data = "03 80 80 20 00 21 e0 00 39 00 42 20 22 89 00 80"; + let expected = "[MMI] nop.m 0x0; adds r17=8,r17; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 10 41 44 00 42 00 00 00 04 00"; + let expected = "[MMI] st8 [r17]=r16; st1 [r15]=r21,1; nop.i 0x0;;"; + let data = "09 00 40 22 98 11 10 a8 3c 00 2b 00 00 00 04 00"; + let expected = "[MIB] st1 [r15]=r20; nop.i 0x0; br.cloop.sptk.few 400000000019d920 "; + let data = "10 00 50 1e 80 11 00 00 00 02 00 a0 c0 ff ff 48"; + let expected = "[MMI] adds r14=-2,r22;;; addp4 r14=r14,r0; nop.i 0x0;;"; + let data = "0b 70 f8 2d 3f 23 e0 70 00 10 40 00 00 00 04 00"; + let expected = "[MII] adds r14=1,r14; nop.i 0x0;;; shl r14=r14,5;;"; + let data = "03 70 04 1c 00 21 00 00 00 02 00 c0 e1 d0 e9 53"; + let expected = "[MMI] add r18=r18,r14; nop.m 0x0; nop.i 0x0;;"; + let data = "09 90 48 1c 00 20 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMB] adds r18=8,r18; ld4 r14=[r35]; nop.b 0x0"; + let data = "18 90 20 24 00 21 e0 00 8c 20 20 00 00 00 00 20"; + let expected = "[MMI] addl r16=15832,r1; mov r17=7; mov.i ar.lc=22;;"; + let data = "09 80 60 03 7b 24 10 39 00 00 48 00 60 09 2a 00"; + let expected = "[MMI] nop.m 0x0; st8 [r18]=r0; sxt4 r15=r14"; + let data = "08 00 00 00 01 00 00 00 48 30 23 e0 01 70 58 00"; + let expected = "[MMB] nop.m 0x0; ld8 r16=[r16]; br.few 400000000019d740 "; + let data = "18 00 00 00 01 00 00 01 40 30 20 00 70 fd ff 48"; + let expected = "[MMI] addl r14=17068,r1;;; nop.m 0x0; nop.i 0x0;;"; + let data = "0b 70 b0 02 85 24 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; ld4 r14=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 00 38 20 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r14; (p06) br.cond.dptk.few 400000000019da60 "; + let data = "10 00 00 00 01 00 70 00 38 0c 73 03 60 00 00 42"; + let expected = "[MIB] mov r51=2; nop.i 0x0; br.call.sptk.many b0=40000000000bf7c0 ;;"; + let data = "11 98 09 00 00 24 00 00 00 02 00 00 b8 1d f2 58"; + let expected = "[MIB] cmp4.eq p7,p6=0,r8; mov r1=r49; (p06) br.cond.dptk.few 400000000019da60 "; + let data = "10 38 00 10 86 39 10 00 c4 00 42 03 40 00 00 42"; + let expected = "[MIB] mov r51=17; nop.i 0x0; br.call.sptk.many b0=40000000000bf7c0 ;;"; + let data = "11 98 45 00 00 24 00 00 00 02 00 00 98 1d f2 58"; + let expected = "[MMI] cmp4.eq p6,p7=0,r8; nop.m 0x0; mov r1=r49;;"; + let data = "09 30 00 10 87 39 00 00 00 02 00 20 00 88 01 84"; + let expected = "[MIB] nop.m 0x0; (p06) mov r44=r0; (p06) br.cond.dptk.few 400000000019dab0 ;;"; + let data = "11 00 00 00 01 80 c1 02 00 00 42 03 60 00 00 42"; + let expected = "[MIB] adds r51=144,r12; mov r44=1; br.call.sptk.many b0=4000000000026d40 <_init@@Base+0x1c20>;;"; + let data = "11 98 41 18 01 21 c0 0a 00 00 48 00 e8 92 e8 58"; + let expected = "[MIB] mov r1=r49; adds r51=16,r12; br.call.sptk.many b0=40000000000270a0 <_init@@Base+0x1f80>;;"; + let data = "11 08 00 62 00 21 30 83 30 00 42 00 38 96 e8 58"; + let expected = "[MMI] mov r1=r49; mov r51=r0; nop.i 0x0"; + let data = "08 08 00 62 00 21 30 03 00 00 42 00 00 00 04 00"; + let expected = "[MMB] adds r52=144,r12; adds r53=16,r12; br.call.sptk.many b0=4000000000026100 <_init@@Base+0xfe0>;;"; + let data = "19 a0 41 18 01 21 50 83 30 00 42 00 78 86 e8 58"; + let expected = "[MMI] mov r1=r49; nop.m 0x0; nop.i 0x0"; + let data = "08 08 00 62 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] shladd r14=r37,3,r0;;; add r15=r39,r14; nop.i 0x0;;"; + let data = "0b 70 94 00 12 20 f0 38 39 00 40 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; ld8 r40=[r15]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 02 3c 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.lt p6,p7=r40,r0; mov r43=r40; (p06) br.cond.dpnt.few 400000000019df20 ;;"; + let data = "11 30 a0 00 07 30 b0 02 a0 00 42 03 50 04 00 43"; + let expected = "[MIB] cmp4.lt p7,p6=1,r36; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e040 ;;"; + let data = "11 38 04 48 86 31 00 00 00 02 00 03 60 05 00 43"; + let expected = "[MII] ld4 r15=[r42]; cmp4.lt p7,p6=10,r36;;; cmp4.lt p8,p9=13,r15;;"; + let data = "03 78 00 54 10 10 70 50 90 0c 63 00 d1 78 24 c6"; + let expected = "[MMI] nop.m 0x0; (p09) mov r15=14; nop.i 0x0;;"; + let data = "09 00 00 00 01 40 f2 70 00 00 48 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dptk.few 400000000019e190 "; + let data = "10 00 00 00 01 00 00 00 00 02 80 03 80 06 00 42"; + let expected = "[MMI] nop.m 0x0; adds r14=1,r36; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 08 90 00 42 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=r15,r14; (p06) br.cond.dpnt.few 400000000019dba0 "; + let data = "10 00 00 00 01 00 60 78 38 0e 61 03 70 00 00 43"; + let expected = "[MII] nop.m 0x0; sxt4 r16=r14;;; add r17=r38,r16;;"; + let data = "03 00 00 00 01 00 00 01 38 2c 00 20 62 82 00 80"; + let expected = "[MMI] ld1 r17=[r17];;; nop.m 0x0; sxt1 r17=r17;;"; + let data = "0b 88 00 22 00 10 00 00 00 02 00 20 02 88 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r17; (p06) br.cond.dptk.few 400000000019e150 "; + let data = "10 00 00 00 01 00 70 00 44 0c 73 03 f0 05 00 42"; + let expected = "[MMI] shladd r16=r16,3,r41;;; ld8 r16=[r16]; nop.i 0x0;;"; + let data = "0b 80 40 52 12 20 00 01 40 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0,r16; (p07) br.cond.dpnt.few 400000000019e150 ;;"; + let data = "11 00 00 00 01 00 70 00 40 0c f2 03 d0 05 00 43"; + let expected = "[MMI] cmp4.lt p6,p7=r15,r14; nop.m 0x0; nop.i 0x0"; + let data = "08 30 3c 1c 87 30 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] cmp4.lt p8,p9=r36,r14; mov r52=r40;;; (p06) cmp4.eq.or.andcm p9,p8=0,r0;;"; + let data = "03 40 90 1c 89 30 40 03 a0 00 42 23 01 00 20 e7"; + let expected = "[MMI] nop.m 0x0; (p09) shladd r14=r37,3,r41; nop.i 0x0;;"; + let data = "09 00 00 00 01 40 e2 28 a5 24 40 00 00 00 04 00"; + let expected = "[MIB] (p09) ld8 r42=[r14]; nop.i 0x0; (p09) br.cond.dpnt.few 400000000019dd30 ;;"; + let data = "31 51 01 1c 18 10 00 00 00 02 80 04 70 01 00 43"; + let expected = "[MII] nop.m 0x0; sxt4 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 2c 00 00 00 00 04 00"; + let expected = "[MII] shladd r15=r14,3,r0; add r16=r38,r14;;; add r14=r41,r15"; + let data = "02 78 38 00 12 20 00 31 39 00 40 c0 91 7a 00 80"; + let expected = "[MMI] add r15=r39,r15; st1 [r16]=r0; nop.i 0x0;;"; + let data = "09 78 9c 1e 00 20 00 00 40 00 23 00 00 00 04 00"; + let expected = "[MMI] ld8 r42=[r14]; ld8 r51=[r15]; nop.i 0x0;;"; + let data = "09 50 01 1c 18 10 30 03 3c 30 20 00 00 00 04 00"; + let expected = "[MMI] adds r15=8,r42;;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = "0b 78 20 54 00 21 f0 00 3c 30 20 00 00 00 04 00"; + let expected = "[MIB] st8 [r14]=r15; nop.i 0x0; br.call.sptk.many b0=400000000019f2a0 ;;"; + let data = "11 00 3c 1c 98 11 00 00 00 02 00 00 88 16 00 50"; + let expected = "[MMI] mov r14=r42; mov r15=84; sxt1 r17=r36"; + let data = "08 70 00 54 00 21 f0 a0 02 00 48 20 02 20 51 00"; + let expected = "[MMI] shladd r16=r37,3,r41; nop.m 0x0; mov r1=r49;;"; + let data = "09 80 94 52 12 20 00 00 00 02 00 20 00 88 01 84"; + let expected = "[MMI] nop.m 0x0; st1 [r14]=r15,1; adds r15=-1,r8"; + let data = "08 00 00 00 01 00 10 78 38 00 2b e0 f1 47 fc 8c"; + let expected = "[MMI] st8 [r16]=r42;;; nop.m 0x0; cmp4.lt p7,p6=0,r15"; + let data = "0a 00 a8 20 98 11 00 00 00 02 00 e0 00 78 18 c6"; + let expected = "[MMB] nop.m 0x0; st1 [r14]=r17; (p06) br.cond.dpnt.few 400000000019e3e0 ;;"; + let data = "19 00 00 00 01 00 00 88 38 00 23 03 70 07 00 43"; + let expected = "[MMI] (p07) adds r15=-1,r15; (p07) mov r14=r42; (p07) mov r18=84;;"; + let data = "e9 78 fc 1f 3f e3 e1 00 a8 00 c2 43 42 05 00 90"; + let expected = "[MII] (p07) addp4 r15=r15,r0; nop.i 0x0;;; (p07) mov.i ar.lc=r15"; + let data = "e2 78 3c 00 08 20 00 00 00 02 80 03 f0 08 aa 00"; + let expected = "[MII] add r15=r14,r40; adds r16=8,r14;;; mov r14=r15"; + let data = "02 78 38 50 00 20 00 41 38 00 42 c0 01 78 00 84"; + let expected = "[MMI] st8 [r16]=r15;;; st1 [r14]=r18,1; nop.i 0x0;;"; + let data = "0b 00 3c 20 98 11 10 90 38 00 2b 00 00 00 04 00"; + let expected = "[MIB] st1 [r14]=r17; nop.i 0x0; br.cloop.sptk.few 400000000019e180 "; + let data = "10 00 44 1c 80 11 00 00 00 02 00 a0 c0 04 00 40"; + let expected = "[MMI] adds r14=-2,r8; setf.sig f7=r40; nop.i 0x0;;"; + let data = "09 70 f8 11 3f 23 70 40 01 c2 31 00 00 00 04 00"; + let expected = "[MMI] addp4 r14=r14,r0;;; setf.sig f6=r14; nop.i 0x0;;"; + let data = "0b 70 38 00 08 20 60 70 00 c2 31 00 00 00 04 00"; + let expected = "[MMF] nop.m 0x0; nop.m 0x0; xma.l f6=f6,f7,f7;;"; + let data = "0f 00 00 00 01 00 00 00 00 02 00 c0 70 30 1c e8"; + let expected = "[MMI] getf.sig r14=f6;;; add r14=r42,r14; nop.i 0x0;;"; + let data = "0b 70 18 00 e1 10 e0 50 39 00 40 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; adds r14=8,r14; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 40 38 00 42 00 00 00 04 00"; + let expected = "[MMI] st8 [r14]=r0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 1c 98 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0,r42; (p06) br.cond.dptk.few 400000000019df20 "; + let data = "10 00 00 00 01 00 70 00 a8 0c 72 03 f0 01 00 42"; + let expected = "[MMI] addl r14=19712,r1;;; ld4 r14=[r14]; nop.i 0x0;;"; + let data = "0b 70 00 02 9a 24 e0 00 38 20 20 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; adds r14=-1,r14; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 f8 3b 7e 46 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=r36,r14; (p07) br.cond.dptk.few 400000000019e040 "; + let data = "10 00 00 00 01 00 60 20 39 0e e1 03 e0 02 00 42"; + let expected = "[MMI] adds r45=-1,r36;;; nop.m 0x0; sxt4 r45=r45;;"; + let data = "0b 68 fd 49 3f 23 00 00 00 02 00 a0 05 68 59 00"; + let expected = "[MMI] add r15=r38,r45;;; ld1 r14=[r15]; nop.i 0x0;;"; + let data = "0b 78 98 5a 00 20 e0 00 3c 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 00 38 28 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r14; (p06) br.cond.dptk.few 400000000019e040 "; + let data = "10 00 00 00 01 00 70 00 38 0c 73 03 a0 02 00 42"; + let expected = "[MMI] shladd r16=r45,3,r0;;; add r14=r41,r16; add r16=r39,r16;;"; + let data = "0b 80 b4 00 12 20 e0 48 41 00 40 00 72 82 00 80"; + let expected = "[MII] ld8 r14=[r14]; nop.i 0x0;;; adds r17=8,r14"; + let data = "02 70 00 1c 18 10 00 00 00 02 00 20 82 70 00 84"; + let expected = "[MMB] cmp.eq p6,p7=0,r14; mov r46=r14; (p06) br.cond.dpnt.few 400000000019e040 ;;"; + let data = "19 30 00 1c 07 39 e0 02 38 00 42 03 70 02 00 43"; + let expected = "[MMI] ld8 r42=[r17]; nop.m 0x0; mov r17=1;;"; + let data = "09 50 01 22 18 10 00 00 00 02 00 20 12 00 00 90"; + let expected = "[MMI] st1 [r15]=r17; ld8 r15=[r16]; cmp.eq p6,p7=0,r42"; + let data = "08 00 44 1e 80 11 f0 00 40 30 20 c0 00 50 1d e4"; + let expected = "[MMB] nop.m 0x0; nop.m 0x0; (p06) br.cond.dpnt.few 400000000019e020 ;;"; + let data = "19 00 00 00 01 00 00 00 00 02 00 03 20 02 00 43"; + let expected = "[MMI] nop.m 0x0; add r16=r14,r15; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 00 71 3c 00 40 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=r16,r42; (p06) br.cond.dpnt.few 400000000019e400 "; + let data = "10 00 00 00 01 00 60 80 a8 0e 70 03 e0 05 00 43"; + let expected = "[MMI] mov r39=r42; nop.m 0x0; adds r42=8,r42;;"; + let data = "09 38 01 54 00 21 00 00 00 02 00 40 85 50 01 84"; + let expected = "[MMI] ld8 r42=[r42]; nop.m 0x0; add r16=r39,r15;;"; + let data = "09 50 01 54 18 10 00 00 00 02 00 00 72 7a 00 80"; + let expected = "[MIB] cmp.eq p6,p7=0,r42; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e020 ;;"; + let data = "11 30 00 54 07 39 00 00 00 02 00 03 d0 01 00 43"; + let expected = "[MIB] cmp.eq p7,p6=r16,r42; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019e290 ;;"; + let data = "11 38 40 54 06 38 00 00 00 02 80 03 30 04 00 43"; + let expected = "[MIB] nop.m 0x0; mov r46=r39; br.few 400000000019de30 "; + let data = "10 00 00 00 01 00 e0 02 9c 00 42 00 c0 ff ff 48"; + let expected = "[MMI] mov r14=r15; nop.m 0x0; nop.i 0x0;;"; + let data = "09 70 00 1e 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] add r15=r14,r40; adds r16=8,r14;;; mov r14=r15"; + let data = "02 78 38 50 00 20 00 41 38 00 42 c0 01 78 00 84"; + let expected = "[MMI] st8 [r16]=r15;;; st1 [r14]=r18,1; nop.i 0x0;;"; + let data = "0b 00 3c 20 98 11 10 90 38 00 2b 00 00 00 04 00"; + let expected = "[MIB] st1 [r14]=r17; nop.i 0x0; br.cloop.sptk.few 400000000019de80 "; + let data = "10 00 44 1c 80 11 00 00 00 02 00 a0 d0 ff ff 48"; + let expected = "[MMI] adds r14=-2,r35; setf.sig f6=r40; nop.i 0x0;;"; + let data = "09 70 f8 47 3f 23 60 40 01 c2 31 00 00 00 04 00"; + let expected = "[MMI] addp4 r14=r14,r0;;; setf.sig f8=r14; nop.i 0x0;;"; + let data = "0b 70 38 00 08 20 80 70 00 c2 31 00 00 00 04 00"; + let expected = "[MMF] nop.m 0x0; nop.m 0x0; xma.l f8=f8,f6,f6;;"; + let data = "0f 00 00 00 01 00 00 00 00 02 00 00 61 40 18 e8"; + let expected = "[MMI] getf.sig r40=f8;;; add r8=r8,r40; nop.i 0x0;;"; + let data = "0b 40 21 00 e1 10 80 40 a0 00 40 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; adds r8=8,r8; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 40 20 00 42 00 00 00 04 00"; + let expected = "[MMI] st8 [r8]=r0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 10 98 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r44; (p07) br.cond.dpnt.few 400000000019dfa0 "; + let data = "10 00 00 00 01 00 60 00 b0 0e f3 03 80 00 00 43"; + let expected = "[MMI] shladd r14=r37,3,r41;;; ld8 r40=[r14]; nop.i 0x0;;"; + let data = "0b 70 94 52 12 20 80 02 38 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.eq p7,p6=0,r40; nop.i 0x0; (p06) br.cond.dptk.few 400000000019d3c0 ;;"; + let data = "11 38 00 50 06 39 00 00 00 02 00 03 80 f4 ff 4a"; + let expected = "[MMI] (p07) add r37=r38,r37; nop.m 0x0; (p07) mov r36=r0;;"; + let data = "e9 28 99 4a 00 20 00 00 00 02 80 83 04 00 00 84"; + let expected = "[MMI] (p07) st1 [r37]=r0; nop.m 0x0; nop.i 0x0"; + let data = "e8 00 00 4a 80 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MII] mov r8=r36; mov.i ar.pfs=r48;;; mov.i ar.lc=r50;;"; + let data = "03 40 00 48 00 21 00 80 01 55 00 00 20 0b aa 00"; + let expected = "[MII] nop.m 0x0; mov b0=r47; nop.i 0x0"; + let data = "00 00 00 00 01 00 00 78 05 80 03 00 00 00 04 00"; + let expected = "[MMB] adds r12=256,r12; nop.m 0x0; br.ret.sptk.many b0;;"; + let data = "19 60 00 18 02 21 00 00 00 02 00 80 08 00 84 00"; + let expected = "[MMI] mov r51=2; nop.m 0x0; adds r52=16,r12"; + let data = "08 98 09 00 00 24 00 00 00 02 00 80 06 61 00 84"; + let expected = "[MMB] mov r53=r0; nop.m 0x0; br.call.sptk.many b0=4000000000026100 <_init@@Base+0xfe0>;;"; + let data = "19 a8 01 00 00 21 00 00 00 02 00 00 58 81 e8 58"; + let expected = "[MMI] shladd r14=r37,3,r41; nop.m 0x0; mov r1=r49;;"; + let data = "09 70 94 52 12 20 00 00 00 02 00 20 00 88 01 84"; + let expected = "[MMI] nop.m 0x0; ld8 r40=[r14]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 02 38 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.eq p7,p6=0,r40; nop.i 0x0; (p06) br.cond.dptk.few 400000000019d3c0 ;;"; + let data = "11 38 00 50 06 39 00 00 00 02 00 03 e0 f3 ff 4a"; + let expected = "[MMI] (p07) add r37=r38,r37; nop.m 0x0; (p07) mov r36=r0;;"; + let data = "e9 28 99 4a 00 20 00 00 00 02 80 83 04 00 00 84"; + let expected = "[MMI] (p07) st1 [r37]=r0; nop.m 0x0; nop.i 0x0"; + let data = "e8 00 00 4a 80 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019df70 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 60 ff ff 48"; + let expected = "[MMI] nop.m 0x0; add r45=r38,r45; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 d0 32 b5 00 40 00 00 00 04 00"; + let expected = "[MMI] st1 [r45]=r0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 5a 80 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] ld4 r15=[r35];;; nop.m 0x0; sxt4 r14=r15;;"; + let data = "0b 78 00 46 10 10 00 00 00 02 00 c0 01 78 58 00"; + let expected = "[MIB] nop.m 0x0; cmp.lt p6,p7=r14,r40; (p06) br.cond.dptk.few 400000000019e250 "; + let data = "10 00 00 00 01 00 60 70 a0 0e 60 03 00 02 00 42"; + let expected = "[MMI] mov r51=r14; nop.m 0x0; mov r52=r40"; + let data = "08 98 01 1c 00 21 00 00 00 02 00 80 06 40 01 84"; + let expected = "[MMB] mov r43=r14; nop.m 0x0; br.call.sptk.many b0=400000000019f0b0 ;;"; + let data = "19 58 01 1c 00 21 00 00 00 02 00 00 48 10 00 50"; + let expected = "[MMI] nop.m 0x0; mov r35=r8; mov r1=r49"; + let data = "08 00 00 00 01 00 30 02 20 00 42 20 00 88 01 84"; + let expected = "[MIB] mov r51=r43; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = "11 98 01 56 00 21 00 00 00 02 00 00 b8 92 e8 58"; + let expected = "[MMI] cmp.eq p6,p7=-1,r8; and r14=7,r8; mov r1=r49"; + let data = "08 30 fc 11 07 3b e0 38 20 58 40 20 00 88 01 84"; + let expected = "[MIB] mov r18=84; sxt1 r17=r36; (p06) br.cond.dpnt.few 400000000019df20 ;;"; + let data = "11 90 50 01 00 24 10 01 90 28 00 03 70 fe ff 4b"; + let expected = "[MMI] cmp.eq p6,p7=0,r14; nop.m 0x0; shladd r16=r37,3,r41;;"; + let data = "09 30 00 1c 07 39 00 00 00 02 00 00 52 4a 49 80"; + let expected = "[MMI] (p07) adds r35=-1,r35; nop.m 0x0; (p07) adds r8=7,r8;;"; + let data = "e9 18 fd 47 3f 23 00 00 00 02 80 03 71 40 00 84"; + let expected = "[MII] adds r15=-1,r35; (p07) and r8=-8,r8;;; cmp4.lt p7,p6=0,r15"; + let data = "02 78 fc 47 3f e3 81 c0 23 58 44 e0 00 78 18 c6"; + let expected = "[MMI] mov r14=r8; st8 [r16]=r8; nop.i 0x0;;"; + let data = "09 70 00 10 00 21 00 40 40 30 23 00 00 00 04 00"; + let expected = "[MMI] (p07) adds r15=-1,r15; st1 [r14]=r18,1; nop.i 0x0;;"; + let data = "e9 78 fc 1f 3f 23 10 90 38 00 2b 00 00 00 04 00"; + let expected = "[MMI] (p07) addp4 r15=r15,r0; st1 [r14]=r17; (p07) mov r14=r8;;"; + let data = "e9 78 3c 00 08 20 00 88 38 00 a3 c3 01 40 00 84"; + let expected = "[MIB] nop.m 0x0; (p07) mov.i ar.lc=r15; (p07) br.cond.dptk.few 400000000019de90 "; + let data = "10 00 00 00 01 c0 01 78 04 55 80 03 70 fd ff 4a"; + let expected = "[MMI] nop.m 0x0; adds r8=8,r8; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 80 40 20 00 42 00 00 00 04 00"; + let expected = "[MIB] st8 [r8]=r0; nop.i 0x0; br.few 400000000019df20 "; + let data = "10 00 00 10 98 11 00 00 00 02 00 00 e0 fd ff 48"; + let expected = "[MMI] nop.m 0x0; adds r14=1,r14; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 08 38 00 42 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p7,p6=r15,r14; (p06) br.cond.dptk.few 400000000019db40 ;;"; + let data = "11 00 00 00 01 00 70 78 38 0c 61 03 e0 f9 ff 4a"; + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=r0,r0; br.few 400000000019dba0 "; + let data = "10 00 00 00 01 00 60 00 00 0e 70 00 30 fa ff 48"; + let expected = "[MIB] nop.m 0x0; mov r14=r15; br.few 400000000019dca0 ;;"; + let data = "11 00 00 00 01 00 e0 00 3c 00 42 00 20 fb ff 48"; + let expected = "[MMI] cmp4.lt p6,p7=r36,r15; nop.m 0x0; sub r16=r36,r15;;"; + let data = "09 30 90 1e 87 30 00 00 00 02 00 00 42 7a 14 80"; + let expected = "[MMI] (p07) add r14=r41,r14; nop.m 0x0; andcm r16=-1,r16;;"; + let data = "e9 70 a4 1c 00 20 00 00 00 02 00 00 f2 87 b4 88"; + let expected = "[MMI] (p07) ld8 r42=[r14]; addp4 r16=r16,r0; mov r14=r15;;"; + let data = "e9 50 01 1c 18 10 00 81 00 10 40 c0 01 78 00 84"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019dd30 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 80 03 70 fb ff 4b"; + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r16; nop.i 0x0"; + let data = "00 00 00 00 01 00 00 80 04 55 00 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt4 r16=r14;;; add r17=r38,r16;;"; + let data = "03 00 00 00 01 00 00 01 38 2c 00 20 62 82 00 80"; + let expected = "[MMI] ld1 r17=[r17];;; nop.m 0x0; sxt1 r17=r17;;"; + let data = "0b 88 00 22 00 10 00 00 00 02 00 20 02 88 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0,r17; (p06) br.cond.dptk.few 400000000019e230 "; + let data = "10 00 00 00 01 00 70 00 44 0c 73 03 30 00 00 42"; + let expected = "[MMI] shladd r16=r16,3,r41;;; ld8 r16=[r16]; nop.i 0x0;;"; + let data = "0b 80 40 52 12 20 00 01 40 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0,r16; (p06) br.cond.dptk.few 400000000019db90 "; + let data = "10 00 00 00 01 00 70 00 40 0c 72 03 70 f9 ff 4a"; + let expected = "[MIB] nop.m 0x0; adds r14=-1,r14; br.cloop.sptk.few 400000000019e1e0 ;;"; + let data = "11 00 00 00 01 00 e0 f8 3b 7e 46 a0 b0 ff ff 48"; + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=r15,r14; br.few 400000000019dba0 "; + let data = "10 00 00 00 01 00 60 78 38 0e 61 00 60 f9 ff 48"; + let expected = "[MMI] nop.m 0x0; adds r15=-1,r15; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 f8 3f 7e 46 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; sxt4 r15=r15;;; and r15=r15,r40;;"; + let data = "03 00 00 00 01 00 f0 00 3c 2c 00 e0 f1 40 31 80"; + let expected = "[MMI] cmp.eq p6,p7=0,r15;;; (p07) add r14=r40,r14; (p07) mov r35=1;;"; + let data = "0b 30 00 1e 07 f9 e1 40 39 00 c0 63 14 00 00 90"; + let expected = "[MIB] (p07) sub r43=r14,r15; (p06) mov r35=1; br.few 400000000019e090 "; + let data = "f0 58 39 1e 05 a0 31 0a 00 00 48 00 10 fe ff 48"; + let expected = "[MMI] cmp.eq p6,p7=r46,r39; nop.m 0x0; addl r51=1072,r1"; + let data = "08 30 b8 4e 07 38 00 00 00 02 00 60 06 0b 20 90"; + let expected = "[MMI] mov r52=r0; nop.m 0x0; mov r53=r0;;"; + let data = "09 a0 01 00 00 21 00 00 00 02 00 a0 06 00 00 84"; + let expected = "[MMI] (p06) mov r46=r39; ld8 r51=[r51]; nop.i 0x0;;"; + let data = "c9 70 01 4e 00 21 30 03 cc 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e330 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 03 70 00 00 43"; + let expected = "[MMI] adds r15=8,r46;;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = "0b 78 20 5c 00 21 f0 00 3c 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp.eq p6,p7=r15,r39; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e330 ;;"; + let data = "11 30 3c 4e 07 38 00 00 00 02 00 03 50 00 00 43"; + let expected = "[MMI] nop.m 0x0; add r14=r38,r45; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 e0 30 b5 00 40 00 00 00 04 00"; + let expected = "[MIB] st1 [r14]=r0; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "11 00 00 1c 80 11 00 00 00 02 00 00 48 e2 ff 58"; + let expected = "[MMI] shladd r14=r45,3,r41; nop.m 0x0; mov r1=r49;;"; + let data = "09 70 b4 52 12 20 00 00 00 02 00 20 00 88 01 84"; + let expected = "[MMI] ld8 r14=[r14]; nop.m 0x0; nop.i 0x0;;"; + let data = "09 70 00 1c 18 10 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] cmp.eq p7,p6=r14,r39; adds r42=8,r42; mov r17=84"; + let data = "08 38 38 4e 06 38 a0 42 a8 00 42 20 42 05 00 90"; + let expected = "[MMI] adds r16=8,r39;;; (p07) ld8 r15=[r42]; (p07) shladd r14=r45,3,r41"; + let data = "0a 80 20 4e 00 e1 f1 00 a8 30 a0 c3 d1 4a 49 80"; + let expected = "[MMI] (p06) adds r46=8,r46; nop.m 0x0; add r45=r38,r45;;"; + let data = "c9 70 21 5c 00 21 00 00 00 02 00 a0 65 6a 01 80"; + let expected = "[MMI] (p06) ld8 r14=[r42]; st1 [r45]=r0; nop.i 0x0;;"; + let data = "c9 70 00 54 18 10 00 00 b4 00 23 00 00 00 04 00"; + let expected = "[MMI] (p07) st8 [r14]=r15; (p06) st8 [r46]=r14; nop.i 0x0"; + let data = "e8 00 3c 1c 98 91 01 70 b8 30 23 00 00 00 04 00"; + let expected = "[MMI] shladd r15=r37,3,r41; mov r14=r39; cmp.eq p7,p6=0,r39;;"; + let data = "09 78 94 52 12 20 e0 00 9c 00 42 e0 00 38 19 e4"; + let expected = "[MMI] st1 [r14]=r17,1; ld8 r17=[r15]; nop.i 0x0"; + let data = "08 08 44 1c 80 15 10 01 3c 30 20 00 00 00 04 00"; + let expected = "[MII] st8 [r15]=r39; nop.i 0x0;;; nop.i 0x0"; + let data = "02 00 9c 1e 98 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMB] st1 [r14]=r36; st8 [r16]=r17; (p07) br.cond.dpnt.few 400000000019e040 "; + let data = "18 00 90 1c 80 11 00 88 40 30 a3 03 90 fc ff 4b"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0,r44; (p06) br.cond.dptk.few 400000000019df30 "; + let data = "10 00 00 00 01 00 60 00 b0 0e 73 03 70 fb ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019dfa0 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 d0 fb ff 48"; + let expected = "[MMI] mov r14=r42;;; adds r14=8,r14; nop.i 0x0;;"; + let data = "0b 70 00 54 00 21 e0 40 38 00 42 00 00 00 04 00"; + let expected = "[MIB] st8 [r14]=r0; nop.i 0x0; br.few 400000000019dd30 "; + let data = "10 00 00 1c 98 11 00 00 00 02 00 00 40 f9 ff 48"; + let expected = "[MMI] mov r39=r14; adds r42=8,r42; mov r17=84;;"; + let data = "09 38 01 1c 00 21 a0 42 a8 00 42 20 42 05 00 90"; + let expected = "[MMI] cmp.eq p7,p6=r14,r39; nop.m 0x0; adds r16=8,r39;;"; + let data = "09 38 38 4e 06 38 00 00 00 02 00 00 82 38 01 84"; + let expected = "[MMI] (p07) ld8 r15=[r42]; nop.m 0x0; (p07) shladd r14=r45,3,r41"; + let data = "e8 78 00 54 18 10 00 00 00 02 80 c3 d1 4a 49 80"; + let expected = "[MMI] (p06) adds r46=8,r46; nop.m 0x0; add r45=r38,r45;;"; + let data = "c9 70 21 5c 00 21 00 00 00 02 00 a0 65 6a 01 80"; + let expected = "[MMI] (p06) ld8 r14=[r42]; st1 [r45]=r0; nop.i 0x0;;"; + let data = "c9 70 00 54 18 10 00 00 b4 00 23 00 00 00 04 00"; + let expected = "[MMI] (p07) st8 [r14]=r15; (p06) st8 [r46]=r14; nop.i 0x0"; + let data = "e8 00 3c 1c 98 91 01 70 b8 30 23 00 00 00 04 00"; + let expected = "[MMI] shladd r15=r37,3,r41; mov r14=r39; cmp.eq p7,p6=0,r39;;"; + let data = "09 78 94 52 12 20 e0 00 9c 00 42 e0 00 38 19 e4"; + let expected = "[MMI] st1 [r14]=r17,1; ld8 r17=[r15]; nop.i 0x0"; + let data = "08 08 44 1c 80 15 10 01 3c 30 20 00 00 00 04 00"; + let expected = "[MII] st8 [r15]=r39; nop.i 0x0;;; nop.i 0x0"; + let data = "02 00 9c 1e 98 11 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMB] st1 [r14]=r36; st8 [r16]=r17; (p06) br.cond.dptk.few 400000000019e3c0 "; + let data = "18 00 90 1c 80 11 00 88 40 30 23 03 30 ff ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019e040 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 a0 fb ff 48"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] alloc r37=ar.pfs,10,7,0; mov r38=r1; mov r36=b0"; + let data = "08 28 29 0e 80 05 60 02 04 00 42 80 04 00 c4 00"; + let expected = "[MMI] add r39=r33,r32; mov r40=r34; mov r41=r35;;"; + let data = "09 38 85 40 00 20 80 02 88 00 42 20 05 18 01 84"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=400000000019d180 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 a8 ec ff 58"; + let expected = "[MMI] cmp.eq p6,p7=0,r8; sub r14=r0,r32; nop.i 0x0"; + let data = "08 30 00 10 07 39 e0 00 80 0a 40 00 00 00 04 00"; + let expected = "[MMB] adds r32=-1,r32; mov r1=r38; (p06) br.cond.dpnt.few 400000000019e550 ;;"; + let data = "19 00 fd 41 3f 23 10 00 98 00 42 03 50 00 00 43"; + let expected = "[MII] add r15=r8,r32; and r32=r32,r8;;; cmp.eq p6,p7=0,r32"; + let data = "02 78 20 40 00 20 00 02 21 18 40 c0 00 00 1d e4"; + let expected = "[MMI] and r14=r14,r15;;; (p07) sub r17=r14,r8; (p07) adds r15=-8,r14"; + let data = "0a 70 38 1e 0c e0 11 71 20 0a c0 e3 81 77 fc 8c"; + let expected = "[MMI] (p07) adds r16=-4,r14; (p07) mov r8=r14; (p07) mov r14=-42;;"; + let data = "e9 80 f0 1d 3f e3 81 00 38 00 c2 c3 61 e5 ff 9f"; + let expected = "[MMI] (p07) st4 [r16]=r17; (p07) st1 [r15]=r14; nop.i 0x0"; + let data = "e8 00 44 20 90 d1 01 70 3c 00 23 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r37; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 00 28 01 55 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r36; br.ret.sptk.many b0;;"; + let data = "11 00 00 00 01 00 00 20 05 80 03 80 08 00 84 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMB] alloc r47=ar.pfs,20,17,0; cmp.eq p7,p6=0,r33; nop.b 0x0"; + let data = "18 78 51 22 80 05 70 00 84 0c 72 00 00 00 00 20"; + let expected = "[MII] adds r14=-7,r32; mov r46=b0; mov r48=r1;;"; + let data = "01 70 e4 41 3f 23 e0 02 00 62 00 00 06 08 00 84"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019eab0 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 80 03 10 05 00 43"; + let expected = "[MIB] cmp.eq p7,p6=0,r32; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019eaf0 ;;"; + let data = "11 38 00 40 06 39 00 00 00 02 80 03 40 05 00 43"; + let expected = "[MII] ld1 r39=[r14]; adds r14=-8,r32;;; sxt1 r39=r39;;"; + let data = "03 38 01 1c 00 10 e0 c0 83 7e 46 e0 04 38 51 00"; + let expected = "[MIB] cmp4.lt p7,p6=29,r39; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019ea50 ;;"; + let data = "11 38 74 4e 86 31 00 00 00 02 80 03 80 04 00 43"; + let expected = "[MMI] ld1 r14=[r14];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 1c 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=-9,r14; (p06) br.cond.dpnt.few 400000000019e650 "; + let data = "10 00 00 00 01 00 60 b8 3b 0e 77 03 60 00 00 43"; + let expected = "[MMI] addl r50=1088,r1; mov r49=r0; mov r51=5;;"; + let data = "09 90 01 03 08 24 10 03 00 00 42 60 56 00 00 90"; + let expected = "[MIB] ld8 r50=[r50]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 90 01 64 18 10 00 00 00 02 00 00 b8 7d e8 58"; + let expected = "[MMI] mov r49=r8; mov r1=r48; nop.i 0x0"; + let data = "08 88 01 10 00 21 10 00 c0 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 90 01 44 00 21 30 03 8c 00 42 00 18 df ff 58"; + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0;;"; + let data = "09 08 00 60 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r14=-6,r32; mov r15=21845; nop.i 0x0"; + let data = "08 70 e8 41 3f 23 f0 a8 02 54 49 00 00 00 04 00"; + let expected = "[MMI] addl r49=1040,r1; mov r50=r34; mov r51=r35;;"; + let data = "09 88 41 02 08 24 20 03 88 00 42 60 06 18 01 84"; + let expected = "[MMI] ld2 r14=[r14]; ld8 r49=[r49]; nop.i 0x0;;"; + let data = "09 70 00 1c 08 10 10 03 c4 30 20 00 00 00 04 00"; + let expected = "[MIB] cmp4.eq p6,p7=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e6b0 ;;"; + let data = "11 30 38 1e 87 38 00 00 00 02 00 03 30 00 00 43"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 00 b8 de ff 58"; + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0;;"; + let data = "09 08 00 60 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r43=-4,r32; addl r40=1152,r1; sxt4 r15=r39;;"; + let data = "09 58 f1 41 3f 23 80 02 04 12 48 e0 01 38 59 00"; + let expected = "[MMI] ld4 r36=[r43]; ld8 r40=[r40]; nop.i 0x0;;"; + let data = "09 20 01 56 10 10 80 02 a0 30 20 00 00 00 04 00"; + let expected = "[MMI] adds r14=19,r36; addp4 r41=r36,r0; shladd r15=r15,3,r40;;"; + let data = "09 70 4c 48 00 21 90 22 01 10 40 e0 f1 40 49 80"; + let expected = "[MMI] nop.m 0x0; and r14=-8,r14; add r38=r32,r41"; + let data = "08 00 00 00 01 00 e0 c0 3b 58 44 c0 04 4a 01 80"; + let expected = "[MII] ld8 r42=[r15]; nop.i 0x0;;; addp4 r14=r14,r0"; + let data = "02 50 01 1e 18 10 00 00 00 02 00 c0 e1 00 20 80"; + let expected = "[MMI] mov r37=r38; adds r45=2,r38; adds r44=3,r38;;"; + let data = "09 28 01 4c 00 21 d0 12 98 00 42 80 35 30 01 84"; + let expected = "[MIB] cmp.ltu p7,p6=r42,r14; mov r14=r0; (p07) br.cond.dpnt.few 400000000019e970 ;;"; + let data = "11 38 a8 1c 06 34 e0 00 00 00 c2 03 60 02 00 43"; + let expected = "[MMI] ld1 r15=[r37],1; ld1 r16=[r45]; nop.i 0x0;;"; + let data = "09 78 04 4a 00 14 00 01 b4 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,0,8; nop.i 0x0"; + let data = "00 00 00 00 01 00 e0 78 38 ee 27 00 00 00 04 00"; + let expected = "[MMI] ld1 r17=[r37]; ld1 r15=[r44]; nop.i 0x0;;"; + let data = "09 88 00 4a 00 10 f0 00 b0 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r17,r14,8,8;;; dep r14=r16,r14,16,8;;"; + let data = "03 00 00 00 01 00 e0 88 38 ee 26 c0 01 71 dc 4b"; + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,24,8; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 78 38 ee 24 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r36,r14; (p06) br.cond.dpnt.few 400000000019e7d0 "; + let data = "10 00 00 00 01 00 60 20 39 0e 71 03 60 00 00 43"; + let expected = "[MMI] addl r50=1104,r1; mov r49=r0; mov r51=5;;"; + let data = "09 90 41 03 08 24 10 03 00 00 42 60 56 00 00 90"; + let expected = "[MIB] ld8 r50=[r50]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 90 01 64 18 10 00 00 00 02 00 00 38 7c e8 58"; + let expected = "[MMI] mov r49=r8; mov r1=r48; nop.i 0x0"; + let data = "08 88 01 10 00 21 10 00 c0 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 90 01 44 00 21 30 03 8c 00 42 00 98 dd ff 58"; + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0"; + let data = "08 08 00 60 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] adds r39=-1,r39; adds r15=19,r33; mov r14=r33;;"; + let data = "09 38 fd 4f 3f 23 f0 98 84 00 42 c0 01 08 01 84"; + let expected = "[MII] nop.m 0x0; sxt4 r39=r39; and r15=-8,r15;;"; + let data = "01 00 00 00 01 00 70 02 9c 2c 00 e0 81 7f b0 88"; + let expected = "[MMI] shladd r40=r39,3,r40; nop.m 0x0; addp4 r15=r15,r0;;"; + let data = "09 40 9d 50 12 20 00 00 00 02 00 e0 f1 00 20 80"; + let expected = "[MMI] nop.m 0x0; ld8 r16=[r40]; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 00 01 a0 30 20 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp.ltu p7,p6=r16,r15; (p07) br.cond.dptk.few 400000000019e8d0 ;;"; + let data = "11 00 00 00 01 00 70 80 3c 0c e8 03 c0 00 00 42"; + let expected = "[MMI] cmp.ltu p7,p6=r33,r41; nop.m 0x0; mov r49=r33"; + let data = "08 38 84 52 06 34 00 00 00 02 00 20 06 08 01 84"; + let expected = "[MMI] mov r50=r34; nop.m 0x0; mov r51=r35;;"; + let data = "09 90 01 44 00 21 00 00 00 02 00 60 06 18 01 84"; + let expected = "[MIB] (p07) mov r36=r14; nop.i 0x0; br.call.sptk.many b0=400000000019d180 ;;"; + let data = "f1 20 01 1c 00 21 00 00 00 02 00 00 48 e9 ff 58"; + let expected = "[MMI] cmp.eq p6,p7=0,r8; mov r1=r48; mov r37=r8"; + let data = "08 30 00 10 07 39 10 00 c0 00 42 a0 04 40 00 84"; + let expected = "[MMB] mov r49=r8; mov r50=r32; (p06) br.cond.dpnt.few 400000000019e8b0 ;;"; + let data = "19 88 01 10 00 21 20 03 80 00 42 03 50 00 00 43"; + let expected = "[MIB] addp4 r51=r36,r0; nop.i 0x0; br.call.sptk.many b0=4000000000026200 <_init@@Base+0x10e0>;;"; + let data = "11 98 91 00 08 20 00 00 00 02 00 00 98 79 e8 58"; + let expected = "[MMI] mov r1=r48; mov r49=r32; nop.i 0x0"; + let data = "08 08 00 60 00 21 10 03 80 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c700 ;;"; + let data = "19 90 01 44 00 21 30 03 8c 00 42 00 78 de ff 58"; + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0"; + let data = "08 08 00 60 00 21 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] mov r8=r37; nop.m 0x0; mov.i ar.pfs=r47;;"; + let data = "09 40 00 4a 00 21 00 00 00 02 00 00 f0 02 aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r46; br.ret.sptk.many b0"; + let data = "10 00 00 00 01 00 00 70 05 80 03 80 08 00 84 00"; + let expected = "[MIB] nop.m 0x0; cmp.ltu p6,p7=r42,r15; (p06) br.cond.dptk.few 400000000019e820 "; + let data = "10 00 00 00 01 00 60 50 3d 0e 68 03 50 ff ff 4a"; + let expected = "[MMB] addp4 r15=r33,r0; st1 [r38]=r0; nop.b 0x0"; + let data = "18 78 84 00 08 20 00 00 98 00 23 00 00 00 00 20"; + let expected = "[MMI] st1 [r37]=r0; mov r37=r32; extr r18=r33,8,8;;"; + let data = "09 00 00 4a 80 11 50 02 80 00 42 40 12 09 1d 52"; + let expected = "[MMI] add r32=r32,r15; st1 [r45]=r0; extr r17=r33,16,8"; + let data = "08 00 81 1e 00 20 00 00 b4 00 23 20 12 0a 1d 52"; + let expected = "[MMI] st1 [r44]=r0; nop.m 0x0; mov r8=r37;;"; + let data = "09 00 00 58 80 11 00 00 00 02 00 00 01 28 01 84"; + let expected = "[MMB] mov r15=r32; st4 [r43]=r33; nop.b 0x0"; + let data = "18 78 00 40 00 21 00 08 ad 20 23 00 00 00 00 20"; + let expected = "[MII] adds r16=2,r32; extr r33=r33,24,8; adds r32=3,r32;;"; + let data = "01 80 08 40 00 21 10 8a 85 0e 29 00 34 00 01 84"; + let expected = "[MMI] st1 [r15]=r14,1; st1 [r16]=r17; mov.i ar.pfs=r47;;"; + let data = "09 08 38 1e 80 15 00 88 40 00 23 00 f0 02 aa 00"; + let expected = "[MMB] nop.m 0x0; st1 [r15]=r18; nop.b 0x0"; + let data = "18 00 00 00 01 00 00 90 3c 00 23 00 00 00 00 20"; + let expected = "[MIB] st1 [r32]=r33; mov b0=r46; br.ret.sptk.many b0"; + let data = "10 00 84 40 80 11 00 70 05 80 03 80 08 00 84 00"; + let expected = "[MMI] addl r50=1096,r1; mov r49=r0; mov r51=5;;"; + let data = "09 90 21 03 08 24 10 03 00 00 42 60 56 00 00 90"; + let expected = "[MIB] ld8 r50=[r50]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = "11 90 01 64 18 10 00 00 00 02 00 00 48 7a e8 58"; + let expected = "[MMI] mov r49=r8; mov r1=r48; nop.i 0x0"; + let data = "08 88 01 10 00 21 10 00 c0 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "19 90 01 44 00 21 30 03 8c 00 42 00 a8 db ff 58"; + let expected = "[MMI] ld4 r36=[r43]; mov r14=r0; mov r1=r48;;"; + let data = "09 20 01 56 10 10 e0 00 00 00 42 20 00 80 01 84"; + let expected = "[MMI] addp4 r41=r36,r0;;; add r38=r32,r41; nop.i 0x0;;"; + let data = "0b 48 91 00 08 20 60 02 a5 00 40 00 00 00 04 00"; + let expected = "[MMI] mov r37=r38; adds r45=2,r38; adds r44=3,r38;;"; + let data = "09 28 01 4c 00 21 d0 12 98 00 42 80 35 30 01 84"; + let expected = "[MMI] ld1 r15=[r37],1; ld1 r16=[r45]; nop.i 0x0;;"; + let data = "09 78 04 4a 00 14 00 01 b4 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,0,8; nop.i 0x0"; + let data = "00 00 00 00 01 00 e0 78 38 ee 27 00 00 00 04 00"; + let expected = "[MMI] ld1 r17=[r37]; ld1 r15=[r44]; nop.i 0x0;;"; + let data = "09 88 00 4a 00 10 f0 00 b0 00 20 00 00 00 04 00"; + let expected = "[MII] nop.m 0x0; dep r14=r17,r14,8,8;;; dep r14=r16,r14,16,8;;"; + let data = "03 00 00 00 01 00 e0 88 38 ee 26 c0 01 71 dc 4b"; + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,24,8; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 e0 78 38 ee 24 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r36,r14; (p07) br.cond.dptk.few 400000000019e780 "; + let data = "10 00 00 00 01 00 60 20 39 0e f1 03 50 fd ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019e7d0 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 90 fd ff 48"; + let expected = "[MMI] addl r49=1064,r1; mov r50=r34; mov r51=r35;;"; + let data = "09 88 a1 02 08 24 20 03 88 00 42 60 06 18 01 84"; + let expected = "[MIB] ld8 r49=[r49]; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = "11 88 01 62 18 10 00 00 00 02 00 00 e8 da ff 58"; + let expected = "[MMI] adds r14=-8,r32; nop.m 0x0; mov r1=r48;;"; + let data = "09 70 e0 41 3f 23 00 00 00 02 00 20 00 80 01 84"; + let expected = "[MMI] ld1 r14=[r14];;; nop.m 0x0; sxt1 r14=r14;;"; + let data = "0b 70 00 1c 00 10 00 00 00 02 00 c0 01 70 50 00"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=-9,r14; (p07) br.cond.dptk.few 400000000019e600 "; + let data = "10 00 00 00 01 00 60 b8 3b 0e f7 03 70 fb ff 4a"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019e650 "; + let data = "10 00 00 00 01 00 00 00 00 02 00 00 b0 fb ff 48"; + let expected = "[MMI] mov r49=r32; mov r50=r34; nop.i 0x0"; + let data = "08 88 01 40 00 21 20 03 88 00 42 00 00 00 04 00"; + let expected = "[MMB] mov r51=r35; mov r37=r0; br.call.sptk.many b0=400000000019c700 ;;"; + let data = "19 98 01 46 00 21 50 02 00 00 42 00 48 dc ff 58"; + let expected = "[MMI] mov r8=r37; mov r1=r48; mov.i ar.pfs=r47;;"; + let data = "09 40 00 4a 00 21 10 00 c0 00 42 00 f0 02 aa 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r46; br.ret.sptk.many b0;;"; + let data = "11 00 00 00 01 00 00 70 05 80 03 80 08 00 84 00"; + let expected = "[MMI] mov r32=r33; nop.m 0x0; mov b0=r46"; + let data = "08 00 01 42 00 21 00 00 00 02 00 00 e0 0a 00 07"; + let expected = "[MII] mov r33=r34; mov r34=r35;;; mov.i ar.pfs=r47;;"; + let data = "03 08 01 44 00 21 20 02 8c 00 42 00 f0 02 aa 00"; + let expected = "[MIB] alloc r2=ar.pfs,4,0,0; nop.i 0x0; br.many 400000000019d180 ;;"; + let data = "11 10 10 00 80 05 00 00 00 02 00 00 78 e6 ff 48"; + let expected = "[MFI] nop.m 0x0; break.f 0x0; nop.i 0x0;;"; + let data = "0d 00 00 00 01 00 00 00 00 00 00 00 00 00 04 00"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = "08 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; +} + +// from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 +// bfd reports immediates in decimal in many places. all immediates are corrected to hex, as +// yaxpeax-ia64 only reports immediates as hexadecimal. +#[test] +fn test_bash_libc_csu_init() { + // 400000000019f500 <__libc_csu_init@@Base>: + let expected = "[MII] alloc r39=ar.pfs,12,9,0; mov r38=b0; mov r40=r1;;"; + let data = "01 38 31 12 80 05 60 02 00 62 00 00 05 08 00 84"; + let expected = "[MIB] mov r35=r0; nop.i 0x0; br.call.sptk.many b0=4000000000025120 <_init@@Base>;;"; + let data = "11 18 01 00 00 21 00 00 00 02 00 00 18 5c e8 58"; + let expected = "[MMI] mov r1=r40;;; addl r36=-41776,r1; addl r37=-41752,r1;;"; + let data = "0b 08 00 50 00 21 40 82 f6 73 4d a0 84 ee e7 9a"; + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 00 00 00 02 00 00 00 00 04 00"; + let expected = "[MMI] sub r37=r37,r36;;; nop.m 0x0; shr r37=r37,3;;"; + let data = "0b 28 95 48 05 20 00 00 00 02 00 a0 74 28 f1 52"; + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0,r37; (p06) br.cond.dpnt.few 400000000019f5b0 <__libc_csu_init@@Base+0xb0>;;"; + let data = "11 00 00 00 01 00 60 00 94 0e 72 03 60 00 00 43"; + let expected = "[MMI] nop.m 0x0; ld8 r14=[r36],8; mov r41=r32"; + let data = "08 00 00 00 01 00 e0 40 90 30 28 20 05 00 01 84"; + let expected = "[MMI] mov r42=r33; mov r43=r34; adds r35=1,r35;;"; + let data = "09 50 01 42 00 21 b0 02 88 00 42 60 14 18 01 84"; + let expected = "[MMI] nop.m 0x0; ld8 r15=[r14],8; nop.i 0x0;;"; + let data = "09 00 00 00 01 00 f0 40 38 30 28 00 00 00 04 00"; + let expected = "[MIB] ld8 r1=[r14]; mov b6=r15; br.call.sptk.many b0=b6;;"; + let data = "11 08 00 1c 18 10 60 78 04 80 03 00 68 00 80 10"; + let expected = "[MIB] mov r1=r40; cmp.ltu p6,p7=r35,r37; (p06) br.cond.dptk.few 400000000019f560 <__libc_csu_init@@Base+0x60>"; + let data = "10 08 00 50 00 21 60 18 95 0e 68 03 c0 ff ff 4a"; + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r39; nop.i 0x0;;"; + let data = "01 00 00 00 01 00 00 38 01 55 00 00 00 00 04 00"; + let expected = "[MIB] nop.m 0x0; mov b0=r38; br.ret.sptk.many b0;;"; + let data = "11 00 00 00 01 00 00 30 05 80 03 80 08 00 84 00"; + let expected = "[MII] nop.m 0x6; nop.i 0x7; nop.i 0x8"; + let data = "00 30 00 00 01 00 70 00 00 02 00 00 01 00 04 00"; + let expected = "[MLX] alloc r34=ar.pfs,5,5,0; movl r32=0xfffffffffffff5f8;;"; + let data = "05 10 15 0a 80 c5 ff ff ff ff 7f 00 84 f7 af 6f"; + let expected = "[MMI] add r32=r32,r1;;; ld8 r35=[r32],-8; mov r33=b0;;"; + let data = "0b 00 81 02 00 20 30 c2 83 32 2c 20 04 00 c4 00"; + let expected = "[MIB] cmp.eq p6,p0=-1,r35; mov r36=r1; (p06) br.cond.spnt.few 400000000019f640 <__libc_csu_init@@Base+0x140>"; + let data = "10 30 fc 47 00 3b 40 02 04 00 42 03 40 00 00 41"; + let expected = "[MMI] ld8 r15=[r35],8;;; ld8 r1=[r35]; mov b6=r15"; + let data = "0a 78 20 46 18 14 10 00 8c 30 20 c0 f0 08 00 07"; + let expected = "[MIB] ld8 r35=[r32],-8; nop.i 0x0; br.call.sptk.many b0=b6;;"; + let data = "11 18 e1 41 19 16 00 00 00 02 00 00 68 00 80 10"; + let expected = "[MIB] cmp.eq p0,p6=-1,r35; nop.i 0x0; (p06) br.cond.sptk.few 400000000019f610 <__libc_csu_init@@Base+0x110>"; + let data = "10 00 fc 47 06 3b 00 00 00 02 00 03 e0 ff ff 48"; + let expected = "[MII] mov r1=r35; mov b0=r33; mov.i ar.pfs=r34"; + let data = "00 08 00 46 00 21 00 08 05 80 03 00 20 02 aa 00"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.ret.sptk.many b0;;"; + let data = "11 00 00 00 01 00 00 00 00 02 00 80 08 00 84 00"; +} + +// from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 +// bfd reports immediates in decimal in many places. all immediates are corrected to hex, as +// yaxpeax-ia64 only reports immediates as hexadecimal. +#[test] +fn test_bash_cfree() { + // 400000000019f080 : + let decoder = InstDecoder::default(); + + let expected = "[MMI] alloc r16=ar.pfs,3,3,0;; mov r33=r0; mov r34=r0;;"; + let data = [0x0b, 0x80, 0x0c, 0x06, 0x80, 0x05, 0x10, 0x02, 0x00, 0x00, 0x42, 0x40, 0x04, 0x00, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many $+-0x2990;;"; + let data = [0x11, 0x10, 0x0c, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x78, 0xd6, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; break.f 0x0; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] setf.sig f8=r32; setf.sig f9=r33; cmp.eq.unc p7,p0=0x0,r33;;"; + let data = [0x09, 0x40, 0x80, 0x00, 0xe1, 0x18, 0x90, 0x08, 0x01, 0xc2, 0x31, 0xe0, 0x08, 0x08, 0x01, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.xf f8=f8; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x40, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.xf f9=f9; (p07) break.i 0x1;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0x48, 0x00, 0x38, 0x80, 0x23, 0x00, 0x00, 0x00, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; frcpa.s1 f10,p6=f8,f9; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x40, 0x24, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f11=f9,f10,f1; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x08, 0x24, 0x14, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f12=f8,f10; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x00, 0x20, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f13=f11,f11; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xd1, 0x00, 0x2c, 0x16, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f12=f11,f12,f12; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x60, 0x2c, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f11,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x50, 0x2c, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f11=f13,f12,f12; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x60, 0x34, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f13,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x50, 0x34, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f12=f9,f11,f8; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x40, 0x24, 0x16, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f12,f10,f11; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x58, 0x30, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.fx.trunc.s1 f10=f10; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x50, 0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] getf.sig r8=f10; nop.i 0x0; br.ret.sptk.few b0;;"; + let data = [0x11, 0x40, 0x28, 0x00, 0xe1, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] setf.sig f14=r32; setf.sig f9=r33; cmp.eq.unc p7,p0=0x0,r33;;"; + let data = [0x09, 0x70, 0x80, 0x00, 0xe1, 0x18, 0x90, 0x08, 0x01, 0xc2, 0x31, 0xe0, 0x08, 0x08, 0x01, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.xf f8=f14; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x70, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.xf f9=f9; (p07) break.i 0x1;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0x48, 0x00, 0x38, 0x80, 0x23, 0x00, 0x00, 0x00, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; frcpa.s1 f10,p6=f8,f9; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x40, 0x24, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f12=f8,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x00, 0x20, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f11=f9,f10,f1; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x08, 0x24, 0x14, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f12=f11,f12,f12; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x60, 0x2c, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f13=f11,f11; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xd1, 0x00, 0x2c, 0x16, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f11,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x50, 0x2c, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f11=f13,f12,f12; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x60, 0x34, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] sub r33=r0,r33; (p06) fma.s1 f10=f13,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x08, 0x01, 0x42, 0x05, 0xa0, 0xa1, 0x50, 0x34, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f12=f9,f11,f8; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x40, 0x24, 0x16, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] setf.sig f9=r33; (p06) fma.s1 f10=f12,f10,f11; nop.i 0x0;;"; + let data = [0x0d, 0x48, 0x84, 0x00, 0xe1, 0x98, 0xa1, 0x58, 0x30, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.fx.trunc.s1 f10=f10; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x50, 0x00, 0x34, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; xma.l f10=f10,f9,f14; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x70, 0x28, 0x12, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] getf.sig r8=f10; nop.i 0x0; br.ret.sptk.few b0;;"; + let data = [0x11, 0x40, 0x28, 0x00, 0xe1, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] setf.sig f8=r32; setf.sig f9=r33; cmp.eq.unc p7,p0=0x0,r33;;"; + let data = [0x09, 0x40, 0x80, 0x00, 0xe1, 0x18, 0x90, 0x08, 0x01, 0xc2, 0x31, 0xe0, 0x08, 0x08, 0x01, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fnorm.s1 f8=f8; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x20, 0x02, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fnorm.s1 f9=f9; (p07) break.i 0x1;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0x00, 0x24, 0x02, 0xc1, 0x23, 0x00, 0x00, 0x00, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; frcpa.s1 f10,p6=f8,f9; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x40, 0x24, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f11=f9,f10,f1; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x08, 0x24, 0x14, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f12=f8,f10; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x00, 0x20, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f13=f11,f11; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xd1, 0x00, 0x2c, 0x16, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f12=f11,f12,f12; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x60, 0x2c, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f11,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x50, 0x2c, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f11=f13,f12,f12; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x60, 0x34, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f13,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x50, 0x34, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f12=f9,f11,f8; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x40, 0x24, 0x16, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f12,f10,f11; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x58, 0x30, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.fxu.trunc.s1 f10=f10; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x50, 0x00, 0x36, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] getf.sig r8=f10; nop.i 0x0; br.ret.sptk.few b0;;"; + let data = [0x11, 0x40, 0x28, 0x00, 0xe1, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] setf.sig f14=r32; setf.sig f9=r33; cmp.eq.unc p7,p0=0x0,r33;;"; + let data = [0x09, 0x70, 0x80, 0x00, 0xe1, 0x18, 0x90, 0x08, 0x01, 0xc2, 0x31, 0xe0, 0x08, 0x08, 0x01, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fnorm.s1 f8=f14; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x38, 0x02, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fnorm.s1 f9=f9; (p07) break.i 0x1;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0x00, 0x24, 0x02, 0xc1, 0x23, 0x00, 0x00, 0x00, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; frcpa.s1 f10,p6=f8,f9; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x40, 0x24, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f12=f8,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x00, 0x20, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f11=f9,f10,f1; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x08, 0x24, 0x14, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f12=f11,f12,f12; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x60, 0x2c, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fmpy.s1 f13=f11,f11; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xd1, 0x00, 0x2c, 0x16, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f10=f11,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x00, 0x00, 0x00, 0x01, 0x80, 0xa1, 0x50, 0x2c, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fma.s1 f11=f13,f12,f12; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xb1, 0x60, 0x34, 0x18, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] sub r33=r0,r33; (p06) fma.s1 f10=f13,f10,f10; nop.i 0x0"; + let data = [0x0c, 0x08, 0x01, 0x42, 0x05, 0xa0, 0xa1, 0x50, 0x34, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; (p06) fnma.s1 f12=f9,f11,f8; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x40, 0x24, 0x16, 0x61, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] setf.sig f9=r33; (p06) fma.s1 f10=f12,f10,f11; nop.i 0x0;;"; + let data = [0x0d, 0x48, 0x84, 0x00, 0xe1, 0x98, 0xa1, 0x58, 0x30, 0x14, 0x41, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; fcvt.fxu.trunc.s1 f10=f10; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x50, 0x00, 0x36, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; xma.l f10=f10,f9,f14; nop.i 0x0;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x70, 0x28, 0x12, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] getf.sig r8=f10; nop.i 0x0; br.ret.sptk.few b0;;"; + let data = [0x11, 0x40, 0x28, 0x00, 0xe1, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x6; nop.i 0x7; nop.i 0x8"; + let data = [0x00, 0x30, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x6; nop.i 0x7; nop.i 0x8"; + let data = [0x00, 0x30, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x6; nop.i 0x7; nop.i 0x8"; + let data = [0x00, 0x30, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); +} -- cgit v1.1