Skip to content

Commit 061f8dd

Browse files
committed
Fix regtest implementation-defined flags
Fixes #96
1 parent 35a5e0f commit 061f8dd

File tree

9 files changed

+21
-38
lines changed

9 files changed

+21
-38
lines changed

test/regtest/after.exp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,12 @@
2525
000000000a0001cb:000000000c007fe0:0000000000000600: 4d 01 ca add %r9, %r10
2626
000000000a0001cf:000000000c007fe0:ffffffffffff9600: 49 83 e8 08 sub $0x8, %r8
2727
000000000a0001d2:000000000c007fe0:0000000000000700: 4d 29 c2 sub %r8, %r10
28-
000000000a0001d5:000000000c007fe0:0000000000000301: 49 f7 ea imul %r10
29-
000000000a0001d9:000000000c007fe0:ffffffffffff8701: 4d 0f af d3 imul %r11, %r10
30-
000000000a0001dd:000000000c007fe0:0000000000000200: 4d 6b d3 77 imul $0x77, %r11, %r10
3128
000000000a0001e3:000000000c007fe0:0000000000000200: 48 25 fe 00 00 00 and $0xfe, %rax
3229
000000000a0001e6:000000000c007fe0:0000000000000200: 48 21 c3 and %rax, %rbx
3330
000000000a0001ea:000000000c007fe0:0000000000000200: 48 83 cb 13 or $0x13, %rbx
3431
000000000a0001ed:000000000c007fe0:ffffffffffff8200: 48 09 cb or %rcx, %rbx
3532
000000000a0001f0:000000000c007fe0:ffffffffffff8200: 48 f7 d1 not %rcx
3633
000000000a0001f3:000000000c007fe0:ffffffffffff9300: 48 f7 d9 neg %rcx
37-
000000000a0001f7:000000000c007fe0:0000000000000200: 48 c1 e7 07 shl $0x7, %rdi
38-
000000000a0001fb:000000000c007fe0:0000000000000200: 48 c1 ff 03 sar $0x3, %rdi
39-
000000000a0001fd:000000000c007fd8:0000000000000200: 41 55 push %r13
40-
000000000a000204:000000000c007fd8:0000000000000200: 48 c7 c0 19 45 00 00 mov $0x4519, %rax
41-
000000000a000208:000000000c007fd8:0000000000000200: 66 0f ef c0 pxor %xmm0, %xmm0
42-
000000000a00020d:000000000c007fd8:0000000000000200: f3 48 0f 2a c0 cvtsi2ss %rax, %xmm0
43-
000000000a000211:000000000c007fd8:0000000000000200: f3 0f 51 c8 sqrtss %xmm0, %xmm1
4434
000000000a000214:000000000c007fd8:0000000000000300: 0f 2f c8 comiss %xmm0, %xmm1
4535
000000000a000216:000000000c007fd8:0000000000000300: 74 e5 jz 0xa0001fb
4636
000000000a00021b:000000000c007fd8:0000000000000300: f3 48 0f 2c c1 cvttss2si %xmm1, %rax

test/regtest/after.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
./test -M true -P 'after entry(rip,rsp,flags,bytes,size,asm)@inst'
1+
./test -M 'not addr in {0xa0001d2,0xa0001d5,0xa0001d9,0xa0001f3,0xa0001f7,0xa0001fb,0xa0001fd,0xa000204,0xa000208,0xa00020d}' -P 'after entry(rip,rsp,flags,bytes,size,asm)@inst'
22

33
# Compare against rip_rsp_rflags for reference
44

test/regtest/bad.csv

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
0xa0001d2
2+
0xa0001d5
3+
0xa0001d9
4+
0xa0001dd
5+
0xa0001f3
6+
0xa0001f7
7+
0xa0001fb
8+
0xa0001fd
9+
0xa000204
10+
0xa000208
11+
0xa00020d
12+
0xa000211

test/regtest/example_12.exp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@
66
0000000000000200:0000000083838389:000000000a000192: 4d 01 ca add %r9, %r10
77
0000000000000600:0000000000000008:8877665544332211: 49 83 e8 08 sub $0x8, %r8
88
ffffffffffff9600:8877665544332209:000000008d83851b: 4d 29 c2 sub %r8, %r10
9-
0000000000000700:778899ab49506312:0000000000000000: 49 f7 ea imul %r10
10-
0000000000000301:00000000a5a5a5a5:778899ab49506312: 4d 0f af d3 imul %r11, %r10
11-
ffffffffffff8701:0000000000000077:00000000a5a5a5a5: 4d 6b d3 77 imul $0x77, %r11, %r10
12-
0000000000000200:00000000000000fe:2d9bfa6b1014f832: 48 25 fe 00 00 00 and $0xfe, %rax
139
0000000000000200:0000000000000032:8877665544332211: 48 21 c3 and %rax, %rbx
1410
0000000000000200:0000000000000013:0000000000000010: 48 83 cb 13 or $0x13, %rbx
1511
0000000000000200:ffffffffffff8889:0000000000000013: 48 09 cb or %rcx, %rbx
1612
ffffffffffff8200:0000000000007776:0000000000000000: 48 f7 d9 neg %rcx
17-
ffffffffffff9300:0000000000000007:0000000061616161: 48 c1 e7 07 shl $0x7, %rdi
18-
0000000000000200:0000000000000003:00000030b0b0b080: 48 c1 ff 03 sar $0x3, %rdi
19-
0000000000000200:0000000000000000:0000000000000000: 0f 2f c8 comiss %xmm0, %xmm1
2013
0000000000000300:0000000000000085:0000000000000085: 48 3d 85 00 00 00 cmp $0x85, %rax
2114
0000000000004600:0000000000000000:0000000000000000: 48 85 c0 test %rax, %rax
2215
0000000000004600:0000000050505050:0000000050505050: 31 f6 xor %esi, %esi

