xref: /aosp_15_r20/external/llvm/test/MC/ELF/relax-arith4.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-objdump -d - | FileCheck  %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker// Test for proper instruction relaxation behavior for the push $imm
4*9880d681SAndroid Build Coastguard Worker// instruction forms. This is the 32-bit version of the push $imm tests from
5*9880d681SAndroid Build Coastguard Worker// relax-arith.s and relax-arith2.s.
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker// CHECK:      Disassembly of section push8:
8*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: push8:
9*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   0: 66 6a 80                      pushw $-128
10*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   3: 66 6a 7f                      pushw $127
11*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   6: 6a 80                         pushl $-128
12*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   8: 6a 7f                         pushl $127
13*9880d681SAndroid Build Coastguard Worker        .section push8,"x"
14*9880d681SAndroid Build Coastguard Worker        pushw $-128
15*9880d681SAndroid Build Coastguard Worker        pushw $127
16*9880d681SAndroid Build Coastguard Worker        push  $-128
17*9880d681SAndroid Build Coastguard Worker        push  $127
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker// CHECK:      Disassembly of section push32:
20*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: push32:
21*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   0: 66 68 00 00                   pushw $0
22*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   4: 68 00 00 00 00                pushl $0
23*9880d681SAndroid Build Coastguard Worker        .section push32,"x"
24*9880d681SAndroid Build Coastguard Worker        pushw $foo
25*9880d681SAndroid Build Coastguard Worker        push  $foo
26