From 4b3246180776e0a98c85dbb1e7a7e46c0132113e Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 11 Oct 2020 17:23:39 -0700 Subject: add tests derived from bash_4.2+dfsg-0.1+deb7u3_ia64 syntax is entirely from objdump, and is partially converted to appropriate test expectations --- tests/test.rs | 4989 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 3325 insertions(+), 1664 deletions(-) diff --git a/tests/test.rs b/tests/test.rs index e589f2f..2d63ddb 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -2,18 +2,27 @@ use yaxpeax_ia64::InstDecoder; use yaxpeax_arch::Decoder; #[test] +fn test_addl_imm() { + let decoder = InstDecoder::default(); + + let expected = "[MMI] adds r39=-0x1,r36; addl r14=0x8f40,r1; adds r36=-0x3,r36;;"; + let data = [0x09, 0x38, 0xfd, 0x49, 0x3f, 0x23, 0xe0, 0x00, 0x06, 0x3c, 0x4a, 0x80, 0xd4, 0x27, 0xfd, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); +} +#[test] fn test_a_bundle() { // from elf64-ia64-vms.c // [MMI] addl r15=0,r1;; // ld8.acq r16=[r15],8 // mov r14=r1;; // let data = [0x0b, 0x78, 0x00, 0x02, 0x00, 0x24, 0x00, 0x41, 0x3c, 0x70, 0x27, 0xc0, 0x01, 0x08, 0x00, 0x84]; - let data = [0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0]; - let data = [0x04, 0x10, 0x1c, 0x00, 0x80, 0x45, 0x02, 0x4c, 0x80, 0x09, 0x00, 0x60, 0xf0, 0x13, 0x1a, 0x60]; - let data = [0x05, 0x10, 0x41, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x23, 0xc8, 0x6f]; + //let data = [0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0]; + //let data = [0x04, 0x10, 0x1c, 0x00, 0x80, 0x45, 0x02, 0x4c, 0x80, 0x09, 0x00, 0x60, 0xf0, 0x13, 0x1a, 0x60]; + //let data = [0x05, 0x10, 0x41, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x23, 0xc8, 0x6f]; - let decoder = InstDecoder::default(); - let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + //let decoder = InstDecoder::default(); + //let inst = decoder.decode(data[..].iter().cloned()).unwrap(); } #[test] @@ -60,198 +69,392 @@ fn test_br_cosmetics() { #[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"; + let decoder = InstDecoder::default(); + + let expected = "[MMI] alloc r39=ar.pfs,12,9,0; adds r12=-0x10,r12; mov r38=b0"; + let data = [0x08, 0x38, 0x31, 0x12, 0x80, 0x05, 0xc0, 0x80, 0x33, 0x7e, 0x46, 0xc0, 0x04, 0x00, 0xc4, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] cmp.eq p6,p7=0x0,r32; adds r36=0x1,r32; (p06) br.cond.dpnt.few $+0x5d0;;"; + let data = [0x19, 0x30, 0x00, 0x40, 0x07, 0x39, 0x40, 0x0a, 0x80, 0x00, 0x42, 0x03, 0xd0, 0x05, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r32]; mov r40=r1; mov r33=r32;;"; + let data = [0x09, 0x70, 0x00, 0x40, 0x00, 0x10, 0x80, 0x02, 0x04, 0x00, 0x42, 0x20, 0x04, 0x00, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p6,p7=0x7e,r14; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019b410 ;;"; + let data = [0x11, 0x30, 0xf8, 0x1d, 0x87, 0x39, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0xd0, 0x02, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld1 r14=[r36]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x90, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14;; cmp4.eq p7,p6=47,r14;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0xe0, 0xf0, 0x72, 0x18, 0xe6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=0x0,r14; (p06) br.cond.dptk.few 400000000019b1f0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x8c, 0x73, 0x03, 0x80, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r41=-1576,r1; nop.m 0x0; mov r34=0x1;;"; + let data = [0x09, 0x48, 0x61, 0xfb, 0xf3, 0x27, 0x00, 0x00, 0x00, 0x02, 0x00, 0x40, 0x14, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r41=[r41]; nop.i 0x0; br.call.sptk.many b0=4000000000070480 ;;"; + let data = [0x11, 0x48, 0x01, 0x52, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0x52, 0xed, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p7,p6=0x0,r8; nop.m 0x0; mov r1=r40"; + let data = [0x08, 0x38, 0x00, 0x10, 0x06, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r32=r8; nop.m 0x0; (p07) br.cond.dpnt.few 400000000019b530 ;;"; + let data = [0x19, 0x00, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x80, 0x03, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r39; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x38, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov b0=r38; adds r12=0x10,r12;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x30, 0x05, 0x80, 0x03, 0x80, 0x01, 0x61, 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 400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>;;"; + let data = [0x11, 0x10, 0x0c, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xfd, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=4000000000026c20 <_init@@Base+0x1b00>;;"; + let data = [0x11, 0x48, 0x01, 0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x38, 0xba, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r40; mov r41=r8; br.call.sptk.many b0=40000000000fab00 ;;"; + let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x02, 0x20, 0x00, 0x42, 0x00, 0x08, 0xf9, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r35=r8; ld1 r15=[r36]; mov r1=r40;;"; + let data = [0x09, 0x18, 0x01, 0x10, 0x00, 0x21, 0xf0, 0x00, 0x90, 0x00, 0x20, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r15=r15;; cmp4.eq p7,p6=0x0,r15"; + let data = [0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x3c, 0x28, 0x00, 0xe0, 0x00, 0x78, 0x18, 0xe6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p9,p8=47,r15;; (p06) mov r16=0x1; (p08) mov r14=0x1;;"; + let data = [0x0b, 0x48, 0xbc, 0x1e, 0x88, 0xb9, 0x01, 0x09, 0x00, 0x00, 0x48, 0xc4, 0x11, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] (p07) mov r16=r0; (p09) mov r14=r0;; and r14=r14,r16;;"; + let data = [0xe3, 0x80, 0x00, 0x00, 0x00, 0x61, 0xe2, 0x00, 0x00, 0x00, 0x42, 0xc0, 0xe1, 0x80, 0x30, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p6,p7=0x0,r14; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019b570 ;;"; + let data = [0x11, 0x30, 0x00, 0x1c, 0x87, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x20, 0x03, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) mov r16=0x1; (p07) adds r17=2,r32; (p07) mov r14=2;;"; + let data = [0xe9, 0x80, 0x04, 0x00, 0x00, 0xe4, 0x11, 0x11, 0x80, 0x00, 0xc2, 0xc3, 0x21, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r18=r35,r16; nop.m 0x0; adds r19=0x1,r14"; + let data = [0x08, 0x90, 0x8c, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x12, 0x70, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r16=r14; mov r36=r14;; adds r18=-0x1,r18;;"; + let data = [0x03, 0x80, 0x00, 0x1c, 0x00, 0x21, 0x40, 0x02, 0x38, 0x00, 0x42, 0x40, 0xf2, 0x97, 0xfc, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r18]=r15;; ld1 r15=[r17],1; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x3c, 0x24, 0x80, 0x11, 0xf0, 0x08, 0x44, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r15=r15;; cmp4.eq p7,p6=0x0,r15;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x3c, 0x28, 0x00, 0xe0, 0x00, 0x78, 0x18, 0xe6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=47,r15; (p07) br.cond.dpnt.few 400000000019b310 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x78, 0x3d, 0x8c, 0xf3, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] add r18=r35,r16; mov r14=r19;; adds r18=-0x1,r18"; + let data = [0x02, 0x90, 0x8c, 0x20, 0x00, 0x20, 0xe0, 0x00, 0x4c, 0x00, 0x42, 0x40, 0xf2, 0x97, 0xfc, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r36=r14; mov r16=r14; adds r19=0x1,r14;;"; + let data = [0x09, 0x20, 0x01, 0x1c, 0x00, 0x21, 0x00, 0x01, 0x38, 0x00, 0x42, 0x60, 0x12, 0x70, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r18]=r15;; ld1 r15=[r17],1; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x3c, 0x24, 0x80, 0x11, 0xf0, 0x08, 0x44, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r15=r15;; cmp4.eq p7,p6=0x0,r15;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x3c, 0x28, 0x00, 0xe0, 0x00, 0x78, 0x18, 0xe6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=47,r15; (p06) br.cond.dptk.few 400000000019b2c0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x78, 0x3d, 0x8c, 0x73, 0x03, 0xc0, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x1,r14; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x70, 0xfc, 0x1d, 0x3f, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r14=r35,r14; nop.m 0x0; mov r41=r35;;"; + let data = [0x09, 0x70, 0x8c, 0x1c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r14]=r0; nop.m 0x0; addl r14=0x4ce8,r1;;"; + let data = [0x09, 0x00, 0x00, 0x1c, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x81, 0x0e, 0x64, 0x92]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r8=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p6,p7=0x0,r8; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019b470 ;;"; + let data = [0x11, 0x30, 0x00, 0x10, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x20, 0x01, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r14=[r8],8;; nop.m 0x0; mov b6=r14"; + let data = [0x0a, 0x70, 0x20, 0x10, 0x18, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0xe0, 0x08, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] ld8 r1=[r8]; nop.m 0x0; br.call.sptk.many b0=b6;;"; + let data = [0x19, 0x08, 0x00, 0x10, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0x00, 0x80, 0x10]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r8; mov r1=r40; mov r42=r33"; + let data = [0x08, 0x30, 0x00, 0x10, 0x07, 0x39, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x40, 0x05, 0x08, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r43=r36; mov r37=r8; (p06) br.cond.dpnt.few 400000000019b470 ;;"; + let data = [0x19, 0x58, 0x01, 0x48, 0x00, 0x21, 0x50, 0x02, 0x20, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>;;"; + let data = [0x11, 0x48, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa8, 0xfb, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; mov r1=r40; mov r41=r35;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x20, 0x05, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0xfa, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r40; mov r41=r37; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x02, 0x94, 0x00, 0x42, 0x00, 0xf8, 0xf9, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; nop.m 0x0; mov r1=r40;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] ld8 r8=[r14]; mov.i ar.pfs=r39;; mov b0=r38"; + let data = [0x02, 0x40, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x38, 0x01, 0x55, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=0x10,r12; br.ret.sptk.many b0;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=4000000000026c20 <_init@@Base+0x1b00>;;"; + let data = [0x11, 0x48, 0x01, 0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x18, 0xb8, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r40; adds r41=0x1,r8; br.call.sptk.many b0=40000000000fab00 ;;"; + let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x0a, 0x20, 0x00, 0x42, 0x00, 0xe8, 0xf6, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; nop.m 0x0; mov r41=r8"; + let data = [0x08, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x40, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r42=r32; nop.m 0x0; br.call.sptk.many b0=40000000000267e0 <_init@@Base+0x16c0>;;"; + let data = [0x19, 0x50, 0x01, 0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa8, 0xb3, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r1=r40; mov.i ar.pfs=r39;; mov b0=r38"; + let data = [0x02, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x38, 0x01, 0x55, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=0x10,r12; br.ret.sptk.many b0;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r41=r35; nop.i 0x0; br.call.sptk.many b0=4000000000025e60 <_init@@Base+0xd40>;;"; + let data = [0x11, 0x48, 0x01, 0x46, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0xa9, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=32,r8; cmp.eq p7,p6=0x0,r8; mov r1=r40"; + let data = [0x08, 0x70, 0x80, 0x10, 0x00, 0x21, 0x70, 0x00, 0x20, 0x0c, 0x72, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r42=r33; mov r43=r36; (p07) br.cond.dpnt.few 400000000019b580 ;;"; + let data = [0x19, 0x50, 0x01, 0x42, 0x00, 0x21, 0xb0, 0x02, 0x90, 0x00, 0xc2, 0x03, 0xf0, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MBB] ld8 r41=[r14]; br.call.sptk.many b0=400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>; nop.b 0x0;;"; + let data = [0x13, 0x48, 0x01, 0x1c, 0x18, 0x10, 0x00, 0x54, 0xfd, 0x7f, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; nop.m 0x0; mov r41=r35;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0xf8, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=4000000000027140 <_init@@Base+0x2020>;;"; + let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xbc, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; nop.m 0x0; mov r1=r40;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r8=[r14]; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x40, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r39;; mov b0=r38"; + let data = [0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x38, 0x01, 0x55, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=0x10,r12; br.ret.sptk.many b0;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r34=0x1; nop.i 0x0; br.call.sptk.many b0=400000000006dd80 ;;"; + let data = [0x11, 0x10, 0x05, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x58, 0x28, 0xed, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r32=r8; mov r1=r40; mov.i ar.pfs=r39;;"; + let data = [0x09, 0x00, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x00, 0x70, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov b0=r38; adds r12=0x10,r12;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x30, 0x05, 0x80, 0x03, 0x80, 0x01, 0x61, 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 400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>"; + let data = [0x10, 0x10, 0x0c, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe8, 0xf9, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r14=r0; mov r36=0x1; br.few 400000000019b320 ;;"; + let data = [0x11, 0x70, 0x00, 0x00, 0x00, 0x21, 0x40, 0x0a, 0x00, 0x00, 0x48, 0x00, 0xb0, 0xfd, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=0x4ce0,r1; nop.m 0x0; mov r41=r35;;"; + let data = [0x09, 0x70, 0x80, 0x03, 0x99, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r8=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p6,p7=0x0,r8; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019b650 ;;"; + let data = [0x11, 0x30, 0x00, 0x10, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xb0, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r14=[r8],8;; nop.m 0x0; mov b6=r14"; + let data = [0x0a, 0x70, 0x20, 0x10, 0x18, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0xe0, 0x08, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] ld8 r1=[r8]; nop.m 0x0; br.call.sptk.many b0=b6;;"; + let data = [0x19, 0x08, 0x00, 0x10, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0x00, 0x80, 0x10]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r8; mov r1=r40; mov r37=r8"; + let data = [0x08, 0x30, 0x00, 0x10, 0x07, 0x39, 0x10, 0x00, 0xa0, 0x00, 0x42, 0xa0, 0x04, 0x40, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r43=r36; mov r42=r33; (p06) br.cond.dpnt.few 400000000019b650 ;;"; + let data = [0x19, 0x58, 0x01, 0x48, 0x00, 0x21, 0xa0, 0x02, 0x84, 0x00, 0x42, 0x03, 0x70, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=400000000019af40 <_rl_find_prev_mbchar@@Base+0x240>;;"; + let data = [0x11, 0x48, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x58, 0xf9, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; mov r1=r40; mov r41=r37;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x20, 0x05, 0x28, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0xf7, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; nop.m 0x0; mov r1=r40;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r8=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r8; (p06) br.cond.sptk.few 400000000019b4c0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x20, 0x0c, 0x72, 0x03, 0x80, 0xfe, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r41=r33; nop.i 0x0; br.call.sptk.many b0=4000000000026c20 <_init@@Base+0x1b00>;;"; + let data = [0x11, 0x48, 0x01, 0x42, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd8, 0xb5, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r40; adds r41=0x1,r8; br.call.sptk.many b0=40000000000fab00 ;;"; + let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x0a, 0x20, 0x00, 0x42, 0x00, 0xa8, 0xf4, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r42=r33; nop.m 0x0; mov r1=r40"; + let data = [0x08, 0x50, 0x01, 0x42, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r41=r8; nop.m 0x0; br.call.sptk.many b0=40000000000267e0 <_init@@Base+0x16c0>;;"; + let data = [0x19, 0x48, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xb1, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; mov r1=r40; mov r41=r35;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x20, 0x05, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=40000000000fadc0 ;;"; + let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x28, 0xf7, 0xf5, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=4000000000027140 <_init@@Base+0x2020>;;"; + let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x98, 0xba, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x10,r12; nop.m 0x0; mov r1=r40;;"; + let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r8=[r14]; nop.i 0x0; br.few 400000000019b510 ;;"; + let data = [0x11, 0x40, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0xfe, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r8=r0; mov.i ar.pfs=r39;; mov b0=r38"; + let data = [0x02, 0x40, 0x00, 0x00, 0x00, 0x21, 0x00, 0x38, 0x01, 0x55, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=0x10,r12; br.ret.sptk.many b0;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); } // from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 @@ -260,1474 +463,2932 @@ fn test_bash_tilde_expand_word() { #[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"; -} + let decoder = InstDecoder::default(); -// 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"; + let expected = "[MMB] alloc r44=ar.pfs,20,15,0; adds r12=-0x90,r12; nop.b 0x0"; + let data = [0x18, 0x60, 0x51, 0x1e, 0x80, 0x05, 0xc0, 0x80, 0x33, 0x7c, 0x46, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] addl r14=0x47d4,r1; mov.i r46=ar.lc; mov r45=r1;;"; + let data = [0x01, 0x70, 0x50, 0x03, 0x8f, 0x24, 0xe0, 0x02, 0x04, 0x65, 0x00, 0xa0, 0x05, 0x08, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; mov r43=b0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x05, 0x00, 0xc4, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld4 r14=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p7,p6=0x0,r14; addl r14=0x3dd0,r1; (p06) br.cond.dpnt.few $+0x30;;"; + let data = [0x11, 0x38, 0x00, 0x1c, 0x86, 0x39, 0xe0, 0x80, 0x06, 0xf6, 0x48, 0x03, 0x30, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld4 r14=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r14; (p06) br.cond.dpnt.few $+0x50"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x0c, 0x73, 0x03, 0x50, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r47=r32; mov r48=r33; br.call.sptk.many b0=$+-0x10ab0;;"; + let data = [0x11, 0x78, 0x01, 0x40, 0x00, 0x21, 0x00, 0x03, 0x84, 0x00, 0x42, 0x00, 0x58, 0xf5, 0xfe, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r8=r0; mov r1=r45; mov.i ar.pfs=r44;;"; + let data = [0x09, 0x40, 0x00, 0x00, 0x00, 0x21, 0x10, 0x00, 0xb4, 0x00, 0x42, 0x00, 0xc0, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r46;; mov b0=r43"; + let data = [0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x70, 0x05, 0x55, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=0x90,r12; br.ret.sptk.many b0;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x02, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r41=0x3d48,r1; addl r34=0x4ef0,r1; nop.i 0x0"; + let data = [0x08, 0x48, 0x21, 0x03, 0x7a, 0x24, 0x20, 0x82, 0x07, 0x3a, 0x49, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r47=0x1; mov r48=r33; br.call.sptk.many b0=$+-0x10b00;;"; + let data = [0x19, 0x78, 0x05, 0x00, 0x00, 0x24, 0x00, 0x03, 0x84, 0x00, 0x42, 0x00, 0x08, 0xf5, 0xfe, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r14=[r41];; ld8 r15=[r14],0x8; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x00, 0x52, 0x18, 0x10, 0xf0, 0x40, 0x38, 0x30, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r1=[r14]; mov b6=r15; br.call.sptk.many b0=b6;;"; + let data = [0x11, 0x08, 0x00, 0x1c, 0x18, 0x10, 0x60, 0x78, 0x04, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x10]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r37=[r34]; mov r1=r45; cmp4.eq p6,p7=0x5d,r33;;"; + let data = [0x09, 0x28, 0x01, 0x44, 0x10, 0x10, 0x10, 0x00, 0xb4, 0x00, 0x42, 0xc0, 0xd0, 0x0d, 0x1d, 0xe6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=0x4760,r1;; nop.m 0x0; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x80, 0x03, 0x8e, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r14=[r14]; nop.i 0x0; (p06) br.cond.dpnt.few $+0x480;;"; + let data = [0x11, 0x70, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x80, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p6,p7=0x7d,r33; nop.i 0x0; (p06) br.cond.dpnt.few $+0x60;;"; + let data = [0x11, 0x30, 0xf4, 0x43, 0x87, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x29,r33; (p06) br.cond.dpnt.few $+0x450"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x48, 0x85, 0x0e, 0x73, 0x03, 0x50, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r8=-0x1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x40, 0xfc, 0xf9, 0xff, 0x27, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x60, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r46;; mov b0=r43"; + let data = [0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x70, 0x05, 0x55, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=0x90,r12; br.ret.sptk.many b0"; + let data = [0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x02, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r42=0x7b; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x50, 0xed, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r37=-0x2,r37; nop.m 0x0; addl r40=0x3cc0,r1"; + let data = [0x08, 0x28, 0xf9, 0x4b, 0x3f, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x0c, 0xe4, 0x91]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r39=0x1; nop.m 0x0; mov r36=r0;;"; + let data = [0x09, 0x38, 0x05, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x04, 0x00, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r35=r37; addp4 r15=r37,r0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x02, 0x94, 0x2c, 0x00, 0xe0, 0x51, 0x02, 0x20, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; cmp4.lt p6,p7=r37,r0; (p06) br.cond.dpnt.few $+-0x80;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x28, 0x01, 0x0e, 0x61, 0x03, 0x80, 0xff, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r35=r14,r35; mov.i ar.lc=r15;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x72, 0x8c, 0x00, 0x40, 0x00, 0xf0, 0x08, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r36; (p06) br.cond.dptk.few $+0x40;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x90, 0x0e, 0x73, 0x03, 0x40, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r35];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p6,p7=r14,r36;; (p06) mov r36=r0; nop.i 0x0;;"; + let data = [0x0b, 0x30, 0x38, 0x48, 0x87, 0xb8, 0x41, 0x02, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p06) br.cond.dpnt.few $+0x80"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x80, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r47=[r40]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x02, 0xa0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p6,p7=0x0,r47; nop.i 0x0; (p06) br.cond.dpnt.few $+0x90;;"; + let data = [0x11, 0x30, 0x00, 0x5e, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x90, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r38=[r35];; nop.m 0x0; sxt1 r38=r38;;"; + let data = [0x0b, 0x30, 0x01, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x04, 0x30, 0x51, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r48=r38; nop.i 0x0; br.call.sptk.many b0=$+-0x175430;;"; + let data = [0x11, 0x80, 0x01, 0x4c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd8, 0xab, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; cmp.eq p7,p6=0x0,r8; mov r1=r45"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x20, 0x0c, 0x72, 0x20, 0x00, 0x68, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; nop.m 0x0; (p07) br.cond.dpnt.few $+0x50;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x50, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) mov r36=r38; nop.m 0x0; nop.i 0x0"; + let data = [0xc8, 0x20, 0x01, 0x4c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r39; (p06) br.cond.dpnt.few $+0x90"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x9c, 0x0e, 0x73, 0x03, 0x90, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] adds r37=-0x1,r37; adds r35=-0x1,r35; br.cloop.sptk.few $+-0xc0"; + let data = [0x10, 0x28, 0xfd, 0x4b, 0x3f, 0x23, 0x30, 0xfa, 0x8f, 0x7e, 0x46, 0xa0, 0x40, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov r8=-0x1; br.few $+-0x170;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf8, 0xf3, 0xff, 0x4f, 0x00, 0x90, 0xfe, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r36; (p06) br.cond.dptk.few $+-0x30"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x90, 0x0c, 0x73, 0x03, 0xd0, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r35];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p7,p6=r14,r33;; (p07) adds r39=0x1,r39; nop.i 0x0;;"; + let data = [0x0b, 0x38, 0x38, 0x42, 0x86, 0xf8, 0x71, 0x0a, 0x9c, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few $+-0x60;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0xa0, 0xff, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p7,p6=r42,r14;; (p07) adds r39=-0x1,r39; nop.i 0x0;;"; + let data = [0x0b, 0x38, 0xa8, 0x1c, 0x86, 0xf8, 0x71, 0xfa, 0x9f, 0x7e, 0x46, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r39; (p07) br.cond.dptk.few $+-0x70;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x9c, 0x0e, 0xf3, 0x03, 0x90, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r14=0x20,r12; mov.i ar.lc=0xf;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x31, 0x00, 0x42, 0x00, 0xf0, 0x08, 0x2a, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r0,0x8; nop.i 0x0; br.cloop.sptk.few $+0x0"; + let data = [0x10, 0x40, 0x00, 0x1c, 0x98, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x40]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r35=0x47c0,r1;; nop.m 0x0; nop.i 0x0;;"; + let data = [0x0b, 0x18, 0x01, 0x03, 0x8f, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r47=[r35]; nop.i 0x0; br.call.sptk.many b0=$+-0x175100;;"; + let data = [0x11, 0x78, 0x01, 0x46, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0xaf, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; extr r36=r8,0x1f,0x1; nop.b 0x0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0xfa, 0x21, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=0x20,r12; ld8 r47=[r35]; mov r1=r45;;"; + let data = [0x09, 0x70, 0x80, 0x18, 0x00, 0x21, 0xf0, 0x02, 0x8c, 0x30, 0x20, 0x20, 0x00, 0x68, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; shr.u r36=r36,0x3a;; add r36=r36,r8;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0xa2, 0x93, 0x0a, 0x29, 0x80, 0x44, 0x42, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; extr r36=r36,0x6,0x1a;; shladd r36=r36,0x3,r14;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x6a, 0x90, 0x32, 0x29, 0x80, 0x44, 0x72, 0x48, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r38=[r36]; nop.i 0x0; br.call.sptk.many b0=$+-0x175150;;"; + let data = [0x11, 0x30, 0x01, 0x48, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0xae, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; extr r17=r8,0x1f,0x1; nop.b 0x0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0xf9, 0x21, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r45; mov r20=0x1; adds r15=0x10,r12;;"; + let data = [0x09, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x40, 0x09, 0x00, 0x00, 0x48, 0xe0, 0x01, 0x61, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=0x3dd4,r1; nop.m 0x0; shr.u r17=r17,0x3a"; + let data = [0x08, 0x70, 0x50, 0x03, 0x7b, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x42, 0x8f, 0x14, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r18=[r41]; ld4 r35=[r34]; nop.i 0x0;;"; + let data = [0x09, 0x90, 0x00, 0x52, 0x18, 0x10, 0x30, 0x02, 0x88, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MLX] ld4 r16=[r14]; movl r14=0x431bde82d7b634db"; + let data = [0x04, 0x80, 0x00, 0x1c, 0x10, 0x90, 0xd7, 0x82, 0xde, 0x1b, 0x43, 0xc0, 0xb1, 0xd5, 0xa6, 0x61]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r8=r8,r17; st4 [r34]=r37; nop.i 0x0;;"; + let data = [0x09, 0x40, 0x20, 0x22, 0x00, 0x20, 0x00, 0x28, 0x89, 0x20, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; sxt4 r16=r16; nop.b 0x0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x40, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] setf.sig f7=r14; nop.m 0x0; and r8=63,r8;;"; + let data = [0x09, 0x38, 0x38, 0x00, 0xe1, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf1, 0x43, 0xb0, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] setf.sig f6=r16; shr r19=r16,63; sub r17=r8,r17;;"; + let data = [0x01, 0x30, 0x40, 0x00, 0xe1, 0x18, 0x30, 0xf9, 0x43, 0x00, 0x29, 0x20, 0x82, 0x88, 0x14, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r17=r17;; shl r20=r20,r17;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x01, 0x44, 0x2c, 0x00, 0x80, 0x42, 0x89, 0x20, 0x79]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MFI] nop.m 0x0; xmpy.h f6=f6,f7; or r38=r38,r20;;"; + let data = [0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x18, 0x0e, 0x77, 0xc0, 0x64, 0xa2, 0x38, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r36]=r38;; getf.sig r14=f6; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x98, 0x48, 0x98, 0x11, 0xe0, 0x30, 0x00, 0xc2, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; shr r14=r14,18;; sub r14=r14,r19;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x28, 0x39, 0x5a, 0x29, 0xc0, 0xe1, 0x98, 0x14, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; shl r17=r14,5; sxt4 r19=r14;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x71, 0xe8, 0xf4, 0x29, 0x60, 0x02, 0x70, 0x58, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] sub r17=r17,r14; st8 [r15]=r19,8; nop.i 0x0;;"; + let data = [0x09, 0x88, 0x44, 0x1c, 0x05, 0x20, 0x80, 0x98, 0x3c, 0x30, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; shl r19=r17,6;; sub r17=r19,r17;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x89, 0xe4, 0xf2, 0x29, 0x20, 0x32, 0x89, 0x14, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r14=r17,3,r14;; nop.m 0x0; shl r14=r14,6;;"; + let data = [0x0b, 0x70, 0x44, 0x1c, 0x12, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0xe1, 0xc8, 0xe5, 0x53]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] sub r16=r16,r14;; nop.m 0x0; sxt4 r16=r16;;"; + let data = [0x0b, 0x80, 0x40, 0x1c, 0x05, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x58, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r15]=r16;; ld8 r14=[r18],8; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x40, 0x1e, 0x98, 0x11, 0xe0, 0x40, 0x48, 0x30, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r1=[r18]; mov b6=r14; br.call.sptk.many b0=b6;;"; + let data = [0x11, 0x08, 0x00, 0x24, 0x18, 0x10, 0x60, 0x70, 0x04, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x10]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r45; mov r47=0x1; adds r48=32,r12"; + let data = [0x08, 0x08, 0x00, 0x5a, 0x00, 0x21, 0xf0, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x06, 0x62, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r49=r0; mov r50=r0; adds r51=0x10,r12;;"; + let data = [0x09, 0x88, 0x01, 0x00, 0x00, 0x21, 0x20, 0x03, 0x00, 0x00, 0x42, 0x60, 0x06, 0x61, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=4000000000026360 <_init@@Base+0x1240>;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xa0, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] st4 [r34]=r35; mov r8=r0; nop.b 0x0"; + let data = [0x18, 0x00, 0x8c, 0x44, 0x90, 0x11, 0x80, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r1=r45; mov.i ar.pfs=r44;; mov.i ar.lc=r46;;"; + let data = [0x03, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x00, 0x60, 0x01, 0x55, 0x00, 0x00, 0xe0, 0x0a, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov b0=r43; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x58, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r12=0x90,r12; nop.m 0x0; br.ret.sptk.many b0"; + let data = [0x18, 0x60, 0x40, 0x18, 0x01, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov r42=40; br.few 400000000019bf60 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x42, 0x01, 0x00, 0x48, 0x00, 0x10, 0xfc, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov r42=91; br.few 400000000019bf60 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0xda, 0x02, 0x00, 0x48, 0x00, 0x00, 0xfc, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); +} + +// 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 decoder = InstDecoder::default(); + + let expected = "[MII] addl r14=0x3dd4,r1; cmp4.lt p7,p6=0x0,r32;; nop.i 0x0"; + let data = [0x02, 0x70, 0x50, 0x03, 0x7b, 0x24, 0x70, 0x00, 0x80, 0x0c, 0x63, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] ld4 r8=[r14]; (p07) st4 [r14]=r32; br.ret.sptk.many b0;;"; + let data = [0x19, 0x40, 0x00, 0x1c, 0x10, 0xd0, 0x01, 0x00, 0x39, 0x20, 0x23, 0x80, 0x08, 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 = "[MMB] alloc r39=ar.pfs,14,9,0; addl r35=-0x9d0,r1; nop.b 0x0"; + let data = [0x18, 0x38, 0x39, 0x12, 0x80, 0x05, 0x30, 0x82, 0xf5, 0xd9, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] addl r42=0x3f0,r1; mov r38=b0; mov r40=r1;;"; + let data = [0x01, 0x50, 0xc1, 0x03, 0x07, 0x24, 0x60, 0x02, 0x00, 0x62, 0x00, 0x00, 0x05, 0x08, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r35=[r35]; nop.m 0x0; mov r41=r0"; + let data = [0x08, 0x18, 0x01, 0x46, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x00, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r43=0x5; ld8 r42=[r42]; nop.i 0x0;;"; + let data = [0x09, 0x58, 0x15, 0x00, 0x00, 0x24, 0xa0, 0x02, 0xa8, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r36=[r35]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x20, 0x01, 0x46, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x48, 0x9e, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r37=r8; cmp.eq p7,p6=0x0,r33; mov r1=r40"; + let data = [0x08, 0x28, 0x01, 0x10, 0x00, 0x21, 0x70, 0x00, 0x84, 0x0c, 0x72, 0x20, 0x00, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r44=r33; mov r45=r34; (p07) br.cond.dpnt.few 400000000019c630 ;;"; + let data = [0x19, 0x60, 0x01, 0x42, 0x00, 0x21, 0xd0, 0x02, 0x88, 0x00, 0xc2, 0x03, 0x90, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r43=r37; nop.m 0x0; mov r41=r36"; + let data = [0x08, 0x58, 0x01, 0x4a, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x20, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r42=0x1; nop.m 0x0; br.call.sptk.many b0=4000000000027440 <_init@@Base+0x2320>;;"; + let data = [0x19, 0x50, 0x05, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0xae, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r1=r40; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] ld8 r41=[r35]; nop.m 0x0; br.call.sptk.many b0=40000000000260e0 <_init@@Base+0xfc0>;;"; + let data = [0x19, 0x48, 0x01, 0x46, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x9b, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; mov r41=r32; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x02, 0x80, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r42=r33; mov r43=r34; br.call.sptk.many b0=400000000007dd00 ;;"; + let data = [0x19, 0x50, 0x01, 0x42, 0x00, 0x21, 0xb0, 0x02, 0x88, 0x00, 0x42, 0x00, 0x08, 0x17, 0xee, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; nop.m 0x0; mov.i ar.pfs=r39;;"; + let data = [0x09, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x70, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r38; br.ret.sptk.many b0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x30, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r42=0x3f8,r1; mov r41=r0; mov r43=0x5;;"; + let data = [0x09, 0x50, 0xe1, 0x03, 0x07, 0x24, 0x90, 0x02, 0x00, 0x00, 0x42, 0x60, 0x55, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r42=[r42]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x50, 0x01, 0x54, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x9d, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r44=r8; mov r43=r37; mov r45=r34"; + let data = [0x08, 0x60, 0x01, 0x10, 0x00, 0x21, 0xb0, 0x02, 0x94, 0x00, 0x42, 0xa0, 0x05, 0x10, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; mov r41=r36; mov r42=0x1;;"; + let data = [0x09, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x02, 0x90, 0x00, 0x42, 0x40, 0x15, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=4000000000027440 <_init@@Base+0x2320>;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd8, 0xad, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r1=r40; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] ld8 r41=[r35]; nop.m 0x0; br.call.sptk.many b0=40000000000260e0 <_init@@Base+0xfc0>;;"; + let data = [0x19, 0x48, 0x01, 0x46, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x58, 0x9a, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; mov r41=r32; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x02, 0x80, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r42=r33; mov r43=r34; br.call.sptk.many b0=400000000007dd00 ;;"; + let data = [0x19, 0x50, 0x01, 0x42, 0x00, 0x21, 0xb0, 0x02, 0x88, 0x00, 0x42, 0x00, 0x58, 0x16, 0xee, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40; nop.m 0x0; mov.i ar.pfs=r39;;"; + let data = [0x09, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x70, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r38; br.ret.sptk.many b0;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x30, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] alloc r44=ar.pfs,18,15,0; adds r35=-0x8,r32; mov r43=b0"; + let data = [0x08, 0x60, 0x49, 0x1e, 0x80, 0x05, 0x30, 0xc2, 0x83, 0x7e, 0x46, 0x60, 0x05, 0x00, 0xc4, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] cmp.eq p6,p7=0x0,r32; mov r45=r1;; mov.i r46=ar.lc"; + let data = [0x02, 0x30, 0x00, 0x40, 0x07, 0x39, 0xd0, 0x02, 0x04, 0x00, 0x42, 0xc0, 0x05, 0x08, 0xca, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r47=r0; mov r49=0x5; (p06) br.cond.dpnt.few 400000000019cbc0 ;;"; + let data = [0x19, 0x78, 0x01, 0x00, 0x00, 0x21, 0x10, 0x2b, 0x00, 0x00, 0x48, 0x03, 0xa0, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r35];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p6,p7=-0x2a,r14;; (p06) adds r14=-0x4,r32; (p07) mov r37=r32;;"; + let data = [0x0b, 0x30, 0x58, 0x1d, 0x87, 0xbb, 0xe1, 0xe0, 0x83, 0x7e, 0xc6, 0xa3, 0x04, 0x00, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) ld4 r37=[r14];; (p06) sub r37=r32,r37; nop.i 0x0;;"; + let data = [0xcb, 0x28, 0x01, 0x1c, 0x10, 0x90, 0x51, 0x02, 0x95, 0x0a, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) adds r35=-0x8,r37;; (p06) ld1 r14=[r35]; nop.i 0x0;;"; + let data = [0xcb, 0x18, 0xe1, 0x4b, 0x3f, 0xa3, 0xe1, 0x00, 0x8c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; (p06) sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x80, 0xe1, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p6,p7=-0x9,r14; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c7f0 ;;"; + let data = [0x11, 0x30, 0xdc, 0x1d, 0x87, 0x3b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x70, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p7,p6=84,r14;; (p07) addl r48=0x400,r1; nop.i 0x0;;"; + let data = [0x0b, 0x38, 0x50, 0x1d, 0x86, 0xf9, 0x01, 0x03, 0x04, 0x10, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) addl r48=0x408,r1;; (p07) ld8 r48=[r48]; nop.i 0x0;;"; + let data = [0xcb, 0x80, 0x21, 0x02, 0x08, 0xe4, 0x01, 0x03, 0xc0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] (p06) ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0xd1, 0x80, 0x01, 0x60, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x18, 0x9c, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r47=r8; mov r1=r45; nop.i 0x0"; + let data = [0x08, 0x78, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xb4, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0x80, 0x01, 0x42, 0x00, 0x21, 0x10, 0x03, 0x88, 0x00, 0x42, 0x00, 0x78, 0xfd, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r45; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=2,r35; mov r15=21845; nop.i 0x0"; + let data = [0x08, 0x70, 0x08, 0x46, 0x00, 0x21, 0xf0, 0xa8, 0x02, 0x54, 0x49, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r47=0x408,r1; mov r48=r33; mov r49=r34;;"; + let data = [0x09, 0x78, 0x41, 0x02, 0x08, 0x24, 0x00, 0x03, 0x84, 0x00, 0x42, 0x20, 0x06, 0x10, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld2 r14=[r14]; ld8 r47=[r47]; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x1c, 0x08, 0x10, 0xf0, 0x02, 0xbc, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p6,p7=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019c850 ;;"; + let data = [0x11, 0x30, 0x38, 0x1e, 0x87, 0x38, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x30, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x18, 0xfd, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r45; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r42=0x1,r35; adds r39=4,r35; addl r41=1152,r1;;"; + let data = [0x09, 0x50, 0x05, 0x46, 0x00, 0x21, 0x70, 0x22, 0x8c, 0x00, 0x42, 0x20, 0x05, 0x08, 0x24, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r36=[r42]; ld4 r15=[r39]; nop.i 0x0;;"; + let data = [0x09, 0x20, 0x01, 0x54, 0x00, 0x10, 0xf0, 0x00, 0x9c, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r36=r36; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x02, 0x90, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] ld8 r41=[r41]; adds r14=19,r15;; sxt4 r38=r36"; + let data = [0x02, 0x48, 0x01, 0x52, 0x18, 0x10, 0xe0, 0x98, 0x3c, 0x00, 0x42, 0xc0, 0x04, 0x20, 0x59, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] and r14=-0x8,r14;; shladd r16=r38,3,r41; addp4 r14=r14,r0;;"; + let data = [0x0b, 0x70, 0xe0, 0x1d, 0x2c, 0x22, 0x00, 0x31, 0xa5, 0x24, 0x40, 0xc0, 0xe1, 0x00, 0x20, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r40=[r16]; nop.m 0x0; addp4 r16=r15,r0;;"; + let data = [0x09, 0x40, 0x01, 0x20, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf2, 0x00, 0x20, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.ltu p7,p6=r40,r14; mov r14=r0; (p07) br.cond.dpnt.few 400000000019cbe0 ;;"; + let data = [0x11, 0x38, 0xa0, 0x1c, 0x06, 0x34, 0xe0, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x30, 0x03, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r37=r37,r16;; mov r16=r37; adds r17=2,r37"; + let data = [0x0a, 0x28, 0x95, 0x20, 0x00, 0x20, 0x00, 0x01, 0x94, 0x00, 0x42, 0x20, 0x22, 0x28, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r37=3,r37;; ld1 r18=[r16],1; nop.i 0x0"; + let data = [0x0a, 0x28, 0x0d, 0x4a, 0x00, 0x21, 0x20, 0x09, 0x40, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r17=[r17];; nop.m 0x0; dep r14=r18,r14,0,8"; + let data = [0x0a, 0x88, 0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x21, 0x71, 0xdc, 0x4f]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r18=[r16]; ld1 r16=[r37]; nop.i 0x0;;"; + let data = [0x09, 0x90, 0x00, 0x20, 0x00, 0x10, 0x00, 0x01, 0x94, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r18,r14,8,8;; dep r14=r17,r14,16,8;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x90, 0x38, 0xee, 0x26, 0xc0, 0x11, 0x71, 0xdc, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r16,r14,24,8; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x80, 0x38, 0xee, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r15,r14; (p06) br.cond.dpnt.few 400000000019c980 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x78, 0x38, 0x0e, 0x71, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r48=1056,r1; mov r47=r0; mov r49=0x5;;"; + let data = [0x09, 0x80, 0x81, 0x02, 0x08, 0x24, 0xf0, 0x02, 0x00, 0x00, 0x42, 0x20, 0x56, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x80, 0x01, 0x60, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x9a, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r47=r8; mov r1=r45; nop.i 0x0"; + let data = [0x08, 0x78, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xb4, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0x80, 0x01, 0x42, 0x00, 0x21, 0x10, 0x03, 0x88, 0x00, 0x42, 0x00, 0xe8, 0xfb, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r45; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p7,p6=9,r36; (p07) br.cond.dpnt.few 400000000019ccc0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x48, 0x90, 0x0c, 0xe3, 0x03, 0x40, 0x03, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; addl r37=36672,r1; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x50, 0x02, 0x06, 0x3c, 0x4a, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld4 r49=[r39]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x03, 0x9c, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r49; (p06) br.cond.dptk.few 400000000019cb40 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0xc4, 0x0e, 0x73, 0x03, 0x80, 0x01, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.ltu p6,p7=32,r49; (p06) br.cond.dptk.few 400000000019ce90 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0xc5, 0x0e, 0x6b, 0x03, 0xc0, 0x04, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addp4 r49=r49,r0;; cmp.ltu p7,p6=7,r49; nop.i 0x0;;"; + let data = [0x0b, 0x88, 0xc5, 0x00, 0x08, 0x20, 0x70, 0x38, 0xc4, 0x0c, 0x6a, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] (p07) adds r14=-0x1,r49; (p07) and r49=7,r49;; (p07) shr.u r14=r14,3;;"; + let data = [0xe3, 0x70, 0xfc, 0x63, 0x3f, 0xe3, 0x11, 0x3b, 0xc4, 0x58, 0xc0, 0xc3, 0x61, 0x70, 0xf0, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) mov r14=r0; nop.m 0x0; cmp.ltu p6,p7=7,r49;;"; + let data = [0xc9, 0x70, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x70, 0x88, 0x1d, 0xd4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dptk.few 400000000019d070 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x60, 0x06, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x31; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x78, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r32]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x40, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r14; nop.m 0x0; mov r15=-0x31;;"; + let data = [0x09, 0x30, 0x00, 0x1c, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0xf1, 0xe4, 0xff, 0x9f]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; st1 [r32]=r15; (p07) adds r14=-0x1,r14"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x78, 0x80, 0x00, 0xa3, 0xc3, 0xf1, 0x77, 0xfc, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; (p07) adds r32=1,r32; (p07) br.cond.dptk.few 400000000019ca20 ;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x01, 0x0a, 0x80, 0x00, 0xc2, 0x03, 0x00, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p7,p6=29,r36; (p07) br.cond.dpnt.few 400000000019cd90 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0xe8, 0x90, 0x0c, 0xe3, 0x03, 0x50, 0x02, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r15=r37,r38;; ld1 r14=[r15]; nop.i 0x0;;"; + let data = [0x0b, 0x78, 0x94, 0x4c, 0x00, 0x20, 0xe0, 0x00, 0x3c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=1,r14; (p07) br.cond.dpnt.few 400000000019cde0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x08, 0x38, 0x0c, 0xf3, 0x03, 0x70, 0x02, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r15]=r0; addl r15=36704,r1; mov r14=r35;;"; + let data = [0x09, 0x00, 0x00, 0x1e, 0x80, 0x11, 0xf0, 0x00, 0x07, 0x3c, 0x4a, 0xc0, 0x01, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0;; shladd r38=r38,3,r15; mov r15=84;;"; + let data = [0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x32, 0x3d, 0x24, 0x40, 0xe0, 0x41, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r14]=r15,8; ld8 r15=[r38]; nop.i 0x0"; + let data = [0x08, 0x40, 0x3c, 0x1c, 0x80, 0x15, 0xf0, 0x00, 0x98, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r38]=r35;; st8 [r14]=r15; nop.i 0x0"; + let data = [0x0a, 0x00, 0x8c, 0x4c, 0x98, 0x11, 0x00, 0x78, 0x38, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44;; mov.i ar.lc=r46;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x60, 0x01, 0x55, 0x00, 0x00, 0xe0, 0x0a, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x58, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r48=1048,r1; mov r47=r0; mov r49=0x5;;"; + let data = [0x09, 0x80, 0x61, 0x02, 0x08, 0x24, 0xf0, 0x02, 0x00, 0x00, 0x42, 0x20, 0x56, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x80, 0x01, 0x60, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd8, 0x97, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r47=r8; mov r1=r45; nop.i 0x0"; + let data = [0x08, 0x78, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xb4, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0x80, 0x01, 0x42, 0x00, 0x21, 0x10, 0x03, 0x88, 0x00, 0x42, 0x00, 0x38, 0xf9, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r15=[r39]; mov r14=r0; mov r1=r45;;"; + let data = [0x09, 0x78, 0x00, 0x4e, 0x10, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x68, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addp4 r16=r15,r0;; add r37=r37,r16; nop.i 0x0;;"; + let data = [0x0b, 0x80, 0x3c, 0x00, 0x08, 0x20, 0x50, 0x2a, 0x41, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r16=r37; adds r17=2,r37; adds r37=3,r37;;"; + let data = [0x09, 0x80, 0x00, 0x4a, 0x00, 0x21, 0x10, 0x11, 0x94, 0x00, 0x42, 0xa0, 0x34, 0x28, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r18=[r16],1; ld1 r17=[r17]; nop.i 0x0;;"; + let data = [0x09, 0x90, 0x04, 0x20, 0x00, 0x14, 0x10, 0x01, 0x44, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r18,r14,0,8; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x90, 0x38, 0xee, 0x27, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r18=[r16]; ld1 r16=[r37]; nop.i 0x0;;"; + let data = [0x09, 0x90, 0x00, 0x20, 0x00, 0x10, 0x00, 0x01, 0x94, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r18,r14,8,8;; dep r14=r17,r14,16,8;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x90, 0x38, 0xee, 0x26, 0xc0, 0x11, 0x71, 0xdc, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r16,r14,24,8; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x80, 0x38, 0xee, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r15,r14; (p07) br.cond.dptk.few 400000000019c930 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x78, 0x38, 0x0e, 0xf1, 0x03, 0x90, 0xfc, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019c980 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd0, 0xfc, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] add r37=r35,r40; mov r47=r0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = [0x11, 0x28, 0x8d, 0x50, 0x00, 0x20, 0xf0, 0x02, 0x00, 0x00, 0x42, 0x00, 0x88, 0xa6, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r45; cmp.eq p7,p6=r8,r37; (p06) br.cond.dptk.few 400000000019c990 ;;"; + let data = [0x11, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x70, 0x40, 0x94, 0x0c, 0x70, 0x03, 0xc0, 0xfc, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] addl r37=36672,r1; cmp4.lt p6,p7=12,r36; (p06) br.cond.dpnt.few 400000000019cd50 ;;"; + let data = [0x11, 0x28, 0x01, 0x03, 0x1e, 0x25, 0x60, 0x60, 0x90, 0x0e, 0x63, 0x03, 0x70, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0;; add r14=r37,r38; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x28, 0x99, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r14];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p7,p6=0x0,r14; addl r14=36704,r1; (p06) br.cond.dpnt.few 400000000019cd50 ;;"; + let data = [0x11, 0x38, 0x00, 0x1c, 0x86, 0x39, 0xe0, 0x00, 0x07, 0x3c, 0x4a, 0x03, 0x40, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0;; shladd r14=r38,3,r14; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x30, 0x39, 0x24, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r14=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0x0,r14; (p06) br.cond.dpnt.few 400000000019c9b0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x38, 0x0e, 0x72, 0x03, 0x70, 0xfc, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] sub r47=r0,r40; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = [0x11, 0x78, 0x01, 0x50, 0x05, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0xa5, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r46; mov r1=r45;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x70, 0x05, 0x55, 0x00, 0x20, 0x00, 0x68, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x60, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x58, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r47=1064,r1; mov r48=r33; mov r49=r34;;"; + let data = [0x09, 0x78, 0xa1, 0x02, 0x08, 0x24, 0x00, 0x03, 0x84, 0x00, 0x42, 0x20, 0x06, 0x10, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r47=[r47]; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x11, 0x78, 0x01, 0x5e, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa8, 0xf7, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r15=r37,r38; nop.m 0x0; mov r1=r45;;"; + let data = [0x09, 0x78, 0x94, 0x4c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x68, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r15];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1e, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=1,r14; (p06) br.cond.dptk.few 400000000019cb80 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x08, 0x38, 0x0c, 0x73, 0x03, 0xb0, 0xfd, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r39=-0x1,r36; addl r14=36672,r1; adds r36=-0x3,r36;;"; + let data = [0x09, 0x38, 0xfd, 0x49, 0x3f, 0x23, 0xe0, 0x00, 0x06, 0x3c, 0x4a, 0x80, 0xd4, 0x27, 0xfd, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r40=r39; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x9c, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; cmp4.lt p7,p6=1,r39; (p06) br.cond.dpnt.few 400000000019cbc0 ;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x08, 0x9c, 0x0c, 0x63, 0x03, 0xc0, 0xfd, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r14=r14,r40; nop.m 0x0; addp4 r36=r36,r0;;"; + let data = [0x09, 0x70, 0x38, 0x50, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x44, 0x02, 0x20, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r14];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r14; (p06) br.cond.dpnt.few 400000000019cf00 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x38, 0x0e, 0x73, 0x03, 0xd0, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r36; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x05, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; adds r39=-0x1,r39; br.cloop.sptk.few 400000000019ced0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0xfa, 0x9f, 0x7e, 0x46, 0xa0, 0x70, 0x00, 0x00, 0x40]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44;; mov.i ar.lc=r46;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x60, 0x01, 0x55, 0x00, 0x00, 0xe0, 0x0a, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x58, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r47=r32; nop.m 0x0; mov r48=207"; + let data = [0x08, 0x78, 0x01, 0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf6, 0x04, 0x04, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] addp4 r49=r49,r0; nop.m 0x0; br.call.sptk.many b0=4000000000026e60 <_init@@Base+0x1d40>;;"; + let data = [0x19, 0x88, 0xc5, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xc8, 0x9f, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r45; cmp4.lt p7,p6=29,r36; (p06) br.cond.dptk.few 400000000019cb50 "; + let data = [0x10, 0x08, 0x00, 0x5a, 0x00, 0x21, 0x70, 0xe8, 0x90, 0x0c, 0x63, 0x03, 0xa0, 0xfc, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019cd90 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd0, 0xfe, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r40=r39;; add r14=r37,r40;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x9c, 0x2c, 0x00, 0xc0, 0x51, 0x42, 0x01, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r14];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r14; (p06) br.cond.dptk.few 400000000019ce60 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x0c, 0x73, 0x03, 0x70, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r14=r40,3,r41; shladd r38=r38,3,r41; sxt1 r39=r39;;"; + let data = [0x09, 0x70, 0xa0, 0x52, 0x12, 0x20, 0x60, 0x32, 0xa5, 0x24, 0x40, 0xe0, 0x04, 0x38, 0x51, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r36=[r14]; ld8 r47=[r38]; nop.i 0x0;;"; + let data = [0x09, 0x20, 0x01, 0x1c, 0x18, 0x10, 0xf0, 0x02, 0x98, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r48=r36; nop.i 0x0; br.call.sptk.many b0=400000000019f2a0 ;;"; + let data = [0x11, 0x80, 0x01, 0x48, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x23, 0x00, 0x50]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x1,r8; nop.m 0x0; mov r15=84"; + let data = [0x08, 0x70, 0xfc, 0x11, 0x3f, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0x41, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] st1 [r42]=r39; mov r1=r45;; cmp4.lt p7,p6=0x0,r14"; + let data = [0x02, 0x00, 0x9c, 0x54, 0x80, 0x11, 0x10, 0x00, 0xb4, 0x00, 0x42, 0xe0, 0x00, 0x70, 0x18, 0xc6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] st1 [r35]=r15; nop.m 0x0; (p06) br.cond.dpnt.few 400000000019d100 ;;"; + let data = [0x19, 0x00, 0x3c, 0x46, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xb0, 0x01, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) adds r15=-0x1,r14; (p07) mov r14=r35; (p07) mov r17=84;;"; + let data = [0xe9, 0x78, 0xfc, 0x1d, 0x3f, 0xe3, 0xe1, 0x00, 0x8c, 0x00, 0xc2, 0x23, 0x42, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] (p07) addp4 r15=r15,r0; adds r16=8,r14;; (p07) mov.i ar.lc=r15"; + let data = [0xe2, 0x78, 0x3c, 0x00, 0x08, 0x20, 0x00, 0x41, 0x38, 0x00, 0xc2, 0x03, 0xf0, 0x08, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] add r15=r14,r36; nop.i 0x0;; mov r14=r15"; + let data = [0x02, 0x78, 0x38, 0x48, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x78, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r16]=r15;; st1 [r14]=r17,1; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x3c, 0x20, 0x98, 0x11, 0x10, 0x88, 0x38, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r14]=r39; nop.i 0x0; br.cloop.sptk.few 400000000019d0b0 ;;"; + let data = [0x11, 0x00, 0x9c, 0x1c, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x10, 0x01, 0x00, 0x40]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r8=-0x2,r8; setf.sig f7=r36; addl r14=36704,r1"; + let data = [0x08, 0x40, 0xf8, 0x11, 0x3f, 0x23, 0x70, 0x20, 0x01, 0xc2, 0x31, 0xc0, 0x01, 0x0e, 0x78, 0x94]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r37=r37,r40; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x50, 0x2a, 0xa1, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addp4 r8=r8,r0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x40, 0x20, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r37]=r0;; setf.sig f6=r8; shladd r40=r40,3,r14;;"; + let data = [0x0b, 0x00, 0x00, 0x4a, 0x80, 0x11, 0x60, 0x40, 0x00, 0xc2, 0x31, 0x00, 0x85, 0x72, 0x48, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r14=[r40]; st8 [r40]=r35; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x50, 0x18, 0x10, 0x00, 0x18, 0xa1, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMF] nop.m 0x0; nop.m 0x0; xma.l f6=f6,f7,f7;;"; + let data = [0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x70, 0x30, 0x1c, 0xe8]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] getf.sig r36=f6;; add r36=r35,r36; nop.i 0x0;;"; + let data = [0x0b, 0x20, 0x19, 0x00, 0xe1, 0x10, 0x40, 0x1a, 0x91, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r36=8,r36; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x42, 0x90, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r36]=r14; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x38, 0x48, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r44;; mov.i ar.lc=r46;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x60, 0x01, 0x55, 0x00, 0x00, 0xe0, 0x0a, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r43; br.ret.sptk.many b0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x58, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r15=1136,r1;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = [0x0b, 0x78, 0xc0, 0x03, 0x08, 0x24, 0xf0, 0x00, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r49=r49,3,r15;; ld8 r15=[r49]; nop.i 0x0;;"; + let data = [0x0b, 0x88, 0xc5, 0x1e, 0x12, 0x20, 0xf0, 0x00, 0xc4, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r15=r49,r15; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x88, 0x3d, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b6=r15; br.few b6;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x78, 0x04, 0x80, 0x03, 0x00, 0x60, 0x00, 0x80, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r14=r15;; add r15=r14,r36; adds r16=8,r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1e, 0x00, 0x21, 0xf0, 0x70, 0x90, 0x00, 0x40, 0x00, 0x82, 0x70, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r14=r15; st8 [r16]=r15; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x1e, 0x00, 0x21, 0x00, 0x78, 0x40, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; st1 [r14]=r17,1; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x88, 0x38, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r14]=r39; nop.i 0x0; br.cloop.sptk.few 400000000019d0b0 "; + let data = [0x10, 0x00, 0x9c, 0x1c, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0xd0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019cfc0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd0, 0xfe, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=36704,r1; add r37=r37,r40; mov r36=r35;;"; + let data = [0x09, 0x70, 0x80, 0x03, 0x1e, 0x25, 0x50, 0x2a, 0xa1, 0x00, 0x40, 0x80, 0x04, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; adds r36=8,r36"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x84, 0x20, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r37]=r0;; shladd r40=r40,3,r14; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x00, 0x4a, 0x80, 0x11, 0x80, 0x42, 0x39, 0x24, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r14=[r40]; st8 [r40]=r35; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x50, 0x18, 0x10, 0x00, 0x18, 0xa1, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r36]=r14; nop.i 0x0; br.few 400000000019d050 ;;"; + let data = [0x11, 0x00, 0x38, 0x48, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] alloc r48=ar.pfs,22,19,0; adds r12=-0x100,r12; mov.i r50=ar.lc"; + let data = [0x08, 0x80, 0x59, 0x26, 0x80, 0x05, 0xc0, 0x00, 0x30, 0x7c, 0x46, 0x40, 0x06, 0x08, 0xca, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r35=19708,r1; adds r15=19,r32; mov r49=r1;;"; + let data = [0x09, 0x18, 0xf1, 0x03, 0x99, 0x24, 0xf0, 0x98, 0x80, 0x00, 0x42, 0x20, 0x06, 0x08, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r14=[r35]; and r15=-0x8,r15; mov r47=b0;;"; + let data = [0x09, 0x70, 0x00, 0x46, 0x10, 0x10, 0xf0, 0xc0, 0x3f, 0x58, 0x44, 0xe0, 0x05, 0x00, 0xc4, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p7,p6=0x0,r14; extr r14=r14,1,31; (p07) br.cond.dpnt.few 400000000019d680 ;;"; + let data = [0x11, 0x38, 0x00, 0x1c, 0x86, 0x39, 0xe0, 0x18, 0x38, 0x3c, 0xa9, 0x03, 0xd0, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; cmp.lt p7,p6=r14,r15; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x70, 0x3c, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; (p06) mov r36=1; (p06) br.cond.dptk.few 400000000019d200 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x80, 0x41, 0x0a, 0x00, 0x00, 0x48, 0x03, 0x30, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=19712,r1;; ld4 r36=[r14]; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x00, 0x02, 0x9a, 0x24, 0x40, 0x02, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=29,r36; (p06) br.cond.dpnt.few 400000000019d270 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0xe8, 0x90, 0x0e, 0x63, 0x03, 0x80, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r39=1152,r1; nop.m 0x0; sxt4 r37=r36;;"; + let data = [0x09, 0x38, 0x01, 0x02, 0x09, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x20, 0x59, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r39=[r39];; shladd r14=r37,3,r39; nop.i 0x0;;"; + let data = [0x0b, 0x38, 0x01, 0x4e, 0x18, 0x10, 0xe0, 0x28, 0x9d, 0x24, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r14=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.ltu p7,p6=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019d2e0 ;;"; + let data = [0x11, 0x38, 0x38, 0x1e, 0x06, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xb0, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; (p07) sub r14=29,r36; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe1, 0xe8, 0x90, 0x4a, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] (p07) addp4 r14=r14,r0; nop.i 0x0;; (p07) mov.i ar.lc=r14;;"; + let data = [0xe3, 0x70, 0x38, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0xe0, 0x08, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; adds r36=1,r36; br.cloop.sptk.few 400000000019d2b0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x0a, 0x90, 0x00, 0x42, 0xa0, 0x50, 0x00, 0x00, 0x40]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r36=r0; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x20, 0x01, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r8=r36; mov.i ar.pfs=r48;; mov.i ar.lc=r50;;"; + let data = [0x03, 0x40, 0x00, 0x48, 0x00, 0x21, 0x00, 0x80, 0x01, 0x55, 0x00, 0x00, 0x20, 0x0b, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov b0=r47; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x78, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r12=256,r12; nop.m 0x0; br.ret.sptk.many b0"; + let data = [0x18, 0x60, 0x00, 0x18, 0x02, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r37=r36;; shladd r14=r37,3,r39;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x50, 0x02, 0x90, 0x2c, 0x00, 0xc0, 0x51, 0x3a, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r14=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.ltu p7,p6=r14,r15; (p07) br.cond.dptk.few 400000000019d260 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x70, 0x3c, 0x0c, 0xe8, 0x03, 0x90, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r38=36672,r1;; nop.m 0x0; nop.i 0x0;;"; + let data = [0x0b, 0x30, 0x01, 0x03, 0x1e, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r14=r38,r37;; ld1 r14=[r14]; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x98, 0x4a, 0x00, 0x20, 0xe0, 0x00, 0x38, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r14; (p06) br.cond.dpnt.few 400000000019d360 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x38, 0x0e, 0x73, 0x03, 0x50, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r36=1,r36;; nop.m 0x0; sxt4 r37=r36;;"; + let data = [0x0b, 0x20, 0x05, 0x48, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x04, 0x20, 0x59, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r14=r38,r37;; ld1 r14=[r14]; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x98, 0x4a, 0x00, 0x20, 0xe0, 0x00, 0x38, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r14; (p06) br.cond.dptk.few 400000000019d320 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x0c, 0x73, 0x03, 0xd0, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r42=19716,r1; nop.m 0x0; addl r41=36704,r1"; + let data = [0x08, 0x50, 0x11, 0x02, 0x9a, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x0e, 0x78, 0x94]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r15=r38,r37; nop.m 0x0; mov r16=1;;"; + let data = [0x09, 0x78, 0x98, 0x4a, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x12, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r14=[r42]; st1 [r15]=r16; nop.i 0x0"; + let data = [0x08, 0x70, 0x00, 0x54, 0x10, 0x10, 0x00, 0x80, 0x3c, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0;; cmp4.lt p7,p6=r14,r36; shladd r14=r37,3,r41;;"; + let data = [0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x70, 0x90, 0x0c, 0x61, 0xc0, 0x51, 0x4a, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r40=[r14]; (p07) st4 [r42]=r36; nop.i 0x0;;"; + let data = [0x09, 0x40, 0x01, 0x1c, 0x18, 0xd0, 0x01, 0x20, 0xa9, 0x20, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r40; (p07) br.cond.dpnt.few 400000000019d9e0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xa0, 0x0c, 0xf2, 0x03, 0x30, 0x06, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r35=8,r40; ld1 r14=[r40]; shladd r41=r37,3,r41"; + let data = [0x08, 0x18, 0x21, 0x50, 0x00, 0x21, 0xe0, 0x00, 0xa0, 0x00, 0x20, 0x20, 0x55, 0x4a, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r37=r38,r37;; ld8 r15=[r35]; sxt1 r14=r14"; + let data = [0x0a, 0x28, 0x99, 0x4a, 0x00, 0x20, 0xf0, 0x00, 0x8c, 0x30, 0x20, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; st1 [r37]=r0; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x94, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r41]=r15; cmp4.eq p7,p6=84,r14; (p06) br.cond.dptk.few 400000000019d430 "; + let data = [0x10, 0x00, 0x3c, 0x52, 0x98, 0x11, 0x70, 0xa0, 0x3a, 0x0c, 0x73, 0x03, 0x40, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=1,r40;; ld1 r14=[r14]; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x04, 0x50, 0x00, 0x21, 0xe0, 0x00, 0x38, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r14,r36; (p06) br.cond.dpnt.few 400000000019d480 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x70, 0x90, 0x0e, 0x71, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r52=1080,r1; mov r51=r0; mov r53=0x5;;"; + let data = [0x09, 0xa0, 0xe1, 0x02, 0x08, 0x24, 0x30, 0x03, 0x00, 0x00, 0x42, 0xa0, 0x56, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r52=[r52]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0xa0, 0x01, 0x68, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x8f, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r51=r8; mov r1=r49; nop.i 0x0"; + let data = [0x08, 0x98, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xc4, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r52=r33; mov r53=r34; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0xa0, 0x01, 0x42, 0x00, 0x21, 0x50, 0x03, 0x88, 0x00, 0x42, 0x00, 0xe8, 0xf0, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r49; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x62, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r16=8,r32; mov r15=r40; extr r18=r32,8,8"; + let data = [0x08, 0x80, 0x20, 0x40, 0x00, 0x21, 0xf0, 0x00, 0xa0, 0x00, 0x42, 0x40, 0x12, 0x01, 0x1d, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=4,r40; cmp.eq p7,p6=0x0,r32; mov r36=r35;;"; + let data = [0x09, 0x70, 0x10, 0x50, 0x00, 0x21, 0x70, 0x00, 0x80, 0x0c, 0x72, 0x80, 0x04, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] add r40=r40,r16; mov r16=-0x9; nop.b 0x0"; + let data = [0x18, 0x40, 0xa1, 0x20, 0x00, 0x20, 0x00, 0xb9, 0xf3, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st4 [r14]=r32; nop.m 0x0; extr r17=r32,16,8;;"; + let data = [0x09, 0x00, 0x80, 0x1c, 0x90, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x12, 0x02, 0x1d, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r15]=r16,2; mov r14=r40; mov r16=21845;;"; + let data = [0x09, 0x10, 0x40, 0x1e, 0x80, 0x15, 0xe0, 0x00, 0xa0, 0x00, 0x42, 0x00, 0x52, 0x05, 0xa8, 0x92]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] st2 [r15]=r16; adds r16=2,r40; nop.b 0x0"; + let data = [0x18, 0x00, 0x40, 0x1e, 0x88, 0x11, 0x00, 0x11, 0xa0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r14]=r32,1; adds r40=3,r40; extr r15=r32,24,8;;"; + let data = [0x09, 0x08, 0x80, 0x1c, 0x80, 0x15, 0x80, 0x1a, 0xa0, 0x00, 0x42, 0xe0, 0x11, 0x03, 0x1d, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r14]=r18; st1 [r16]=r17; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x48, 0x1c, 0x80, 0x11, 0x00, 0x88, 0x40, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r40]=r15; nop.i 0x0; (p07) br.cond.dptk.few 400000000019d280 "; + let data = [0x10, 0x00, 0x3c, 0x50, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x80, 0xfd, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.ltu p6,p7=32,r32; (p06) br.cond.dptk.few 400000000019d7c0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x81, 0x0e, 0x6a, 0x03, 0xb0, 0x02, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.ltu p7,p6=7,r32;; (p07) adds r14=-0x1,r32; (p07) and r32=7,r32;;"; + let data = [0x0b, 0x38, 0x1c, 0x40, 0x06, 0xf5, 0xe1, 0xf8, 0x83, 0x7e, 0xc6, 0x03, 0x74, 0x00, 0xb1, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; (p07) shr.u r14=r14,3; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe1, 0x30, 0x38, 0x78, 0x29, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) mov r14=r0; nop.m 0x0; cmp.ltu p6,p7=7,r32;;"; + let data = [0xc9, 0x70, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x70, 0x00, 0x1d, 0xd4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dptk.few 400000000019d810 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0xc0, 0x02, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r15=-0x21; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0xf2, 0xff, 0x4f, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r35]=r15,1; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r14; nop.m 0x0; mov r15=-0x21;;"; + let data = [0x09, 0x30, 0x00, 0x1c, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0xf1, 0xe5, 0xff, 0x9f]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; st1 [r35]=r15; (p07) adds r35=1,r35"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x78, 0x8c, 0x00, 0xa3, 0x63, 0x14, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r15=-0x21; (p07) adds r14=-1,r14; (p06) br.cond.dpnt.few 400000000019d280 ;;"; + let data = [0x19, 0x78, 0x7c, 0xf9, 0xff, 0xe7, 0xe1, 0xf8, 0x3b, 0x7e, 0x46, 0x03, 0x20, 0xfc, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r35]=r15,1; nop.i 0x0; br.few 400000000019d580 "; + let data = [0x10, 0x08, 0x3c, 0x46, 0x80, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=4000000000026d00 <_init@@Base+0x1be0>;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x96, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st4 [r35]=r8; nop.m 0x0; mov r14=1023"; + let data = [0x08, 0x00, 0x20, 0x46, 0x90, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0xf1, 0x07, 0x1c, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r1=r49; mov r51=r0;; cmp4.lt p6,p7=r14,r8;;"; + let data = [0x03, 0x08, 0x00, 0x62, 0x00, 0x21, 0x30, 0x03, 0x00, 0x00, 0x42, 0xc0, 0xe0, 0x40, 0x1c, 0xc2]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; (p07) mov r14=1024; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe1, 0x00, 0x00, 0x10, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] (p07) st4 [r35]=r14; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = [0xf1, 0x00, 0x38, 0x46, 0x90, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x9c, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r14=[r35]; nop.m 0x0; mov r1=r49;;"; + let data = [0x09, 0x70, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] adds r16=-0x1,r14; sxt4 r15=r14;; sxt4 r16=r16;;"; + let data = [0x03, 0x80, 0xfc, 0x1d, 0x3f, 0x23, 0xf0, 0x00, 0x38, 0x2c, 0x00, 0x00, 0x02, 0x80, 0x58, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] and r16=r16,r8;; sub r36=r15,r16; nop.i 0x0;;"; + let data = [0x0b, 0x80, 0x40, 0x10, 0x0c, 0x20, 0x40, 0x7a, 0x40, 0x0a, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.lt p7,p6=r36,r0;; (p07) add r36=r36,r15; nop.i 0x0;;"; + let data = [0x0b, 0x38, 0x90, 0x00, 0x06, 0xf0, 0x41, 0x22, 0x3d, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0x0,r36; (p07) br.cond.dpnt.few 400000000019d850 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x90, 0x0e, 0xf2, 0x03, 0x40, 0x01, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r16=15832,r1; mov r17=7; mov.i ar.lc=22"; + let data = [0x08, 0x80, 0x60, 0x03, 0x7b, 0x24, 0x10, 0x39, 0x00, 0x00, 0x48, 0x00, 0x60, 0x09, 0x2a, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0;; ld8 r16=[r16]; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x40, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r18=[r16],8; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x41, 0x40, 0x30, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.ltu p7,p6=r18,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019d770 ;;"; + let data = [0x11, 0x38, 0x48, 0x1e, 0x06, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x20, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; adds r17=1,r17; br.cloop.sptk.few 400000000019d740 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x09, 0x44, 0x00, 0x42, 0xa0, 0xe0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r15=19712,r1; nop.m 0x0; extr r14=r14,1,31;;"; + let data = [0x09, 0x78, 0x00, 0x02, 0x9a, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x31, 0x70, 0x78, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] st4 [r15]=r17; adds r15=19,r32;; and r15=-0x8,r15;;"; + let data = [0x03, 0x00, 0x44, 0x1e, 0x90, 0x11, 0xf0, 0x98, 0x80, 0x00, 0x42, 0xe0, 0x81, 0x7f, 0xb0, 0x88]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; cmp.lt p7,p6=r14,r15; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x70, 0x3c, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; (p06) mov r36=1; (p06) br.cond.dptk.few 400000000019d200 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x80, 0x41, 0x0a, 0x00, 0x00, 0x48, 0x03, 0x60, 0xfa, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019d1e0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x30, 0xfa, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r52=223; nop.m 0x0; mov r53=r32"; + let data = [0x08, 0xa0, 0x7d, 0x01, 0x01, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x06, 0x00, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r51=r35; nop.m 0x0; br.call.sptk.many b0=4000000000026e60 <_init@@Base+0x1d40>;;"; + let data = [0x19, 0x98, 0x01, 0x46, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x98, 0x96, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r8=r36; mov r1=r49; mov.i ar.pfs=r48;;"; + let data = [0x09, 0x40, 0x00, 0x48, 0x00, 0x21, 0x10, 0x00, 0xc4, 0x00, 0x42, 0x00, 0x00, 0x03, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r50;; mov b0=r47"; + let data = [0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x90, 0x05, 0x55, 0x00, 0x00, 0xf0, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; adds r12=256,r12; br.ret.sptk.many b0"; + let data = [0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x00, 0x30, 0x04, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r15=1144,r1;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = [0x0b, 0x78, 0xe0, 0x03, 0x08, 0x24, 0xf0, 0x00, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r32=r32,3,r15;; ld8 r15=[r32]; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x81, 0x1e, 0x12, 0x20, 0xf0, 0x00, 0x80, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r15=r32,r15; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b6=r15; br.few b6;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x78, 0x04, 0x80, 0x03, 0x00, 0x60, 0x00, 0x80, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r51=r36; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = [0x11, 0x98, 0x01, 0x48, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0x9a, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=-0x1,r8; mov r1=r49; shr r14=r36,5"; + let data = [0x08, 0x30, 0xfc, 0x11, 0x07, 0x3b, 0x10, 0x00, 0xc4, 0x00, 0x42, 0xc0, 0xb1, 0x20, 0xe9, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] and r18=31,r36; mov r21=84; (p06) br.cond.dpnt.few 400000000019d270 ;;"; + let data = [0x19, 0x90, 0x7c, 0x48, 0x2c, 0x20, 0x50, 0xa1, 0x02, 0x00, 0x48, 0x03, 0x00, 0xfa, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.lt p6,p7=0x0,r14; addl r16=36704,r1; nop.i 0x0"; + let data = [0x08, 0x30, 0x00, 0x1c, 0x87, 0x31, 0x00, 0x01, 0x07, 0x3c, 0x4a, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r22=r14; add r18=r8,r18; mov r20=2;;"; + let data = [0x09, 0xb0, 0x00, 0x1c, 0x00, 0x21, 0x20, 0x41, 0x48, 0x00, 0x40, 0x80, 0x22, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; (p07) ld4 r14=[r35]; adds r19=32,r18"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0xc0, 0xe1, 0x00, 0x8c, 0x20, 0x20, 0x60, 0x02, 0x92, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0;; nop.m 0x0; (p07) sxt4 r15=r14"; + let data = [0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0xe3, 0x01, 0x70, 0x58, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r16=16,r16; nop.m 0x0; (p07) br.cond.dpnt.few 400000000019d720 ;;"; + let data = [0x19, 0x80, 0x40, 0x20, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x60, 0xfe, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r15=r18; st8 [r16]=r18; mov r16=84"; + let data = [0x08, 0x78, 0x00, 0x24, 0x00, 0x21, 0x00, 0x90, 0x40, 0x30, 0x23, 0x00, 0x42, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p6,p7=1,r22;; st1 [r15]=r16,1; mov r16=2;;"; + let data = [0x0b, 0x30, 0x04, 0x2c, 0x87, 0x39, 0x10, 0x80, 0x3c, 0x00, 0x2b, 0x00, 0x22, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r15]=r16; mov r16=r18; (p06) br.cond.dpnt.few 400000000019d9a0 ;;"; + let data = [0x11, 0x00, 0x40, 0x1e, 0x80, 0x11, 0x00, 0x01, 0x48, 0x00, 0x42, 0x03, 0xb0, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r14=-0x2,r14; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0xf0, 0x3b, 0x7e, 0x46, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] addp4 r15=r14,r0; mov r14=r19;; mov.i ar.lc=r15;;"; + let data = [0x03, 0x78, 0x38, 0x00, 0x08, 0x20, 0xe0, 0x00, 0x4c, 0x00, 0x42, 0x00, 0xf0, 0x08, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] sub r17=r14,r19; nop.m 0x0; mov r15=r14"; + let data = [0x08, 0x88, 0x38, 0x26, 0x05, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0x01, 0x70, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] adds r16=32,r16; adds r14=32,r14;; add r17=r18,r17;;"; + let data = [0x03, 0x80, 0x80, 0x20, 0x00, 0x21, 0xe0, 0x00, 0x39, 0x00, 0x42, 0x20, 0x22, 0x89, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r17=8,r17; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x41, 0x44, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r17]=r16; st1 [r15]=r21,1; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x40, 0x22, 0x98, 0x11, 0x10, 0xa8, 0x3c, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r15]=r20; nop.i 0x0; br.cloop.sptk.few 400000000019d920 "; + let data = [0x10, 0x00, 0x50, 0x1e, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0xc0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x2,r22;; addp4 r14=r14,r0; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0xf8, 0x2d, 0x3f, 0x23, 0xe0, 0x70, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] adds r14=1,r14; nop.i 0x0;; shl r14=r14,5;;"; + let data = [0x03, 0x70, 0x04, 0x1c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0xe1, 0xd0, 0xe9, 0x53]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r18=r18,r14; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x90, 0x48, 0x1c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r18=8,r18; ld4 r14=[r35]; nop.b 0x0"; + let data = [0x18, 0x90, 0x20, 0x24, 0x00, 0x21, 0xe0, 0x00, 0x8c, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r16=15832,r1; mov r17=7; mov.i ar.lc=22;;"; + let data = [0x09, 0x80, 0x60, 0x03, 0x7b, 0x24, 0x10, 0x39, 0x00, 0x00, 0x48, 0x00, 0x60, 0x09, 0x2a, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; st8 [r18]=r0; sxt4 r15=r14"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x30, 0x23, 0xe0, 0x01, 0x70, 0x58, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; ld8 r16=[r16]; br.few 400000000019d740 "; + let data = [0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x40, 0x30, 0x20, 0x00, 0x70, 0xfd, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=17068,r1;; nop.m 0x0; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0xb0, 0x02, 0x85, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld4 r14=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r14; (p06) br.cond.dptk.few 400000000019da60 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x0c, 0x73, 0x03, 0x60, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r51=2; nop.i 0x0; br.call.sptk.many b0=40000000000bf7c0 ;;"; + let data = [0x11, 0x98, 0x09, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0x1d, 0xf2, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p7,p6=0x0,r8; mov r1=r49; (p06) br.cond.dptk.few 400000000019da60 "; + let data = [0x10, 0x38, 0x00, 0x10, 0x86, 0x39, 0x10, 0x00, 0xc4, 0x00, 0x42, 0x03, 0x40, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r51=17; nop.i 0x0; br.call.sptk.many b0=40000000000bf7c0 ;;"; + let data = [0x11, 0x98, 0x45, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x98, 0x1d, 0xf2, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.eq p6,p7=0x0,r8; nop.m 0x0; mov r1=r49;;"; + let data = [0x09, 0x30, 0x00, 0x10, 0x87, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; (p06) mov r44=r0; (p06) br.cond.dptk.few 400000000019dab0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc1, 0x02, 0x00, 0x00, 0x42, 0x03, 0x60, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] adds r51=144,r12; mov r44=1; br.call.sptk.many b0=4000000000026d40 <_init@@Base+0x1c20>;;"; + let data = [0x11, 0x98, 0x41, 0x18, 0x01, 0x21, 0xc0, 0x0a, 0x00, 0x00, 0x48, 0x00, 0xe8, 0x92, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r1=r49; adds r51=16,r12; br.call.sptk.many b0=40000000000270a0 <_init@@Base+0x1f80>;;"; + let data = [0x11, 0x08, 0x00, 0x62, 0x00, 0x21, 0x30, 0x83, 0x30, 0x00, 0x42, 0x00, 0x38, 0x96, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r49; mov r51=r0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x62, 0x00, 0x21, 0x30, 0x03, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r52=144,r12; adds r53=16,r12; br.call.sptk.many b0=4000000000026100 <_init@@Base+0xfe0>;;"; + let data = [0x19, 0xa0, 0x41, 0x18, 0x01, 0x21, 0x50, 0x83, 0x30, 0x00, 0x42, 0x00, 0x78, 0x86, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r49; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x62, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r14=r37,3,r0;; add r15=r39,r14; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x94, 0x00, 0x12, 0x20, 0xf0, 0x38, 0x39, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r40=[r15]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.lt p6,p7=r40,r0; mov r43=r40; (p06) br.cond.dpnt.few 400000000019df20 ;;"; + let data = [0x11, 0x30, 0xa0, 0x00, 0x07, 0x30, 0xb0, 0x02, 0xa0, 0x00, 0x42, 0x03, 0x50, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.lt p7,p6=1,r36; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e040 ;;"; + let data = [0x11, 0x38, 0x04, 0x48, 0x86, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x60, 0x05, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] ld4 r15=[r42]; cmp4.lt p7,p6=10,r36;; cmp4.lt p8,p9=13,r15;;"; + let data = [0x03, 0x78, 0x00, 0x54, 0x10, 0x10, 0x70, 0x50, 0x90, 0x0c, 0x63, 0x00, 0xd1, 0x78, 0x24, 0xc6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; (p09) mov r15=14; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x40, 0xf2, 0x70, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dptk.few 400000000019e190 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x80, 0x06, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r14=1,r36; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x08, 0x90, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=r15,r14; (p06) br.cond.dpnt.few 400000000019dba0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x78, 0x38, 0x0e, 0x61, 0x03, 0x70, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r16=r14;; add r17=r38,r16;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x38, 0x2c, 0x00, 0x20, 0x62, 0x82, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r17=[r17];; nop.m 0x0; sxt1 r17=r17;;"; + let data = [0x0b, 0x88, 0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x02, 0x88, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r17; (p06) br.cond.dptk.few 400000000019e150 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x44, 0x0c, 0x73, 0x03, 0xf0, 0x05, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r16=r16,3,r41;; ld8 r16=[r16]; nop.i 0x0;;"; + let data = [0x0b, 0x80, 0x40, 0x52, 0x12, 0x20, 0x00, 0x01, 0x40, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r16; (p07) br.cond.dpnt.few 400000000019e150 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x40, 0x0c, 0xf2, 0x03, 0xd0, 0x05, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.lt p6,p7=r15,r14; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x30, 0x3c, 0x1c, 0x87, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] cmp4.lt p8,p9=r36,r14; mov r52=r40;; (p06) cmp4.eq.or.andcm p9,p8=0x0,r0;;"; + let data = [0x03, 0x40, 0x90, 0x1c, 0x89, 0x30, 0x40, 0x03, 0xa0, 0x00, 0x42, 0x23, 0x01, 0x00, 0x20, 0xe7]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; (p09) shladd r14=r37,3,r41; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x40, 0xe2, 0x28, 0xa5, 0x24, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] (p09) ld8 r42=[r14]; nop.i 0x0; (p09) br.cond.dpnt.few 400000000019dd30 ;;"; + let data = [0x31, 0x51, 0x01, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x80, 0x04, 0x70, 0x01, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] shladd r15=r14,3,r0; add r16=r38,r14;; add r14=r41,r15"; + let data = [0x02, 0x78, 0x38, 0x00, 0x12, 0x20, 0x00, 0x31, 0x39, 0x00, 0x40, 0xc0, 0x91, 0x7a, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r15=r39,r15; st1 [r16]=r0; nop.i 0x0;;"; + let data = [0x09, 0x78, 0x9c, 0x1e, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r42=[r14]; ld8 r51=[r15]; nop.i 0x0;;"; + let data = [0x09, 0x50, 0x01, 0x1c, 0x18, 0x10, 0x30, 0x03, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r15=8,r42;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = [0x0b, 0x78, 0x20, 0x54, 0x00, 0x21, 0xf0, 0x00, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r15; nop.i 0x0; br.call.sptk.many b0=400000000019f2a0 ;;"; + let data = [0x11, 0x00, 0x3c, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x88, 0x16, 0x00, 0x50]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r14=r42; mov r15=84; sxt1 r17=r36"; + let data = [0x08, 0x70, 0x00, 0x54, 0x00, 0x21, 0xf0, 0xa0, 0x02, 0x00, 0x48, 0x20, 0x02, 0x20, 0x51, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r16=r37,3,r41; nop.m 0x0; mov r1=r49;;"; + let data = [0x09, 0x80, 0x94, 0x52, 0x12, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; st1 [r14]=r15,1; adds r15=-0x1,r8"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x78, 0x38, 0x00, 0x2b, 0xe0, 0xf1, 0x47, 0xfc, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r16]=r42;; nop.m 0x0; cmp4.lt p7,p6=0x0,r15"; + let data = [0x0a, 0x00, 0xa8, 0x20, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0x00, 0x78, 0x18, 0xc6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; st1 [r14]=r17; (p06) br.cond.dpnt.few 400000000019e3e0 ;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x88, 0x38, 0x00, 0x23, 0x03, 0x70, 0x07, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) adds r15=-0x1,r15; (p07) mov r14=r42; (p07) mov r18=84;;"; + let data = [0xe9, 0x78, 0xfc, 0x1f, 0x3f, 0xe3, 0xe1, 0x00, 0xa8, 0x00, 0xc2, 0x43, 0x42, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] (p07) addp4 r15=r15,r0; nop.i 0x0;; (p07) mov.i ar.lc=r15"; + let data = [0xe2, 0x78, 0x3c, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0xf0, 0x08, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] add r15=r14,r40; adds r16=8,r14;; mov r14=r15"; + let data = [0x02, 0x78, 0x38, 0x50, 0x00, 0x20, 0x00, 0x41, 0x38, 0x00, 0x42, 0xc0, 0x01, 0x78, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r16]=r15;; st1 [r14]=r18,1; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x3c, 0x20, 0x98, 0x11, 0x10, 0x90, 0x38, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r14]=r17; nop.i 0x0; br.cloop.sptk.few 400000000019e180 "; + let data = [0x10, 0x00, 0x44, 0x1c, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0xc0, 0x04, 0x00, 0x40]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x2,r8; setf.sig f7=r40; nop.i 0x0;;"; + let data = [0x09, 0x70, 0xf8, 0x11, 0x3f, 0x23, 0x70, 0x40, 0x01, 0xc2, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addp4 r14=r14,r0;; setf.sig f6=r14; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x38, 0x00, 0x08, 0x20, 0x60, 0x70, 0x00, 0xc2, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMF] nop.m 0x0; nop.m 0x0; xma.l f6=f6,f7,f7;;"; + let data = [0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x70, 0x30, 0x1c, 0xe8]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] getf.sig r14=f6;; add r14=r42,r14; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x18, 0x00, 0xe1, 0x10, 0xe0, 0x50, 0x39, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r14=8,r14; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x40, 0x38, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r14]=r0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r42; (p06) br.cond.dptk.few 400000000019df20 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xa8, 0x0c, 0x72, 0x03, 0xf0, 0x01, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r14=19712,r1;; ld4 r14=[r14]; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x00, 0x02, 0x9a, 0x24, 0xe0, 0x00, 0x38, 0x20, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r14=-0x1,r14; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0xf8, 0x3b, 0x7e, 0x46, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=r36,r14; (p07) br.cond.dptk.few 400000000019e040 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x20, 0x39, 0x0e, 0xe1, 0x03, 0xe0, 0x02, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r45=-0x1,r36;; nop.m 0x0; sxt4 r45=r45;;"; + let data = [0x0b, 0x68, 0xfd, 0x49, 0x3f, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x05, 0x68, 0x59, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r15=r38,r45;; ld1 r14=[r15]; nop.i 0x0;;"; + let data = [0x0b, 0x78, 0x98, 0x5a, 0x00, 0x20, 0xe0, 0x00, 0x3c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt1 r14=r14; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x38, 0x28, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r14; (p06) br.cond.dptk.few 400000000019e040 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x0c, 0x73, 0x03, 0xa0, 0x02, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r16=r45,3,r0;; add r14=r41,r16; add r16=r39,r16;;"; + let data = [0x0b, 0x80, 0xb4, 0x00, 0x12, 0x20, 0xe0, 0x48, 0x41, 0x00, 0x40, 0x00, 0x72, 0x82, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] ld8 r14=[r14]; nop.i 0x0;; adds r17=8,r14"; + let data = [0x02, 0x70, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x82, 0x70, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] cmp.eq p6,p7=0x0,r14; mov r46=r14; (p06) br.cond.dpnt.few 400000000019e040 ;;"; + let data = [0x19, 0x30, 0x00, 0x1c, 0x07, 0x39, 0xe0, 0x02, 0x38, 0x00, 0x42, 0x03, 0x70, 0x02, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r42=[r17]; nop.m 0x0; mov r17=1;;"; + let data = [0x09, 0x50, 0x01, 0x22, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x12, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r15]=r17; ld8 r15=[r16]; cmp.eq p6,p7=0x0,r42"; + let data = [0x08, 0x00, 0x44, 0x1e, 0x80, 0x11, 0xf0, 0x00, 0x40, 0x30, 0x20, 0xc0, 0x00, 0x50, 0x1d, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; nop.m 0x0; (p06) br.cond.dpnt.few 400000000019e020 ;;"; + let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x20, 0x02, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r16=r14,r15; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x71, 0x3c, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=r16,r42; (p06) br.cond.dpnt.few 400000000019e400 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x80, 0xa8, 0x0e, 0x70, 0x03, 0xe0, 0x05, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r39=r42; nop.m 0x0; adds r42=8,r42;;"; + let data = [0x09, 0x38, 0x01, 0x54, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x40, 0x85, 0x50, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r42=[r42]; nop.m 0x0; add r16=r39,r15;;"; + let data = [0x09, 0x50, 0x01, 0x54, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x72, 0x7a, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p6,p7=0x0,r42; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e020 ;;"; + let data = [0x11, 0x30, 0x00, 0x54, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xd0, 0x01, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p7,p6=r16,r42; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019e290 ;;"; + let data = [0x11, 0x38, 0x40, 0x54, 0x06, 0x38, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x30, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov r46=r39; br.few 400000000019de30 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x02, 0x9c, 0x00, 0x42, 0x00, 0xc0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r14=r15; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x1e, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] add r15=r14,r40; adds r16=8,r14;; mov r14=r15"; + let data = [0x02, 0x78, 0x38, 0x50, 0x00, 0x20, 0x00, 0x41, 0x38, 0x00, 0x42, 0xc0, 0x01, 0x78, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r16]=r15;; st1 [r14]=r18,1; nop.i 0x0;;"; + let data = [0x0b, 0x00, 0x3c, 0x20, 0x98, 0x11, 0x10, 0x90, 0x38, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r14]=r17; nop.i 0x0; br.cloop.sptk.few 400000000019de80 "; + let data = [0x10, 0x00, 0x44, 0x1c, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0xd0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x2,r35; setf.sig f6=r40; nop.i 0x0;;"; + let data = [0x09, 0x70, 0xf8, 0x47, 0x3f, 0x23, 0x60, 0x40, 0x01, 0xc2, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addp4 r14=r14,r0;; setf.sig f8=r14; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x38, 0x00, 0x08, 0x20, 0x80, 0x70, 0x00, 0xc2, 0x31, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMF] nop.m 0x0; nop.m 0x0; xma.l f8=f8,f6,f6;;"; + let data = [0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x61, 0x40, 0x18, 0xe8]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] getf.sig r40=f8;; add r8=r8,r40; nop.i 0x0;;"; + let data = [0x0b, 0x40, 0x21, 0x00, 0xe1, 0x10, 0x80, 0x40, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r8=8,r8; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x40, 0x20, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st8 [r8]=r0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x10, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r44; (p07) br.cond.dpnt.few 400000000019dfa0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0xb0, 0x0e, 0xf3, 0x03, 0x80, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r14=r37,3,r41;; ld8 r40=[r14]; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x94, 0x52, 0x12, 0x20, 0x80, 0x02, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p7,p6=0x0,r40; nop.i 0x0; (p06) br.cond.dptk.few 400000000019d3c0 ;;"; + let data = [0x11, 0x38, 0x00, 0x50, 0x06, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x80, 0xf4, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) add r37=r38,r37; nop.m 0x0; (p07) mov r36=r0;;"; + let data = [0xe9, 0x28, 0x99, 0x4a, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x80, 0x83, 0x04, 0x00, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) st1 [r37]=r0; nop.m 0x0; nop.i 0x0"; + let data = [0xe8, 0x00, 0x00, 0x4a, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r8=r36; mov.i ar.pfs=r48;; mov.i ar.lc=r50;;"; + let data = [0x03, 0x40, 0x00, 0x48, 0x00, 0x21, 0x00, 0x80, 0x01, 0x55, 0x00, 0x00, 0x20, 0x0b, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov b0=r47; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x78, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r12=256,r12; nop.m 0x0; br.ret.sptk.many b0;;"; + let data = [0x19, 0x60, 0x00, 0x18, 0x02, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r51=2; nop.m 0x0; adds r52=16,r12"; + let data = [0x08, 0x98, 0x09, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x06, 0x61, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r53=r0; nop.m 0x0; br.call.sptk.many b0=4000000000026100 <_init@@Base+0xfe0>;;"; + let data = [0x19, 0xa8, 0x01, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x58, 0x81, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r14=r37,3,r41; nop.m 0x0; mov r1=r49;;"; + let data = [0x09, 0x70, 0x94, 0x52, 0x12, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r40=[r14]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p7,p6=0x0,r40; nop.i 0x0; (p06) br.cond.dptk.few 400000000019d3c0 ;;"; + let data = [0x11, 0x38, 0x00, 0x50, 0x06, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xe0, 0xf3, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) add r37=r38,r37; nop.m 0x0; (p07) mov r36=r0;;"; + let data = [0xe9, 0x28, 0x99, 0x4a, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x80, 0x83, 0x04, 0x00, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) st1 [r37]=r0; nop.m 0x0; nop.i 0x0"; + let data = [0xe8, 0x00, 0x00, 0x4a, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019df70 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x60, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r45=r38,r45; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x32, 0xb5, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r45]=r0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x5a, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r15=[r35];; nop.m 0x0; sxt4 r14=r15;;"; + let data = [0x0b, 0x78, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x78, 0x58, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.lt p6,p7=r14,r40; (p06) br.cond.dptk.few 400000000019e250 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x70, 0xa0, 0x0e, 0x60, 0x03, 0x00, 0x02, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r51=r14; nop.m 0x0; mov r52=r40"; + let data = [0x08, 0x98, 0x01, 0x1c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x06, 0x40, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r43=r14; nop.m 0x0; br.call.sptk.many b0=400000000019f0b0 ;;"; + let data = [0x19, 0x58, 0x01, 0x1c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x48, 0x10, 0x00, 0x50]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; mov r35=r8; mov r1=r49"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x02, 0x20, 0x00, 0x42, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r51=r43; nop.i 0x0; br.call.sptk.many b0=4000000000027340 <_init@@Base+0x2220>;;"; + let data = [0x11, 0x98, 0x01, 0x56, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0x92, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=-0x1,r8; and r14=7,r8; mov r1=r49"; + let data = [0x08, 0x30, 0xfc, 0x11, 0x07, 0x3b, 0xe0, 0x38, 0x20, 0x58, 0x40, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r18=84; sxt1 r17=r36; (p06) br.cond.dpnt.few 400000000019df20 ;;"; + let data = [0x11, 0x90, 0x50, 0x01, 0x00, 0x24, 0x10, 0x01, 0x90, 0x28, 0x00, 0x03, 0x70, 0xfe, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r14; nop.m 0x0; shladd r16=r37,3,r41;;"; + let data = [0x09, 0x30, 0x00, 0x1c, 0x07, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x52, 0x4a, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) adds r35=-0x1,r35; nop.m 0x0; (p07) adds r8=7,r8;;"; + let data = [0xe9, 0x18, 0xfd, 0x47, 0x3f, 0x23, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x71, 0x40, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] adds r15=-0x1,r35; (p07) and r8=-0x8,r8;; cmp4.lt p7,p6=0x0,r15"; + let data = [0x02, 0x78, 0xfc, 0x47, 0x3f, 0xe3, 0x81, 0xc0, 0x23, 0x58, 0x44, 0xe0, 0x00, 0x78, 0x18, 0xc6]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r14=r8; st8 [r16]=r8; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x10, 0x00, 0x21, 0x00, 0x40, 0x40, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) adds r15=-0x1,r15; st1 [r14]=r18,1; nop.i 0x0;;"; + let data = [0xe9, 0x78, 0xfc, 0x1f, 0x3f, 0x23, 0x10, 0x90, 0x38, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) addp4 r15=r15,r0; st1 [r14]=r17; (p07) mov r14=r8;;"; + let data = [0xe9, 0x78, 0x3c, 0x00, 0x08, 0x20, 0x00, 0x88, 0x38, 0x00, 0xa3, 0xc3, 0x01, 0x40, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; (p07) mov.i ar.lc=r15; (p07) br.cond.dptk.few 400000000019de90 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x01, 0x78, 0x04, 0x55, 0x80, 0x03, 0x70, 0xfd, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r8=8,r8; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x40, 0x20, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r8]=r0; nop.i 0x0; br.few 400000000019df20 "; + let data = [0x10, 0x00, 0x00, 0x10, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe0, 0xfd, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r14=1,r14; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x08, 0x38, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p7,p6=r15,r14; (p06) br.cond.dptk.few 400000000019db40 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x78, 0x38, 0x0c, 0x61, 0x03, 0xe0, 0xf9, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=r0,r0; br.few 400000000019dba0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x00, 0x0e, 0x70, 0x00, 0x30, 0xfa, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov r14=r15; br.few 400000000019dca0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00, 0x3c, 0x00, 0x42, 0x00, 0x20, 0xfb, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp4.lt p6,p7=r36,r15; nop.m 0x0; sub r16=r36,r15;;"; + let data = [0x09, 0x30, 0x90, 0x1e, 0x87, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x42, 0x7a, 0x14, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) add r14=r41,r14; nop.m 0x0; andcm r16=-0x1,r16;;"; + let data = [0xe9, 0x70, 0xa4, 0x1c, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf2, 0x87, 0xb4, 0x88]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) ld8 r42=[r14]; addp4 r16=r16,r0; mov r14=r15;;"; + let data = [0xe9, 0x50, 0x01, 0x1c, 0x18, 0x10, 0x00, 0x81, 0x00, 0x10, 0x40, 0xc0, 0x01, 0x78, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019dd30 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x70, 0xfb, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.lc=r16; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x04, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r16=r14;; add r17=r38,r16;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x38, 0x2c, 0x00, 0x20, 0x62, 0x82, 0x00, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r17=[r17];; nop.m 0x0; sxt1 r17=r17;;"; + let data = [0x0b, 0x88, 0x00, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x02, 0x88, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r17; (p06) br.cond.dptk.few 400000000019e230 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x44, 0x0c, 0x73, 0x03, 0x30, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r16=r16,3,r41;; ld8 r16=[r16]; nop.i 0x0;;"; + let data = [0x0b, 0x80, 0x40, 0x52, 0x12, 0x20, 0x00, 0x01, 0x40, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r16; (p06) br.cond.dptk.few 400000000019db90 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x40, 0x0c, 0x72, 0x03, 0x70, 0xf9, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; adds r14=-0x1,r14; br.cloop.sptk.few 400000000019e1e0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0xf8, 0x3b, 0x7e, 0x46, 0xa0, 0xb0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.lt p6,p7=r15,r14; br.few 400000000019dba0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x78, 0x38, 0x0e, 0x61, 0x00, 0x60, 0xf9, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; adds r15=-0x1,r15; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0xf8, 0x3f, 0x7e, 0x46, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r15=r15;; and r15=r15,r40;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x3c, 0x2c, 0x00, 0xe0, 0xf1, 0x40, 0x31, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r15;; (p07) add r14=r40,r14; (p07) mov r35=1;;"; + let data = [0x0b, 0x30, 0x00, 0x1e, 0x07, 0xf9, 0xe1, 0x40, 0x39, 0x00, 0xc0, 0x63, 0x14, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] (p07) sub r43=r14,r15; (p06) mov r35=1; br.few 400000000019e090 "; + let data = [0xf0, 0x58, 0x39, 0x1e, 0x05, 0xa0, 0x31, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x10, 0xfe, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=r46,r39; nop.m 0x0; addl r51=1072,r1"; + let data = [0x08, 0x30, 0xb8, 0x4e, 0x07, 0x38, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x06, 0x0b, 0x20, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r52=r0; nop.m 0x0; mov r53=r0;;"; + let data = [0x09, 0xa0, 0x01, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) mov r46=r39; ld8 r51=[r51]; nop.i 0x0;;"; + let data = [0xc9, 0x70, 0x01, 0x4e, 0x00, 0x21, 0x30, 0x03, 0xcc, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e330 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x70, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r15=8,r46;; ld8 r15=[r15]; nop.i 0x0;;"; + let data = [0x0b, 0x78, 0x20, 0x5c, 0x00, 0x21, 0xf0, 0x00, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p6,p7=r15,r39; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e330 ;;"; + let data = [0x11, 0x30, 0x3c, 0x4e, 0x07, 0x38, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x50, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; add r14=r38,r45; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x30, 0xb5, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r14]=r0; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x11, 0x00, 0x00, 0x1c, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x48, 0xe2, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r14=r45,3,r41; nop.m 0x0; mov r1=r49;;"; + let data = [0x09, 0x70, 0xb4, 0x52, 0x12, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x88, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r14=[r14]; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p7,p6=r14,r39; adds r42=8,r42; mov r17=84"; + let data = [0x08, 0x38, 0x38, 0x4e, 0x06, 0x38, 0xa0, 0x42, 0xa8, 0x00, 0x42, 0x20, 0x42, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r16=8,r39;; (p07) ld8 r15=[r42]; (p07) shladd r14=r45,3,r41"; + let data = [0x0a, 0x80, 0x20, 0x4e, 0x00, 0xe1, 0xf1, 0x00, 0xa8, 0x30, 0xa0, 0xc3, 0xd1, 0x4a, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) adds r46=8,r46; nop.m 0x0; add r45=r38,r45;;"; + let data = [0xc9, 0x70, 0x21, 0x5c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x65, 0x6a, 0x01, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) ld8 r14=[r42]; st1 [r45]=r0; nop.i 0x0;;"; + let data = [0xc9, 0x70, 0x00, 0x54, 0x18, 0x10, 0x00, 0x00, 0xb4, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) st8 [r14]=r15; (p06) st8 [r46]=r14; nop.i 0x0"; + let data = [0xe8, 0x00, 0x3c, 0x1c, 0x98, 0x91, 0x01, 0x70, 0xb8, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r15=r37,3,r41; mov r14=r39; cmp.eq p7,p6=0x0,r39;;"; + let data = [0x09, 0x78, 0x94, 0x52, 0x12, 0x20, 0xe0, 0x00, 0x9c, 0x00, 0x42, 0xe0, 0x00, 0x38, 0x19, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r14]=r17,1; ld8 r17=[r15]; nop.i 0x0"; + let data = [0x08, 0x08, 0x44, 0x1c, 0x80, 0x15, 0x10, 0x01, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] st8 [r15]=r39; nop.i 0x0;; nop.i 0x0"; + let data = [0x02, 0x00, 0x9c, 0x1e, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] st1 [r14]=r36; st8 [r16]=r17; (p07) br.cond.dpnt.few 400000000019e040 "; + let data = [0x18, 0x00, 0x90, 0x1c, 0x80, 0x11, 0x00, 0x88, 0x40, 0x30, 0xa3, 0x03, 0x90, 0xfc, 0xff, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r44; (p06) br.cond.dptk.few 400000000019df30 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0xb0, 0x0e, 0x73, 0x03, 0x70, 0xfb, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019dfa0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd0, 0xfb, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r14=r42;; adds r14=8,r14; nop.i 0x0;;"; + let data = [0x0b, 0x70, 0x00, 0x54, 0x00, 0x21, 0xe0, 0x40, 0x38, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st8 [r14]=r0; nop.i 0x0; br.few 400000000019dd30 "; + let data = [0x10, 0x00, 0x00, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0xf9, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r39=r14; adds r42=8,r42; mov r17=84;;"; + let data = [0x09, 0x38, 0x01, 0x1c, 0x00, 0x21, 0xa0, 0x42, 0xa8, 0x00, 0x42, 0x20, 0x42, 0x05, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p7,p6=r14,r39; nop.m 0x0; adds r16=8,r39;;"; + let data = [0x09, 0x38, 0x38, 0x4e, 0x06, 0x38, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x82, 0x38, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) ld8 r15=[r42]; nop.m 0x0; (p07) shladd r14=r45,3,r41"; + let data = [0xe8, 0x78, 0x00, 0x54, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x80, 0xc3, 0xd1, 0x4a, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) adds r46=8,r46; nop.m 0x0; add r45=r38,r45;;"; + let data = [0xc9, 0x70, 0x21, 0x5c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x65, 0x6a, 0x01, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p06) ld8 r14=[r42]; st1 [r45]=r0; nop.i 0x0;;"; + let data = [0xc9, 0x70, 0x00, 0x54, 0x18, 0x10, 0x00, 0x00, 0xb4, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) st8 [r14]=r15; (p06) st8 [r46]=r14; nop.i 0x0"; + let data = [0xe8, 0x00, 0x3c, 0x1c, 0x98, 0x91, 0x01, 0x70, 0xb8, 0x30, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r15=r37,3,r41; mov r14=r39; cmp.eq p7,p6=0x0,r39;;"; + let data = [0x09, 0x78, 0x94, 0x52, 0x12, 0x20, 0xe0, 0x00, 0x9c, 0x00, 0x42, 0xe0, 0x00, 0x38, 0x19, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r14]=r17,1; ld8 r17=[r15]; nop.i 0x0"; + let data = [0x08, 0x08, 0x44, 0x1c, 0x80, 0x15, 0x10, 0x01, 0x3c, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] st8 [r15]=r39; nop.i 0x0;; nop.i 0x0"; + let data = [0x02, 0x00, 0x9c, 0x1e, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] st1 [r14]=r36; st8 [r16]=r17; (p06) br.cond.dptk.few 400000000019e3c0 "; + let data = [0x18, 0x00, 0x90, 0x1c, 0x80, 0x11, 0x00, 0x88, 0x40, 0x30, 0x23, 0x03, 0x30, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019e040 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa0, 0xfb, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] alloc r37=ar.pfs,10,7,0; mov r38=r1; mov r36=b0"; + let data = [0x08, 0x28, 0x29, 0x0e, 0x80, 0x05, 0x60, 0x02, 0x04, 0x00, 0x42, 0x80, 0x04, 0x00, 0xc4, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r39=r33,r32; mov r40=r34; mov r41=r35;;"; + let data = [0x09, 0x38, 0x85, 0x40, 0x00, 0x20, 0x80, 0x02, 0x88, 0x00, 0x42, 0x20, 0x05, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=400000000019d180 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa8, 0xec, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r8; sub r14=r0,r32; nop.i 0x0"; + let data = [0x08, 0x30, 0x00, 0x10, 0x07, 0x39, 0xe0, 0x00, 0x80, 0x0a, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] adds r32=-0x1,r32; mov r1=r38; (p06) br.cond.dpnt.few 400000000019e550 ;;"; + let data = [0x19, 0x00, 0xfd, 0x41, 0x3f, 0x23, 0x10, 0x00, 0x98, 0x00, 0x42, 0x03, 0x50, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] add r15=r8,r32; and r32=r32,r8;; cmp.eq p6,p7=0x0,r32"; + let data = [0x02, 0x78, 0x20, 0x40, 0x00, 0x20, 0x00, 0x02, 0x21, 0x18, 0x40, 0xc0, 0x00, 0x00, 0x1d, 0xe4]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] and r14=r14,r15;; (p07) sub r17=r14,r8; (p07) adds r15=-0x8,r14"; + let data = [0x0a, 0x70, 0x38, 0x1e, 0x0c, 0xe0, 0x11, 0x71, 0x20, 0x0a, 0xc0, 0xe3, 0x81, 0x77, 0xfc, 0x8c]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) adds r16=-0x4,r14; (p07) mov r8=r14; (p07) mov r14=-0x2a;;"; + let data = [0xe9, 0x80, 0xf0, 0x1d, 0x3f, 0xe3, 0x81, 0x00, 0x38, 0x00, 0xc2, 0xc3, 0x61, 0xe5, 0xff, 0x9f]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] (p07) st4 [r16]=r17; (p07) st1 [r15]=r14; nop.i 0x0"; + let data = [0xe8, 0x00, 0x44, 0x20, 0x90, 0xd1, 0x01, 0x70, 0x3c, 0x00, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r37; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x28, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r36; br.ret.sptk.many b0;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] alloc r47=ar.pfs,20,17,0; cmp.eq p7,p6=0x0,r33; nop.b 0x0"; + let data = [0x18, 0x78, 0x51, 0x22, 0x80, 0x05, 0x70, 0x00, 0x84, 0x0c, 0x72, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] adds r14=-0x7,r32; mov r46=b0; mov r48=r1;;"; + let data = [0x01, 0x70, 0xe4, 0x41, 0x3f, 0x23, 0xe0, 0x02, 0x00, 0x62, 0x00, 0x00, 0x06, 0x08, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019eab0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x10, 0x05, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p7,p6=0x0,r32; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019eaf0 ;;"; + let data = [0x11, 0x38, 0x00, 0x40, 0x06, 0x39, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x40, 0x05, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] ld1 r39=[r14]; adds r14=-0x8,r32;; sxt1 r39=r39;;"; + let data = [0x03, 0x38, 0x01, 0x1c, 0x00, 0x10, 0xe0, 0xc0, 0x83, 0x7e, 0x46, 0xe0, 0x04, 0x38, 0x51, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.lt p7,p6=29,r39; nop.i 0x0; (p07) br.cond.dpnt.few 400000000019ea50 ;;"; + let data = [0x11, 0x38, 0x74, 0x4e, 0x86, 0x31, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x80, 0x04, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r14];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=-0x9,r14; (p06) br.cond.dpnt.few 400000000019e650 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0xb8, 0x3b, 0x0e, 0x77, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r50=1088,r1; mov r49=r0; mov r51=0x5;;"; + let data = [0x09, 0x90, 0x01, 0x03, 0x08, 0x24, 0x10, 0x03, 0x00, 0x00, 0x42, 0x60, 0x56, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r50=[r50]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x90, 0x01, 0x64, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0x7d, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r49=r8; mov r1=r48; nop.i 0x0"; + let data = [0x08, 0x88, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xc0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0x90, 0x01, 0x44, 0x00, 0x21, 0x30, 0x03, 0x8c, 0x00, 0x42, 0x00, 0x18, 0xdf, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x08, 0x00, 0x60, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x6,r32; mov r15=21845; nop.i 0x0"; + let data = [0x08, 0x70, 0xe8, 0x41, 0x3f, 0x23, 0xf0, 0xa8, 0x02, 0x54, 0x49, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r49=1040,r1; mov r50=r34; mov r51=r35;;"; + let data = [0x09, 0x88, 0x41, 0x02, 0x08, 0x24, 0x20, 0x03, 0x88, 0x00, 0x42, 0x60, 0x06, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld2 r14=[r14]; ld8 r49=[r49]; nop.i 0x0;;"; + let data = [0x09, 0x70, 0x00, 0x1c, 0x08, 0x10, 0x10, 0x03, 0xc4, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp4.eq p6,p7=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few 400000000019e6b0 ;;"; + let data = [0x11, 0x30, 0x38, 0x1e, 0x87, 0x38, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x30, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0xde, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x08, 0x00, 0x60, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r43=-0x4,r32; addl r40=1152,r1; sxt4 r15=r39;;"; + let data = [0x09, 0x58, 0xf1, 0x41, 0x3f, 0x23, 0x80, 0x02, 0x04, 0x12, 0x48, 0xe0, 0x01, 0x38, 0x59, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r36=[r43]; ld8 r40=[r40]; nop.i 0x0;;"; + let data = [0x09, 0x20, 0x01, 0x56, 0x10, 0x10, 0x80, 0x02, 0xa0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=19,r36; addp4 r41=r36,r0; shladd r15=r15,3,r40;;"; + let data = [0x09, 0x70, 0x4c, 0x48, 0x00, 0x21, 0x90, 0x22, 0x01, 0x10, 0x40, 0xe0, 0xf1, 0x40, 0x49, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; and r14=-0x8,r14; add r38=r32,r41"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0xc0, 0x3b, 0x58, 0x44, 0xc0, 0x04, 0x4a, 0x01, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] ld8 r42=[r15]; nop.i 0x0;; addp4 r14=r14,r0"; + let data = [0x02, 0x50, 0x01, 0x1e, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0xe1, 0x00, 0x20, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r37=r38; adds r45=2,r38; adds r44=3,r38;;"; + let data = [0x09, 0x28, 0x01, 0x4c, 0x00, 0x21, 0xd0, 0x12, 0x98, 0x00, 0x42, 0x80, 0x35, 0x30, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.ltu p7,p6=r42,r14; mov r14=r0; (p07) br.cond.dpnt.few 400000000019e970 ;;"; + let data = [0x11, 0x38, 0xa8, 0x1c, 0x06, 0x34, 0xe0, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x60, 0x02, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r15=[r37],1; ld1 r16=[r45]; nop.i 0x0;;"; + let data = [0x09, 0x78, 0x04, 0x4a, 0x00, 0x14, 0x00, 0x01, 0xb4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,0,8; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x78, 0x38, 0xee, 0x27, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r17=[r37]; ld1 r15=[r44]; nop.i 0x0;;"; + let data = [0x09, 0x88, 0x00, 0x4a, 0x00, 0x10, 0xf0, 0x00, 0xb0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r17,r14,8,8;; dep r14=r16,r14,16,8;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x88, 0x38, 0xee, 0x26, 0xc0, 0x01, 0x71, 0xdc, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,24,8; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x78, 0x38, 0xee, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r36,r14; (p06) br.cond.dpnt.few 400000000019e7d0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x20, 0x39, 0x0e, 0x71, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r50=1104,r1; mov r49=r0; mov r51=0x5;;"; + let data = [0x09, 0x90, 0x41, 0x03, 0x08, 0x24, 0x10, 0x03, 0x00, 0x00, 0x42, 0x60, 0x56, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r50=[r50]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x90, 0x01, 0x64, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x38, 0x7c, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r49=r8; mov r1=r48; nop.i 0x0"; + let data = [0x08, 0x88, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xc0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0x90, 0x01, 0x44, 0x00, 0x21, 0x30, 0x03, 0x8c, 0x00, 0x42, 0x00, 0x98, 0xdd, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x60, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r39=-0x1,r39; adds r15=19,r33; mov r14=r33;;"; + let data = [0x09, 0x38, 0xfd, 0x4f, 0x3f, 0x23, 0xf0, 0x98, 0x84, 0x00, 0x42, 0xc0, 0x01, 0x08, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; sxt4 r39=r39; and r15=-0x8,r15;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x02, 0x9c, 0x2c, 0x00, 0xe0, 0x81, 0x7f, 0xb0, 0x88]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] shladd r40=r39,3,r40; nop.m 0x0; addp4 r15=r15,r0;;"; + let data = [0x09, 0x40, 0x9d, 0x50, 0x12, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe0, 0xf1, 0x00, 0x20, 0x80]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r16=[r40]; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0xa0, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.ltu p7,p6=r16,r15; (p07) br.cond.dptk.few 400000000019e8d0 ;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x80, 0x3c, 0x0c, 0xe8, 0x03, 0xc0, 0x00, 0x00, 0x42]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.ltu p7,p6=r33,r41; nop.m 0x0; mov r49=r33"; + let data = [0x08, 0x38, 0x84, 0x52, 0x06, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x06, 0x08, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r50=r34; nop.m 0x0; mov r51=r35;;"; + let data = [0x09, 0x90, 0x01, 0x44, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x06, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] (p07) mov r36=r14; nop.i 0x0; br.call.sptk.many b0=400000000019d180 ;;"; + let data = [0xf1, 0x20, 0x01, 0x1c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x48, 0xe9, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] cmp.eq p6,p7=0x0,r8; mov r1=r48; mov r37=r8"; + let data = [0x08, 0x30, 0x00, 0x10, 0x07, 0x39, 0x10, 0x00, 0xc0, 0x00, 0x42, 0xa0, 0x04, 0x40, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r49=r8; mov r50=r32; (p06) br.cond.dpnt.few 400000000019e8b0 ;;"; + let data = [0x19, 0x88, 0x01, 0x10, 0x00, 0x21, 0x20, 0x03, 0x80, 0x00, 0x42, 0x03, 0x50, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] addp4 r51=r36,r0; nop.i 0x0; br.call.sptk.many b0=4000000000026200 <_init@@Base+0x10e0>;;"; + let data = [0x11, 0x98, 0x91, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x98, 0x79, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r48; mov r49=r32; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x60, 0x00, 0x21, 0x10, 0x03, 0x80, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c700 ;;"; + let data = [0x19, 0x90, 0x01, 0x44, 0x00, 0x21, 0x30, 0x03, 0x8c, 0x00, 0x42, 0x00, 0x78, 0xde, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r48; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x08, 0x00, 0x60, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r8=r37; nop.m 0x0; mov.i ar.pfs=r47;;"; + let data = [0x09, 0x40, 0x00, 0x4a, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf0, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r46; br.ret.sptk.many b0"; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x70, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.ltu p6,p7=r42,r15; (p06) br.cond.dptk.few 400000000019e820 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x50, 0x3d, 0x0e, 0x68, 0x03, 0x50, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] addp4 r15=r33,r0; st1 [r38]=r0; nop.b 0x0"; + let data = [0x18, 0x78, 0x84, 0x00, 0x08, 0x20, 0x00, 0x00, 0x98, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r37]=r0; mov r37=r32; extr r18=r33,8,8;;"; + let data = [0x09, 0x00, 0x00, 0x4a, 0x80, 0x11, 0x50, 0x02, 0x80, 0x00, 0x42, 0x40, 0x12, 0x09, 0x1d, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r32=r32,r15; st1 [r45]=r0; extr r17=r33,16,8"; + let data = [0x08, 0x00, 0x81, 0x1e, 0x00, 0x20, 0x00, 0x00, 0xb4, 0x00, 0x23, 0x20, 0x12, 0x0a, 0x1d, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r44]=r0; nop.m 0x0; mov r8=r37;;"; + let data = [0x09, 0x00, 0x00, 0x58, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x28, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r15=r32; st4 [r43]=r33; nop.b 0x0"; + let data = [0x18, 0x78, 0x00, 0x40, 0x00, 0x21, 0x00, 0x08, 0xad, 0x20, 0x23, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] adds r16=2,r32; extr r33=r33,24,8; adds r32=3,r32;;"; + let data = [0x01, 0x80, 0x08, 0x40, 0x00, 0x21, 0x10, 0x8a, 0x85, 0x0e, 0x29, 0x00, 0x34, 0x00, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] st1 [r15]=r14,1; st1 [r16]=r17; mov.i ar.pfs=r47;;"; + let data = [0x09, 0x08, 0x38, 0x1e, 0x80, 0x15, 0x00, 0x88, 0x40, 0x00, 0x23, 0x00, 0xf0, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] nop.m 0x0; st1 [r15]=r18; nop.b 0x0"; + let data = [0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x90, 0x3c, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x20]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] st1 [r32]=r33; mov b0=r46; br.ret.sptk.many b0"; + let data = [0x10, 0x00, 0x84, 0x40, 0x80, 0x11, 0x00, 0x70, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r50=1096,r1; mov r49=r0; mov r51=0x5;;"; + let data = [0x09, 0x90, 0x21, 0x03, 0x08, 0x24, 0x10, 0x03, 0x00, 0x00, 0x42, 0x60, 0x56, 0x00, 0x00, 0x90]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r50=[r50]; nop.i 0x0; br.call.sptk.many b0=40000000000263c0 <_init@@Base+0x12a0>;;"; + let data = [0x11, 0x90, 0x01, 0x64, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x48, 0x7a, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r49=r8; mov r1=r48; nop.i 0x0"; + let data = [0x08, 0x88, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00, 0xc0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r50=r34; mov r51=r35; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x19, 0x90, 0x01, 0x44, 0x00, 0x21, 0x30, 0x03, 0x8c, 0x00, 0x42, 0x00, 0xa8, 0xdb, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld4 r36=[r43]; mov r14=r0; mov r1=r48;;"; + let data = [0x09, 0x20, 0x01, 0x56, 0x10, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x42, 0x20, 0x00, 0x80, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addp4 r41=r36,r0;; add r38=r32,r41; nop.i 0x0;;"; + let data = [0x0b, 0x48, 0x91, 0x00, 0x08, 0x20, 0x60, 0x02, 0xa5, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r37=r38; adds r45=2,r38; adds r44=3,r38;;"; + let data = [0x09, 0x28, 0x01, 0x4c, 0x00, 0x21, 0xd0, 0x12, 0x98, 0x00, 0x42, 0x80, 0x35, 0x30, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r15=[r37],1; ld1 r16=[r45]; nop.i 0x0;;"; + let data = [0x09, 0x78, 0x04, 0x4a, 0x00, 0x14, 0x00, 0x01, 0xb4, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,0,8; nop.i 0x0"; + let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x78, 0x38, 0xee, 0x27, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r17=[r37]; ld1 r15=[r44]; nop.i 0x0;;"; + let data = [0x09, 0x88, 0x00, 0x4a, 0x00, 0x10, 0xf0, 0x00, 0xb0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r17,r14,8,8;; dep r14=r16,r14,16,8;;"; + let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x88, 0x38, 0xee, 0x26, 0xc0, 0x01, 0x71, 0xdc, 0x4b]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; dep r14=r15,r14,24,8; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x78, 0x38, 0xee, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r36,r14; (p07) br.cond.dptk.few 400000000019e780 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x20, 0x39, 0x0e, 0xf1, 0x03, 0x50, 0xfd, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019e7d0 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x90, 0xfd, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] addl r49=1064,r1; mov r50=r34; mov r51=r35;;"; + let data = [0x09, 0x88, 0xa1, 0x02, 0x08, 0x24, 0x20, 0x03, 0x88, 0x00, 0x42, 0x60, 0x06, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r49=[r49]; nop.i 0x0; br.call.sptk.many b0=400000000019c540 ;;"; + let data = [0x11, 0x88, 0x01, 0x62, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe8, 0xda, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] adds r14=-0x8,r32; nop.m 0x0; mov r1=r48;;"; + let data = [0x09, 0x70, 0xe0, 0x41, 0x3f, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x80, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld1 r14=[r14];; nop.m 0x0; sxt1 r14=r14;;"; + let data = [0x0b, 0x70, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x01, 0x70, 0x50, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=-0x9,r14; (p07) br.cond.dptk.few 400000000019e600 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0xb8, 0x3b, 0x0e, 0xf7, 0x03, 0x70, 0xfb, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.few 400000000019e650 "; + let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb0, 0xfb, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r49=r32; mov r50=r34; nop.i 0x0"; + let data = [0x08, 0x88, 0x01, 0x40, 0x00, 0x21, 0x20, 0x03, 0x88, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMB] mov r51=r35; mov r37=r0; br.call.sptk.many b0=400000000019c700 ;;"; + let data = [0x19, 0x98, 0x01, 0x46, 0x00, 0x21, 0x50, 0x02, 0x00, 0x00, 0x42, 0x00, 0x48, 0xdc, 0xff, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r8=r37; mov r1=r48; mov.i ar.pfs=r47;;"; + let data = [0x09, 0x40, 0x00, 0x4a, 0x00, 0x21, 0x10, 0x00, 0xc0, 0x00, 0x42, 0x00, 0xf0, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r46; br.ret.sptk.many b0;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x70, 0x05, 0x80, 0x03, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r32=r33; nop.m 0x0; mov b0=r46"; + let data = [0x08, 0x00, 0x01, 0x42, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe0, 0x0a, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r33=r34; mov r34=r35;; mov.i ar.pfs=r47;;"; + let data = [0x03, 0x08, 0x01, 0x44, 0x00, 0x21, 0x20, 0x02, 0x8c, 0x00, 0x42, 0x00, 0xf0, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] alloc r2=ar.pfs,4,0,0; nop.i 0x0; br.many 400000000019d180 ;;"; + let data = [0x11, 0x10, 0x10, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x78, 0xe6, 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] nop.m 0x0; nop.m 0x0; nop.i 0x0"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); +} + +// 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 decoder = InstDecoder::default(); + + let expected = "[MII] alloc r39=ar.pfs,12,9,0; mov r38=b0; mov r40=r1;;"; + let data = [0x01, 0x38, 0x31, 0x12, 0x80, 0x05, 0x60, 0x02, 0x00, 0x62, 0x00, 0x00, 0x05, 0x08, 0x00, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] mov r35=r0; nop.i 0x0; br.call.sptk.many b0=4000000000025120 <_init@@Base>;;"; + let data = [0x11, 0x18, 0x01, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x18, 0x5c, 0xe8, 0x58]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r1=r40;; addl r36=-0xa330,r1; addl r37=-0xa318,r1;;"; + let data = [0x0b, 0x08, 0x00, 0x50, 0x00, 0x21, 0x40, 0x82, 0xf6, 0x73, 0x4d, 0xa0, 0x84, 0xee, 0xe7, 0x9a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; nop.m 0x0; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] sub r37=r37,r36;; nop.m 0x0; shr r37=r37,3;;"; + let data = [0x0b, 0x28, 0x95, 0x48, 0x05, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x74, 0x28, 0xf1, 0x52]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0x0,r37; (p06) br.cond.dpnt.few 400000000019f5b0 <__libc_csu_init@@Base+0xb0>;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x94, 0x0e, 0x72, 0x03, 0x60, 0x00, 0x00, 0x43]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r14=[r36],8; mov r41=r32"; + let data = [0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x40, 0x90, 0x30, 0x28, 0x20, 0x05, 0x00, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] mov r42=r33; mov r43=r34; adds r35=1,r35;;"; + let data = [0x09, 0x50, 0x01, 0x42, 0x00, 0x21, 0xb0, 0x02, 0x88, 0x00, 0x42, 0x60, 0x14, 0x18, 0x01, 0x84]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] nop.m 0x0; ld8 r15=[r14],8; nop.i 0x0;;"; + let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x40, 0x38, 0x30, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r1=[r14]; mov b6=r15; br.call.sptk.many b0=b6;;"; + let data = [0x11, 0x08, 0x00, 0x1c, 0x18, 0x10, 0x60, 0x78, 0x04, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x10]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + 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 = [0x10, 0x08, 0x00, 0x50, 0x00, 0x21, 0x60, 0x18, 0x95, 0x0e, 0x68, 0x03, 0xc0, 0xff, 0xff, 0x4a]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] nop.m 0x0; mov.i ar.pfs=r39; nop.i 0x0;;"; + let data = [0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x38, 0x01, 0x55, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; mov b0=r38; br.ret.sptk.many b0;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x30, 0x05, 0x80, 0x03, 0x80, 0x08, 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 = "[MLX] alloc r34=ar.pfs,5,5,0; movl r32=0xfffffffffffff5f8;;"; + let data = [0x05, 0x10, 0x15, 0x0a, 0x80, 0xc5, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x84, 0xf7, 0xaf, 0x6f]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] add r32=r32,r1;; ld8 r35=[r32],-8; mov r33=b0;;"; + let data = [0x0b, 0x00, 0x81, 0x02, 0x00, 0x20, 0x30, 0xc2, 0x83, 0x32, 0x2c, 0x20, 0x04, 0x00, 0xc4, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p6,p0=-0x1,r35; mov r36=r1; (p06) br.cond.spnt.few 400000000019f640 <__libc_csu_init@@Base+0x140>"; + let data = [0x10, 0x30, 0xfc, 0x47, 0x00, 0x3b, 0x40, 0x02, 0x04, 0x00, 0x42, 0x03, 0x40, 0x00, 0x00, 0x41]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MMI] ld8 r15=[r35],8;; ld8 r1=[r35]; mov b6=r15"; + let data = [0x0a, 0x78, 0x20, 0x46, 0x18, 0x14, 0x10, 0x00, 0x8c, 0x30, 0x20, 0xc0, 0xf0, 0x08, 0x00, 0x07]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] ld8 r35=[r32],-8; nop.i 0x0; br.call.sptk.many b0=b6;;"; + let data = [0x11, 0x18, 0xe1, 0x41, 0x19, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0x00, 0x80, 0x10]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] cmp.eq p0,p6=-0x1,r35; nop.i 0x0; (p06) br.cond.sptk.few 400000000019f610 <__libc_csu_init@@Base+0x110>"; + let data = [0x10, 0x00, 0xfc, 0x47, 0x06, 0x3b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xe0, 0xff, 0xff, 0x48]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MII] mov r1=r35; mov b0=r33; mov.i ar.pfs=r34"; + let data = [0x00, 0x08, 0x00, 0x46, 0x00, 0x21, 0x00, 0x08, 0x05, 0x80, 0x03, 0x00, 0x20, 0x02, 0xaa, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.ret.sptk.many b0;;"; + let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x08, 0x00, 0x84, 0x00]; + let inst = decoder.decode(data[..].iter().cloned()).unwrap(); + assert_eq!(format!("{}", inst), expected); } // from ia64 bash_4.2+dfsg-0.1+deb7u3_ia64 via binutils-ia64-linux-gnu=2.30-21ubuntu1~18.04.4 -- cgit v1.1