Revert "Reapply 222538 and update tests to explicitly request small code model and...
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 27 Nov 2014 17:13:51 +0000 (17:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 27 Nov 2014 17:13:51 +0000 (17:13 +0000)
This reverts commit r222760.

It changed our behaviour on PIC so we don't match gas anymore. It also
included lots of unnecessary changes to tests.

If those changes are desirable, there should be an independent discussion
as they are out of scope for that patch.

I will recommit the other bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222896 91177308-0d34-0410-b5e6-96231b3b80d8

21 files changed:
lib/MC/MCObjectFileInfo.cpp
test/MC/ELF/cfi-adjust-cfa-offset.s
test/MC/ELF/cfi-advance-loc2.s
test/MC/ELF/cfi-def-cfa-offset.s
test/MC/ELF/cfi-def-cfa-register.s
test/MC/ELF/cfi-def-cfa.s
test/MC/ELF/cfi-escape.s
test/MC/ELF/cfi-offset.s
test/MC/ELF/cfi-register.s
test/MC/ELF/cfi-rel-offset.s
test/MC/ELF/cfi-rel-offset2.s
test/MC/ELF/cfi-remember.s
test/MC/ELF/cfi-restore.s
test/MC/ELF/cfi-same-value.s
test/MC/ELF/cfi-signal-frame.s
test/MC/ELF/cfi-undefined.s
test/MC/ELF/cfi-window-save.s
test/MC/ELF/cfi-zero-addr-delta.s
test/MC/ELF/cfi.s
test/MC/ELF/pr19430.s
test/MC/X86/fde-reloc.s

index 96929e59385f7b8bee6648de9a66f96fc3b17fed..7886ab62ca5557286e7640a817b0bf5bc2c2b2c7 100644 (file)
@@ -273,17 +273,6 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
   case Triple::mips64el:
     FDECFIEncoding = dwarf::DW_EH_PE_sdata8;
     break;
-  case Triple::x86_64:
-    if (RelocM == Reloc::PIC_) {
-      FDECFIEncoding = dwarf::DW_EH_PE_pcrel |
-        ((CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
-         ? dwarf::DW_EH_PE_sdata4 : dwarf::DW_EH_PE_sdata8);
-    } else {
-      FDECFIEncoding =
-        (CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
-        ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;
-    }
-    break;
   default:
     FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
     break;
index f31a6b0acd6dc52ae3d9eda7d6bddf6459836cc3..9d639f70d8ddb9ed12b08f1b26ff26a00960256d 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index c11ccaf51ee287eb20ea6b9b7b352f398d0462b0..98caa0185f59f4758d2924084a5d93ec89a3d38f 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 // test that this produces a correctly encoded cfi_advance_loc2
 
index 93158ce22fbb8e660b9326eb1d7178b2434d3f23..59f740055d47253f3252c2d0a4e693104106f07b 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 8c550534b2f1393dcd46c4e57a24f058643665f5..178ba32882dcafbe4be1f6a83354f6c0e5c59029 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index f0b493403ca18d0c542cb07914dbad786edd864b..dfb0d4b59396254ffbbb02d16047a68799647976 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 3b7674640c72a18c24d9c58788b2c61240ba7c74..5394ee414aa771add8603d895a53ebefed9d976d 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 02f31ba3ca1481aa40603dfd4f4c4b0d1928816a..a65b4fc783c7166a6832907fe28e0bf2f2d80c31 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 3433bef8cde91456ff6e6fe0d77368feaf9e077d..94417702c13ca7fafabf366acd6d7eb497798c8c 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index f51b2d359391d9603f5fe24d56d5305ffcc4702f..0dc69c89cf4c0f94e0d02950884fd8d52c1567d6 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 0ce8d038d9b55ad76409a4a2326b9fb3e5973930..360e7b0ea0f5807faaf386adbf3c491bf7b57edd 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index c98695a4fe9743a9028ecf98e94ef141c9d3c637..3a38948b6a3ec3d4403e04dfc6c65325c6bd4384 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 99a74e73e43ebc6c4d0914ce581289b201179ab5..e225797f54d66cf182f81931b25b2d3c5fe9b928 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index b7329d17cfb7f45cde321870aafa54ba63156b27..2d37f4d0b43e4a0f54df40770734e8e92b91e9f8 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index 9558d7bb5dccbbcdbd3ac6af8aec5674f1e0011a..98deb0a1de5c145601e26678aa732f8883a3b153 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
 
 f:
         .cfi_startproc
index 09000c9627cf51d629ead023f2900637bc52cb99..568b3159cc44ca11aaa6966fb41822976d8f5d1f 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f:
        .cfi_startproc
index dd20164070e9a7c4e143291a3114a920c878a95d..b083901c137ae8902f67f39aaaf1fef7b308b92f 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 # Should use SPARC as the target to test this. However, SPARC does not
 # use MC yet.
index 61118ecec36785c1399a79b9836989b66bd28c6b..8662839b5274a48567793a83154302eed1a395a7 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 // Test that we don't produce a DW_CFA_advance_loc 0
 
index 42b0189ea603e82ccae58f5ba5c34fcc735ec964..21be615c5f39d2d823741cc41cb33fb069213b3c 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -s -sr -sd | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
 
 f1:
         .cfi_startproc
index 528193d60aed97604be98d9990789f647c01e815..a1e524662a965218f04c5057e42185e68447c130 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o - \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-readobj -r | FileCheck %s
+// RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
 
 // Test that we can use .cfi_startproc without a global symbol.
 
index 9b5de15f9ed7f8a5a38dcb78d21f17ab6a85d40a..63ac976621884bb2abfd6cd9d200b073b14c3bf3 100644 (file)
@@ -1,6 +1,4 @@
-// RUN: llvm-mc -filetype=obj %s -o - -triple x86_64-pc-linux \
-// RUN: -relocation-model=pic -code-model=small \
-// RUN: | llvm-objdump -r - | FileCheck --check-prefix=X86-64 %s
+// RUN: llvm-mc -filetype=obj %s -o - -triple x86_64-pc-linux | llvm-objdump -r - | FileCheck --check-prefix=X86-64 %s
 // RUN: llvm-mc -filetype=obj %s -o - -triple i686-pc-linux | llvm-objdump -r - | FileCheck --check-prefix=I686 %s
 
 // PR15448