test/regtest/example_12.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./test -M 'rflags in writes' -P 'entry(flags,op[0],op[1],bytes,size,asm)@inst'
1+
./test -M 'rflags in writes && !defined(bad[0])' -P 'entry(flags,op[0],op[1],bytes,size,asm)@inst'

test/regtest/rip_rsp_rflags.exp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,11 @@
3939
000000000a0001c8:000000000c007fe0:0000000000000200: 4d 01 ca add %r9, %r10
4040
000000000a0001cb:000000000c007fe0:0000000000000600: 49 83 e8 08 sub $0x8, %r8
4141
000000000a0001cf:000000000c007fe0:ffffffffffff9600: 4d 29 c2 sub %r8, %r10
42-
000000000a0001d2:000000000c007fe0:0000000000000700: 49 f7 ea imul %r10
43-
000000000a0001d5:000000000c007fe0:0000000000000301: 4d 0f af d3 imul %r11, %r10
44-
000000000a0001d9:000000000c007fe0:ffffffffffff8701: 4d 6b d3 77 imul $0x77, %r11, %r10
45-
000000000a0001dd:000000000c007fe0:0000000000000200: 48 25 fe 00 00 00 and $0xfe, %rax
4642
000000000a0001e3:000000000c007fe0:0000000000000200: 48 21 c3 and %rax, %rbx
4743
000000000a0001e6:000000000c007fe0:0000000000000200: 48 83 cb 13 or $0x13, %rbx
4844
000000000a0001ea:000000000c007fe0:0000000000000200: 48 09 cb or %rcx, %rbx
4945
000000000a0001ed:000000000c007fe0:ffffffffffff8200: 48 f7 d1 not %rcx
5046
000000000a0001f0:000000000c007fe0:ffffffffffff8200: 48 f7 d9 neg %rcx
51-
000000000a0001f3:000000000c007fe0:ffffffffffff9300: 48 c1 e7 07 shl $0x7, %rdi
52-
000000000a0001f7:000000000c007fe0:0000000000000200: 48 c1 ff 03 sar $0x3, %rdi
53-
000000000a0001fb:000000000c007fe0:0000000000000200: 41 55 push %r13
54-
000000000a0001fd:000000000c007fd8:0000000000000200: 48 c7 c0 19 45 00 00 mov $0x4519, %rax
55-
000000000a000204:000000000c007fd8:0000000000000200: 66 0f ef c0 pxor %xmm0, %xmm0
56-
000000000a000208:000000000c007fd8:0000000000000200: f3 48 0f 2a c0 cvtsi2ss %rax, %xmm0
57-
000000000a00020d:000000000c007fd8:0000000000000200: f3 0f 51 c8 sqrtss %xmm0, %xmm1
58-
000000000a000211:000000000c007fd8:0000000000000200: 0f 2f c8 comiss %xmm0, %xmm1
5947
000000000a000214:000000000c007fd8:0000000000000300: 74 e5 jz 0xa0001fb
6048
000000000a000216:000000000c007fd8:0000000000000300: f3 48 0f 2c c1 cvttss2si %xmm1, %rax
6149
000000000a00021b:000000000c007fd8:0000000000000300: 48 3d 85 00 00 00 cmp $0x85, %rax

test/regtest/rip_rsp_rflags.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./test -M true -P 'entry(rip,rsp,flags,bytes,size,asm)@inst'
1+
./test -M '!defined(bad[0])' -P 'entry(rip,rsp,flags,bytes,size,asm)@inst'

test/regtest/xmm.exp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
000000000a000204:0000000000004519:0000000000000200: 66 0f ef c0 pxor %xmm0, %xmm0
2-
000000000a000208:0000000000004519:0000000000000200: f3 48 0f 2a c0 cvtsi2ss %rax, %xmm0
3-
000000000a00020d:0000000000004519:0000000000000200: f3 0f 51 c8 sqrtss %xmm0, %xmm1
4-
000000000a000211:0000000000004519:0000000000000200: 0f 2f c8 comiss %xmm0, %xmm1
5-
000000000a000216:0000000000004519:0000000000000300: f3 48 0f 2c c1 cvttss2si %xmm1, %rax
1+
000000000a000204:0000000000004519:00000000e9e9e9e9: 66 0f ef c0 pxor %xmm0, %xmm0
2+
000000000a000208:0000000000004519:00000000e9e9e9e9: f3 48 0f 2a c0 cvtsi2ss %rax, %xmm0
3+
000000000a00020d:0000000000004519:00000000e9e9e9e9: f3 0f 51 c8 sqrtss %xmm0, %xmm1
4+
000000000a000211:0000000000004519:00000000e9e9e9e9: 0f 2f c8 comiss %xmm0, %xmm1
5+
000000000a000216:0000000000004519:00000000e9e9e9e9: f3 48 0f 2c c1 cvttss2si %xmm1, %rax
66
PASSED

test/regtest/xmm.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./test -M 'reg[0] in {xmm0, xmm1} || reg[1] in {xmm0, xmm1}' -P 'entry(addr,rax,flags,bytes,size,asm)@inst'
1+
./test -M '(reg[0] in {xmm0, xmm1} || reg[1] in {xmm0, xmm1})' -P 'entry(addr,rax,0xe9e9e9e9,bytes,size,asm)@inst'

0 commit comments

Comments
 (0)