1 # When trying (and failing) to instrument at the basic block level
2 # I thought up a lot of corner-cases in the rep code. This tries
3 # to catch some of them
5 # Performance counters give us 8207 insns
6 # 11 + 8*1024 + 3 = 8206
10 cld # we want these to happen forward
12 mov $0xfeb1378,%eax # value to store
14 # test back-to-back rep/stosb's
17 mov $buffer1, %edi # set destination
18 rep stosb # store 1024 times
19 rep stosb # should store 0 times
20 rep stosb # should store 0 times
23 # test stosb where cx is 0
26 mov $buffer1, %edi # set destination
27 rep stosb # should not load at all
29 # test rep inside of a loop
35 mov $buffer1, %edi # set destination
39 mov $buffer1, %edi # set destination
46 #================================
48 #================================
51 #if defined(VGO_darwin) || defined(VGO_freebsd)
52 pushl $0 # we return 0
54 #elif defined(VGO_linux)
55 xor %ebx,%ebx # we return 0
57 #elif defined(VGO_solaris)
58 pushl $0 # we return 0