[MC] Convert all the remaining tests from macho-dump to llvm-readobj.
[oota-llvm.git] / test / MC / MachO / relax-jumps.s
1 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -s -sd | FileCheck %s
2
3 // FIXME: This is a horrible way of checking the output, we need an llvm-mc
4 // based 'otool'. Use:
5 //   (f=relax-jumps;
6 //    llvm-mc -filetype=obj -o $f.mc.o $f.s &&
7 //    as -arch i386 -o $f.as.o $f.s &&
8 //    otool -tvr $f.mc.o | tail +2 > $f.mc.dump &&
9 //    otool -tvr $f.as.o | tail +2 > $f.as.dump &&
10 //    diff $f.{as,mc}.dump)
11 // to examine the results in a more sensible fashion.
12
13 L1:
14         .space 200, 0x90
15
16         je L1
17         jb L2
18         ja L1
19         jg L2
20         js L1
21         jae L2
22         jns L1
23
24         .space 200, 0x90
25 L2:
26
27         xorl %eax, %eax
28
29 // CHECK: SectionData (
30 // CHECK:   00C0: 90909090 90909090 0F8432FF FFFF0F82  |..........2.....|
31 // CHECK:   00D0: E6000000 0F8726FF FFFF0F8F DA000000  |......&.........|
32 // CHECK:   00E0: 0F881AFF FFFF0F83 CE000000 0F890EFF  |................|
33 // CHECK:   00F0: FFFF9090 90909090 90909090 90909090  |................|
34 // CHECK:   01A0: 90909090 90909090 90909090 90909090  |................|
35 // CHECK:   01B0: 90909090 90909090 909031C0           |..........1.|
36 // CHECK: )