summaryrefslogtreecommitdiff
path: root/test/MC/MachO/relax-jumps.s
blob: 65a51e92b37c44931db6b4e8b135b72c26b14abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s

// FIXME: This is a horrible way of checking the output, we need an llvm-mc
// based 'otool'. Use:
//   (f=relax-jumps;
//    llvm-mc -filetype=obj -o $f.mc.o $f.s &&
//    as -arch i386 -o $f.as.o $f.s &&
//    otool -tvr $f.mc.o | tail +2 > $f.mc.dump &&
//    otool -tvr $f.as.o | tail +2 > $f.as.dump &&
//    diff $f.{as,mc}.dump)
// to examine the results in a more sensible fashion.

// CHECK: ('_section_data', '90
// CHECK: 0f8432ff ffff0f82 e6000000 0f8726ff ffff0f8f da000000 0f881aff ffff0f83 ce000000 0f890eff ffff90
// CHECK: 9031c0')

L1:
        .space 200, 0x90

        je L1
        jb L2
        ja L1
        jg L2
        js L1
        jae L2
        jns L1

        .space 200, 0x90
L2:

        xorl %eax, %eax