File: relax-jumps.s

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,696 kB
  • sloc: cpp: 7,438,781; ansic: 1,393,871; asm: 1,012,926; python: 241,771; f90: 86,635; objc: 75,411; lisp: 42,144; pascal: 17,286; sh: 8,596; ml: 5,082; perl: 4,730; makefile: 3,591; awk: 3,523; javascript: 2,251; xml: 892; fortran: 672
file content (36 lines) | stat: -rw-r--r-- 1,159 bytes parent folder | download | duplicates (22)
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
32
33
34
35
36
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -S --sd - | 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.

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

// CHECK: SectionData (
// CHECK:   00C0: 90909090 90909090 0F8432FF FFFF0F82  |..........2.....|
// CHECK:   00D0: E6000000 0F8726FF FFFF0F8F DA000000  |......&.........|
// CHECK:   00E0: 0F881AFF FFFF0F83 CE000000 0F890EFF  |................|
// CHECK:   00F0: FFFF9090 90909090 90909090 90909090  |................|
// CHECK:   01A0: 90909090 90909090 90909090 90909090  |................|
// CHECK:   01B0: 90909090 90909090 909031C0           |..........1.|
// CHECK: )