Bug 397083 - Likely false positive "uninitialised value(s)" for __wmemchr_avx2 and...
[valgrind.git] / exp-bbv / tests / x86 / million.S
blobffef1e5544290ec41518e4a77ca91a081e04f1bd
1                 # many thanks to David Fang
2                 # for providing an OSX 10.5 machine to test on
4              # count for 1 million instructions
5              #   total is 1 + 1 + 499997*2 + 4
7         .globl _start   
8 _start:
9         xor     %ecx,%ecx               # not needed, pads total to 1M
10         mov     $499997,%ecx            # load counter
11 test_loop:      
12         dec     %ecx                    # repeat count times
13         jnz     test_loop
15         #================================
16         # Exit
17         #================================
19         # syscall numbers in /usr/include/sys/syscall.h on OSX
20         #                 in arc/x86/include/asm/unistd_32.h on Linux
21         # disassemble on OSX otool -tV
22 exit:
23         xor     %eax,%eax
24         inc     %eax                    # put exit syscall number (1) in eax
25 #if defined(VGO_darwin) || defined(VGO_freebsd)
26         pushl   $0                      # we return 0
27         int     $0x80                   # and exit
28 #elif defined(VGO_linux)
29         xor     %ebx,%ebx               # we return 0
30         int     $0x80                   # and exit
31 #elif defined(VGO_solaris)
32         pushl   $0                      # we return 0
33         int     $0x91                   # and exit
34 #elif defined(VGO_freebsd)
35     mov     $0x1,%eax       # we return 0
36         int     $0x80                   # and exit
37 #else
38 #  error "Unknown OS"
39 #endif