diff options
Diffstat (limited to 'tests/test.rs')
-rw-r--r-- | tests/test.rs | 2148 |
1 files changed, 82 insertions, 2066 deletions
diff --git a/tests/test.rs b/tests/test.rs index 2d63ddb..686d94b 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -87,7 +87,7 @@ fn test_bash_tilde_expand_word() { 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 <tilde_expand_word@@Base+0x310>;;"; + let expected = "[MIB] cmp4.eq p6,p7=0x7e,r14; nop.i 0x0; (p07) br.cond.dpnt.few $+0x2d0;;"; 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); @@ -95,19 +95,19 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MII] nop.m 0x0; sxt1 r14=r14;; cmp4.eq p7,p6=0x2f,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 <tilde_expand_word@@Base+0xf0>"; + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=0x0,r14; (p06) br.cond.dptk.few $+0x80"; 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 expected = "[MMI] addl r41=-0x628,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 <sh_get_env_value@@Base>;;"; + let expected = "[MIB] ld8 r41=[r41]; nop.i 0x0; br.call.sptk.many b0=$+-0x12ad10;;"; 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); @@ -115,7 +115,7 @@ fn test_bash_tilde_expand_word() { 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 <tilde_expand_word@@Base+0x430>;;"; + let expected = "[MMB] mov r32=r8; nop.m 0x0; (p07) br.cond.dpnt.few $+0x380;;"; 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); @@ -127,15 +127,15 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many $+-0x2a0;;"; 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 expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=;;"; 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 <xmalloc@@Base>;;"; + let expected = "[MIB] mov r1=r40; mov r41=r8; br.call.sptk.many b0=;;"; 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); @@ -159,7 +159,7 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MMI] (p07) mov r16=0x1; (p07) adds r17=0x2,r32; (p07) mov r14=0x2;;"; 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); @@ -171,7 +171,7 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MMI] st1 [r18]=r15;; ld1 r15=[r17],0x1; 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); @@ -191,7 +191,7 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MMI] st1 [r18]=r15;; ld1 r15=[r17],0x1; 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); @@ -223,7 +223,7 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MMI] ld8 r14=[r8],0x8;; 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); @@ -295,7 +295,7 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MMI] adds r14=0x20,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); @@ -371,7 +371,7 @@ fn test_bash_tilde_expand_word() { 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 expected = "[MMI] ld8 r14=[r8],0x8;; 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); @@ -769,7 +769,7 @@ fn test_bash_rl_insert_close() { 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 expected = "[MMI] sub r17=r17,r14; st8 [r15]=r19,0x8; 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); @@ -785,7 +785,7 @@ fn test_bash_rl_insert_close() { 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 expected = "[MMI] st8 [r15]=r16;; ld8 r14=[r18],0x8; 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); @@ -793,7 +793,7 @@ fn test_bash_rl_insert_close() { 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 expected = "[MMI] mov r1=r45; mov r47=0x1; adds r48=0x20,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); @@ -875,7 +875,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MIB] ld8 r36=[r35]; nop.i 0x0; br.call.sptk.many b0=$+-0x1761c0;;"; 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); @@ -883,7 +883,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x130>;;"; + let expected = "[MMB] mov r44=r33; mov r45=r34; (p07) br.cond.dpnt.few $+0x90;;"; 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); @@ -891,7 +891,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMB] mov r42=0x1; nop.m 0x0; br.call.sptk.many b0=$+-0x175180;;"; 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); @@ -899,7 +899,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMB] ld8 r41=[r35]; nop.m 0x0; br.call.sptk.many b0=$+-0x176500;;"; 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); @@ -907,7 +907,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <programming_error@@Base>;;"; + let expected = "[MMB] mov r42=r33; mov r43=r34; br.call.sptk.many b0=$+-0x11e900;;"; 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); @@ -923,7 +923,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MIB] ld8 r42=[r42]; nop.i 0x0; br.call.sptk.many b0=$+-0x176280;;"; 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); @@ -935,7 +935,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=$+-0x175230;;"; 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); @@ -943,7 +943,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMB] ld8 r41=[r35]; nop.m 0x0; br.call.sptk.many b0=$+-0x1765b0;;"; 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); @@ -951,7 +951,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <programming_error@@Base>;;"; + let expected = "[MMB] mov r42=r33; mov r43=r34; br.call.sptk.many b0=$+-0x11e9b0;;"; 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); @@ -979,7 +979,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x6c0>;;"; + let expected = "[MMB] mov r47=r0; mov r49=0x5; (p06) br.cond.dpnt.few $+0x4a0;;"; 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); @@ -1003,11 +1003,11 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x2f0>;;"; + let expected = "[MIB] cmp4.eq p6,p7=-0x9,r14; nop.i 0x0; (p06) br.cond.dpnt.few $+0x70;;"; 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 expected = "[MMI] cmp4.eq p7,p6=0x54,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); @@ -1015,7 +1015,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MIB] (p06) ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=$+-0x1763f0;;"; 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); @@ -1023,7 +1023,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; + let expected = "[MMB] mov r48=r33; mov r49=r34; br.call.sptk.many b0=$+-0x290;;"; 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); @@ -1031,11 +1031,11 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] adds r14=0x2,r35; mov r15=0x5555; 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 expected = "[MMI] addl r47=0x410,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); @@ -1043,11 +1043,11 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x350>;;"; + let expected = "[MIB] cmp4.eq p6,p7=r14,r15; nop.i 0x0; (p06) br.cond.dpnt.few $+0x30;;"; 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=$+-0x2f0;;"; 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); @@ -1055,7 +1055,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] adds r42=0x1,r35; adds r39=0x4,r35; addl r41=0x480,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); @@ -1067,11 +1067,11 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MII] ld8 r41=[r41]; adds r14=0x13,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 expected = "[MMI] and r14=-0x8,r14;; shladd r16=r38,0x3,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); @@ -1079,19 +1079,19 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x6e0>;;"; + let expected = "[MIB] cmp.ltu p7,p6=r40,r14; mov r14=r0; (p07) br.cond.dpnt.few $+0x330;;"; 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 expected = "[MMI] add r37=r37,r16;; mov r16=r37; adds r17=0x2,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 expected = "[MMI] adds r37=0x3,r37;; ld1 r18=[r16],0x1; 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 expected = "[MMI] ld1 r17=[r17];; nop.m 0x0; dep r14=r18,r14,0x0,0x8"; 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); @@ -1099,23 +1099,23 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MII] nop.m 0x0; dep r14=r18,r14,0x8,0x8;; dep r14=r17,r14,0x10,0x8;;"; 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 expected = "[MII] nop.m 0x0; dep r14=r16,r14,0x18,0x8; 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 <rl_set_paren_blink_timeout@@Base+0x480>"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=r15,r14; (p06) br.cond.dpnt.few $+0x60"; 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 expected = "[MMI] addl r48=0x420,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 expected = "[MIB] ld8 r48=[r48]; nop.i 0x0; br.call.sptk.many b0=$+-0x176580;;"; 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); @@ -1123,19 +1123,11 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x7c0>;;"; - 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 expected = "[MMI] nop.m 0x0; addl r37=0x8f40,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); @@ -1147,35 +1139,23 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x640>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x990>"; - 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 expected = "[MMI] addp4 r49=r49,r0;; cmp.ltu p7,p6=0x7,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 expected = "[MII] (p07) adds r14=-0x1,r49; (p07) and r49=0x7,r49;; (p07) shr.u r14=r14,0x3;;"; 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 expected = "[MMI] (p06) mov r14=r0; nop.m 0x0; cmp.ltu p6,p7=0x7,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 <rl_set_paren_blink_timeout@@Base+0xb70>"; - 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1183,7 +1163,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1191,7 +1171,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1199,7 +1179,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1207,7 +1187,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1215,7 +1195,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1223,7 +1203,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] st1 [r32]=r15,0x1; 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); @@ -1235,18 +1215,10 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x520>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x890>"; - 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(); @@ -1255,19 +1227,15 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0x8e0>"; - 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 expected = "[MMI] st1 [r15]=r0; addl r15=0x8f60,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 expected = "[MMI] nop.m 0x0;; shladd r38=r38,0x3,r15; mov r15=0x54;;"; 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 expected = "[MMI] st1 [r14]=r15,0x8; 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); @@ -1279,26 +1247,14 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] addl r48=0x418,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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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(); @@ -1307,15 +1263,15 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MMI] mov r16=r37; adds r17=0x2,r37; adds r37=0x3,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 expected = "[MMI] ld1 r18=[r16],0x1; 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 expected = "[MII] nop.m 0x0; dep r14=r18,r14,0x0,0x8; 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); @@ -1323,1954 +1279,14 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 expected = "[MII] nop.m 0x0; dep r14=r18,r14,0x8,0x8;; dep r14=r17,r14,0x10,0x8;;"; 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 expected = "[MII] nop.m 0x0; dep r14=r16,r14,0x18,0x8; 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 <rl_set_paren_blink_timeout@@Base+0x430>"; - 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 <rl_set_paren_blink_timeout@@Base+0x480>"; - 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 <rl_set_paren_blink_timeout@@Base+0x490>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x850>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x850>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x4b0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x680>"; - 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 <rl_set_paren_blink_timeout@@Base+0x6c0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xa00>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x9d0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x650>"; - 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 <rl_set_paren_blink_timeout@@Base+0x890>"; - 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 <rl_set_paren_blink_timeout@@Base+0x960>"; - 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 <cfree@@Base+0x220>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xc00>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xbb0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xbb0>"; - 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 <rl_set_paren_blink_timeout@@Base+0xac0>"; - 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 <rl_set_paren_blink_timeout@@Base+0xb50>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1180>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xd00>"; - 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 <rl_set_paren_blink_timeout@@Base+0xd70>"; - 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 <rl_set_paren_blink_timeout@@Base+0xde0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xdb0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xd60>"; - 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 <rl_set_paren_blink_timeout@@Base+0xe60>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xe20>"; - 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 <rl_set_paren_blink_timeout@@Base+0x14e0>"; - 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 <rl_set_paren_blink_timeout@@Base+0xf30>"; - 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 <rl_set_paren_blink_timeout@@Base+0xf80>"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xd80>"; - 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 <rl_set_paren_blink_timeout@@Base+0x12c0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1310>"; - 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 <rl_set_paren_blink_timeout@@Base+0xd80>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1080>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1350>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1270>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1240>"; - 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 <rl_set_paren_blink_timeout@@Base+0xd00>"; - 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 <rl_set_paren_blink_timeout@@Base+0xce0>"; - 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 <rl_set_paren_blink_timeout@@Base+0xd70>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1220>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x14a0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1420>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1240>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1560>"; - 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 <signal_is_trapped@@Base>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1560>"; - 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 <signal_is_trapped@@Base>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x15b0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1a20>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1c90>"; - 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 <rl_set_paren_blink_timeout@@Base+0x16a0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1c50>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1c50>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1830>;;"; - 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 <cfree@@Base+0x220>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1ee0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1c80>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1a20>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b40>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b40>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b20>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1f00>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b20>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1d90>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1930>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1980>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1aa0>"; - 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 <rl_set_paren_blink_timeout@@Base+0xec0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xec0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1a70>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1d50>"; - 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 <cfree@@Base+0x30>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1a20>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1990>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1a20>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1640>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x16a0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x17a0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1830>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1d30>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1690>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1ce0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x16a0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b90>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1e30>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1e30>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b40>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1a30>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1aa0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1830>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1ec0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x1b40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xc80>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2050>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x25b0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x25f0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2550>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2150>"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x21b0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2470>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x22d0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x23d0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0xc80>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x23b0>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x200>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2320>"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2280>"; - 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 <rl_set_paren_blink_timeout@@Base+0x22d0>"; - 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 <rl_set_paren_blink_timeout@@Base+0x40>;;"; - 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 <rl_set_paren_blink_timeout@@Base+0x2100>"; - 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 <rl_set_paren_blink_timeout@@Base+0x2150>"; - 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 <rl_set_paren_blink_timeout@@Base+0x200>;;"; - 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(); @@ -3279,7 +1295,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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 <rl_set_paren_blink_timeout@@Base+0xc80>;;"; + let expected = "[MIB] alloc r2=ar.pfs,4,0,0; nop.i 0x0; br.many $+-0x1990;;"; 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); @@ -3305,7 +1321,7 @@ fn test_bash_libc_csu_init() { 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 expected = "[MIB] mov r35=r0; nop.i 0x0; br.call.sptk.many b0=$+-0x17a3f0;;"; 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); @@ -3317,23 +1333,23 @@ fn test_bash_libc_csu_init() { 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 expected = "[MMI] sub r37=r37,r36;; nop.m 0x0; shr r37=r37,0x3;;"; 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 expected = "[MIB] nop.m 0x0; cmp.eq p6,p7=0x0,r37; (p06) br.cond.dpnt.few $+0x60;;"; 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 expected = "[MMI] nop.m 0x0; ld8 r14=[r36],0x8; 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 expected = "[MMI] mov r42=r33; mov r43=r34; adds r35=0x1,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 expected = "[MMI] nop.m 0x0; ld8 r15=[r14],0x8; 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); @@ -3341,7 +1357,7 @@ fn test_bash_libc_csu_init() { 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 expected = "[MIB] mov r1=r40; cmp.ltu p6,p7=r35,r37; (p06) br.cond.dptk.few $+-0x40"; 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); @@ -3361,23 +1377,23 @@ fn test_bash_libc_csu_init() { 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 expected = "[MMI] add r32=r32,r1;; ld8 r35=[r32],-0x8; 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 expected = "[MIB] cmp.eq p6,p0=-0x1,r35; mov r36=r1; (p06) br.cond.spnt.few $+0x40"; 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 expected = "[MMI] ld8 r15=[r35],0x8;; 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 expected = "[MIB] ld8 r35=[r32],-0x8; 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 expected = "[MIB] cmp.eq p0,p6=-0x1,r35; nop.i 0x0; (p06) br.cond.sptk.few $+-0x20"; 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); @@ -3385,7 +1401,7 @@ fn test_bash_libc_csu_init() { 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 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); |