From 30917045cff1bed6273cb40ad2d38271cbf64364 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 12 Oct 2020 00:53:23 -0700 Subject: fix negative ip-relative operands showing as `$+-const` they are now `$-const` --- tests/test.rs | 120 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'tests') diff --git a/tests/test.rs b/tests/test.rs index 683818e..8f6feb0 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -163,11 +163,11 @@ fn test_br_cosmetics() { let data = [0x19, 0x30, 0x00, 0x40, 0x07, 0x39, 0x40, 0x0a, 0x80, 0x00, 0x42, 0x03, 0xd0, 0x05, 0x00, 0x43]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many $+-0x2a0;;"; + 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=$+-0x1745d0;;"; + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=$-0x1745d0;;"; 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); @@ -224,7 +224,7 @@ fn test_bash_tilde_expand_word() { 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=$+-0x12ad10;;"; + 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); @@ -244,15 +244,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 $+-0x2a0;;"; + 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=$+-0x1745d0;;"; + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=$-0x1745d0;;"; 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=$+-0xa0700;;"; + let expected = "[MIB] mov r1=r40; mov r41=r8; br.call.sptk.many b0=$-0xa0700;;"; 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); @@ -316,7 +316,7 @@ fn test_bash_tilde_expand_word() { let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x3c, 0x28, 0x00, 0xe0, 0x00, 0x78, 0x18, 0xe6]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=0x2f,r15; (p06) br.cond.dptk.few $+-0x40"; + let expected = "[MIB] nop.m 0x0; cmp4.eq.or.andcm p7,p6=0x2f,r15; (p06) br.cond.dptk.few $-0x40"; let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x78, 0x3d, 0x8c, 0x73, 0x03, 0xc0, 0xff, 0xff, 0x4a]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -356,7 +356,7 @@ fn test_bash_tilde_expand_word() { let data = [0x19, 0x58, 0x01, 0x48, 0x00, 0x21, 0x50, 0x02, 0x20, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x00, 0x43]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=$+-0x460;;"; + let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=$-0x460;;"; let data = [0x11, 0x48, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa8, 0xfb, 0xff, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -364,11 +364,11 @@ fn test_bash_tilde_expand_word() { let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x20, 0x05, 0x18, 0x01, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$+-0xa0600;;"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$-0xa0600;;"; let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0xfa, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r1=r40; mov r41=r37; br.call.sptk.many b0=$+-0xa0610;;"; + let expected = "[MIB] mov r1=r40; mov r41=r37; br.call.sptk.many b0=$-0xa0610;;"; let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x02, 0x94, 0x00, 0x42, 0x00, 0xf8, 0xf9, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -384,11 +384,11 @@ fn test_bash_tilde_expand_word() { let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=$+-0x1747f0;;"; + let expected = "[MIB] mov r41=r32; nop.i 0x0; br.call.sptk.many b0=$-0x1747f0;;"; let data = [0x11, 0x48, 0x01, 0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x18, 0xb8, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r1=r40; adds r41=0x1,r8; br.call.sptk.many b0=$+-0xa0920;;"; + let expected = "[MIB] mov r1=r40; adds r41=0x1,r8; br.call.sptk.many b0=$-0xa0920;;"; let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x0a, 0x20, 0x00, 0x42, 0x00, 0xe8, 0xf6, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -396,7 +396,7 @@ fn test_bash_tilde_expand_word() { let data = [0x08, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x40, 0x00, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MMB] mov r42=r32; nop.m 0x0; br.call.sptk.many b0=$+-0x174c60;;"; + let expected = "[MMB] mov r42=r32; nop.m 0x0; br.call.sptk.many b0=$-0x174c60;;"; let data = [0x19, 0x50, 0x01, 0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xa8, 0xb3, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -408,7 +408,7 @@ fn test_bash_tilde_expand_word() { let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r41=r35; nop.i 0x0; br.call.sptk.many b0=$+-0x175610;;"; + let expected = "[MIB] mov r41=r35; nop.i 0x0; br.call.sptk.many b0=$-0x175610;;"; 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); @@ -420,7 +420,7 @@ fn test_bash_tilde_expand_word() { let data = [0x19, 0x50, 0x01, 0x42, 0x00, 0x21, 0xb0, 0x02, 0x90, 0x00, 0xc2, 0x03, 0xf0, 0x00, 0x00, 0x43]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MBB] ld8 r41=[r14]; br.call.sptk.many b0=$+-0x560; nop.b 0x0;;"; + let expected = "[MBB] ld8 r41=[r14]; br.call.sptk.many b0=$-0x560; nop.b 0x0;;"; let data = [0x13, 0x48, 0x01, 0x1c, 0x18, 0x10, 0x00, 0x54, 0xfd, 0x7f, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x20]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -432,11 +432,11 @@ fn test_bash_tilde_expand_word() { let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x05, 0x18, 0x01, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$+-0xa0710;;"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$-0xa0710;;"; let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf8, 0xf8, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=$+-0x1743a0;;"; + let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=$-0x1743a0;;"; let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xbc, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -456,7 +456,7 @@ fn test_bash_tilde_expand_word() { let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x80, 0x30, 0x00, 0x42, 0x80, 0x08, 0x00, 0x84, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r34=0x1; nop.i 0x0; br.call.sptk.many b0=$+-0x12d7b0;;"; + let expected = "[MIB] mov r34=0x1; nop.i 0x0; br.call.sptk.many b0=$-0x12d7b0;;"; let data = [0x11, 0x10, 0x05, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x58, 0x28, 0xed, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -468,11 +468,11 @@ 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 $+-0x620"; + let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many $-0x620"; let data = [0x10, 0x10, 0x0c, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xe8, 0xf9, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r14=r0; mov r36=0x1; br.few $+-0x250;;"; + let expected = "[MIB] mov r14=r0; mov r36=0x1; br.few $-0x250;;"; let data = [0x11, 0x70, 0x00, 0x00, 0x00, 0x21, 0x40, 0x0a, 0x00, 0x00, 0x48, 0x00, 0xb0, 0xfd, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -504,7 +504,7 @@ fn test_bash_tilde_expand_word() { let data = [0x19, 0x58, 0x01, 0x48, 0x00, 0x21, 0xa0, 0x02, 0x84, 0x00, 0x42, 0x03, 0x70, 0x00, 0x00, 0x43]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=$+-0x6b0;;"; + let expected = "[MIB] mov r41=r8; nop.i 0x0; br.call.sptk.many b0=$-0x6b0;;"; let data = [0x11, 0x48, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x58, 0xf9, 0xff, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -512,7 +512,7 @@ fn test_bash_tilde_expand_word() { let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x20, 0x05, 0x28, 0x01, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$+-0xa0850;;"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$-0xa0850;;"; let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0xf7, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -524,15 +524,15 @@ fn test_bash_tilde_expand_word() { let data = [0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x38, 0x30, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r8; (p06) br.cond.sptk.few $+-0x180"; + let expected = "[MIB] nop.m 0x0; cmp.eq p7,p6=0x0,r8; (p06) br.cond.sptk.few $-0x180"; let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x20, 0x0c, 0x72, 0x03, 0x80, 0xfe, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r41=r33; nop.i 0x0; br.call.sptk.many b0=$+-0x174a30;;"; + let expected = "[MIB] mov r41=r33; nop.i 0x0; br.call.sptk.many b0=$-0x174a30;;"; let data = [0x11, 0x48, 0x01, 0x42, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd8, 0xb5, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r1=r40; adds r41=0x1,r8; br.call.sptk.many b0=$+-0xa0b60;;"; + let expected = "[MIB] mov r1=r40; adds r41=0x1,r8; br.call.sptk.many b0=$-0xa0b60;;"; let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x90, 0x0a, 0x20, 0x00, 0x42, 0x00, 0xa8, 0xf4, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -540,7 +540,7 @@ fn test_bash_tilde_expand_word() { let data = [0x08, 0x50, 0x01, 0x42, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MMB] mov r41=r8; nop.m 0x0; br.call.sptk.many b0=$+-0x174ea0;;"; + let expected = "[MMB] mov r41=r8; nop.m 0x0; br.call.sptk.many b0=$-0x174ea0;;"; let data = [0x19, 0x48, 0x01, 0x10, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xb1, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -548,11 +548,11 @@ fn test_bash_tilde_expand_word() { let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x10, 0x00, 0xa0, 0x00, 0x42, 0x20, 0x05, 0x18, 0x01, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$+-0xa08e0;;"; + let expected = "[MIB] st8 [r14]=r8; nop.i 0x0; br.call.sptk.many b0=$-0xa08e0;;"; let data = [0x11, 0x00, 0x20, 0x1c, 0x98, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x28, 0xf7, 0xf5, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=$+-0x174570;;"; + let expected = "[MIB] mov r1=r40; nop.i 0x0; br.call.sptk.many b0=$-0x174570;;"; let data = [0x11, 0x08, 0x00, 0x50, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x98, 0xba, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -560,7 +560,7 @@ fn test_bash_tilde_expand_word() { let data = [0x09, 0x70, 0x40, 0x18, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x40, 0x01, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] ld8 r8=[r14]; nop.i 0x0; br.few $+-0x1c0;;"; + let expected = "[MIB] ld8 r8=[r14]; nop.i 0x0; br.few $-0x1c0;;"; let data = [0x11, 0x40, 0x00, 0x1c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0xfe, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -610,7 +610,7 @@ fn test_bash_rl_insert_close() { let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x38, 0x0c, 0x73, 0x03, 0x50, 0x00, 0x00, 0x43]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r47=r32; mov r48=r33; br.call.sptk.many b0=$+-0x10ab0;;"; + let expected = "[MIB] mov r47=r32; mov r48=r33; br.call.sptk.many b0=$-0x10ab0;;"; let data = [0x11, 0x78, 0x01, 0x40, 0x00, 0x21, 0x00, 0x03, 0x84, 0x00, 0x42, 0x00, 0x58, 0xf5, 0xfe, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -630,7 +630,7 @@ fn test_bash_rl_insert_close() { let data = [0x08, 0x48, 0x21, 0x03, 0x7a, 0x24, 0x20, 0x82, 0x07, 0x3a, 0x49, 0x00, 0x00, 0x00, 0x04, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MMB] mov r47=0x1; mov r48=r33; br.call.sptk.many b0=$+-0x10b00;;"; + let expected = "[MMB] mov r47=0x1; mov r48=r33; br.call.sptk.many b0=$-0x10b00;;"; let data = [0x19, 0x78, 0x05, 0x00, 0x00, 0x24, 0x00, 0x03, 0x84, 0x00, 0x42, 0x00, 0x08, 0xf5, 0xfe, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -698,7 +698,7 @@ fn test_bash_rl_insert_close() { let data = [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x02, 0x94, 0x2c, 0x00, 0xe0, 0x51, 0x02, 0x20, 0x80]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MMB] nop.m 0x0; cmp4.lt p6,p7=r37,r0; (p06) br.cond.dpnt.few $+-0x80;;"; + let expected = "[MMB] nop.m 0x0; cmp4.lt p6,p7=r37,r0; (p06) br.cond.dpnt.few $-0x80;;"; let data = [0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x28, 0x01, 0x0e, 0x61, 0x03, 0x80, 0xff, 0xff, 0x4b]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -738,7 +738,7 @@ fn test_bash_rl_insert_close() { let data = [0x0b, 0x30, 0x01, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc0, 0x04, 0x30, 0x51, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] mov r48=r38; nop.i 0x0; br.call.sptk.many b0=$+-0x175430;;"; + let expected = "[MIB] mov r48=r38; nop.i 0x0; br.call.sptk.many b0=$-0x175430;;"; let data = [0x11, 0x80, 0x01, 0x4c, 0x00, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xd8, 0xab, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -758,15 +758,15 @@ fn test_bash_rl_insert_close() { let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x9c, 0x0e, 0x73, 0x03, 0x90, 0x00, 0x00, 0x43]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] adds r37=-0x1,r37; adds r35=-0x1,r35; br.cloop.sptk.few $+-0xc0"; + let expected = "[MIB] adds r37=-0x1,r37; adds r35=-0x1,r35; br.cloop.sptk.few $-0xc0"; let data = [0x10, 0x28, 0xfd, 0x4b, 0x3f, 0x23, 0x30, 0xfa, 0x8f, 0x7e, 0x46, 0xa0, 0x40, 0xff, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; mov r8=-0x1; br.few $+-0x170;;"; + let expected = "[MIB] nop.m 0x0; mov r8=-0x1; br.few $-0x170;;"; let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf8, 0xf3, 0xff, 0x4f, 0x00, 0x90, 0xfe, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r36; (p06) br.cond.dptk.few $+-0x30"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p7,p6=0x0,r36; (p06) br.cond.dptk.few $-0x30"; let data = [0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x90, 0x0c, 0x73, 0x03, 0xd0, 0xff, 0xff, 0x4a]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -778,7 +778,7 @@ fn test_bash_rl_insert_close() { let data = [0x0b, 0x38, 0x38, 0x42, 0x86, 0xf8, 0x71, 0x0a, 0x9c, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few $+-0x60;;"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; (p07) br.cond.dpnt.few $-0x60;;"; let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0xa0, 0xff, 0xff, 0x4b]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -786,7 +786,7 @@ fn test_bash_rl_insert_close() { let data = [0x0b, 0x38, 0xa8, 0x1c, 0x86, 0xf8, 0x71, 0xfa, 0x9f, 0x7e, 0x46, 0x00, 0x00, 0x00, 0x04, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r39; (p07) br.cond.dptk.few $+-0x70;;"; + let expected = "[MIB] nop.m 0x0; cmp4.eq p6,p7=0x0,r39; (p07) br.cond.dptk.few $-0x70;;"; let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x9c, 0x0e, 0xf3, 0x03, 0x90, 0xff, 0xff, 0x4a]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -806,7 +806,7 @@ fn test_bash_rl_insert_close() { let data = [0x0b, 0x18, 0x01, 0x03, 0x8f, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] ld8 r47=[r35]; nop.i 0x0; br.call.sptk.many b0=$+-0x175100;;"; + let expected = "[MIB] ld8 r47=[r35]; nop.i 0x0; br.call.sptk.many b0=$-0x175100;;"; let data = [0x11, 0x78, 0x01, 0x46, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0xaf, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -826,7 +826,7 @@ fn test_bash_rl_insert_close() { let data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x6a, 0x90, 0x32, 0x29, 0x80, 0x44, 0x72, 0x48, 0x80]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] ld8 r38=[r36]; nop.i 0x0; br.call.sptk.many b0=$+-0x175150;;"; + let expected = "[MIB] ld8 r38=[r36]; nop.i 0x0; br.call.sptk.many b0=$-0x175150;;"; let data = [0x11, 0x30, 0x01, 0x48, 0x18, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xb8, 0xae, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -918,7 +918,7 @@ fn test_bash_rl_insert_close() { let data = [0x09, 0x88, 0x01, 0x00, 0x00, 0x21, 0x20, 0x03, 0x00, 0x00, 0x42, 0x60, 0x06, 0x61, 0x00, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=$+-0x175fa0;;"; + let expected = "[MIB] nop.m 0x0; nop.i 0x0; br.call.sptk.many b0=$-0x175fa0;;"; let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x68, 0xa0, 0xe8, 0x58]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -938,11 +938,11 @@ fn test_bash_rl_insert_close() { let data = [0x18, 0x60, 0x40, 0x18, 0x01, 0x21, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x08, 0x00, 0x84, 0x00]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; mov r42=0x28; br.few $+-0x3f0;;"; + let expected = "[MIB] nop.m 0x0; mov r42=0x28; br.few $-0x3f0;;"; let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0x42, 0x01, 0x00, 0x48, 0x00, 0x10, 0xfc, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] nop.m 0x0; mov r42=0x5b; br.few $+-0x400;;"; + let expected = "[MIB] nop.m 0x0; mov r42=0x5b; br.few $-0x400;;"; let data = [0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, 0xda, 0x02, 0x00, 0x48, 0x00, 0x00, 0xfc, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); @@ -992,7 +992,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=$+-0x1761c0;;"; + 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); @@ -1008,7 +1008,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=$+-0x175180;;"; + 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); @@ -1016,7 +1016,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=$+-0x176500;;"; + 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); @@ -1024,7 +1024,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=$+-0x11e900;;"; + 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); @@ -1040,7 +1040,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=$+-0x176280;;"; + 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); @@ -1052,7 +1052,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=$+-0x175230;;"; + 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); @@ -1060,7 +1060,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=$+-0x1765b0;;"; + 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); @@ -1068,7 +1068,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=$+-0x11e9b0;;"; + 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); @@ -1132,7 +1132,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=$+-0x1763f0;;"; + 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); @@ -1140,7 +1140,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=$+-0x290;;"; + 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); @@ -1164,7 +1164,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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=$+-0x2f0;;"; + 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); @@ -1232,7 +1232,7 @@ fn test_bash_rl_set_paren_blink_timeout() { 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=$+-0x176580;;"; + 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); @@ -1412,7 +1412,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 $+-0x1990;;"; + 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); @@ -1438,7 +1438,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=$+-0x17a3f0;;"; + 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); @@ -1474,7 +1474,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 $+-0x40"; + 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); @@ -1510,7 +1510,7 @@ fn test_bash_libc_csu_init() { 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 $+-0x20"; + 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); @@ -1536,7 +1536,7 @@ fn test_bash_cfree() { let data = [0x0b, 0x80, 0x0c, 0x06, 0x80, 0x05, 0x10, 0x02, 0x00, 0x00, 0x42, 0x40, 0x04, 0x00, 0x00, 0x84]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); - let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many $+-0x2990;;"; + let expected = "[MIB] alloc r2=ar.pfs,3,0,0; nop.i 0x0; br.many $-0x2990;;"; let data = [0x11, 0x10, 0x0c, 0x00, 0x80, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x78, 0xd6, 0xff, 0x48]; let inst = decoder.decode(data[..].iter().cloned()).unwrap(); assert_eq!(format!("{}", inst), expected); -- cgit v1.1