From: Rafael Espindola Date: Thu, 27 Nov 2014 17:13:51 +0000 (+0000) Subject: Revert "Reapply 222538 and update tests to explicitly request small code model and... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3323f0bd9bcc445d71631ea958e84dee1f103ae;p=platform%2Fupstream%2Fllvm.git Revert "Reapply 222538 and update tests to explicitly request small code model and PIC:" 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. llvm-svn: 222896 --- diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 96929e5..7886ab6 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -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; diff --git a/llvm/test/MC/ELF/cfi-adjust-cfa-offset.s b/llvm/test/MC/ELF/cfi-adjust-cfa-offset.s index f31a6b0..9d639f7 100644 --- a/llvm/test/MC/ELF/cfi-adjust-cfa-offset.s +++ b/llvm/test/MC/ELF/cfi-adjust-cfa-offset.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-advance-loc2.s b/llvm/test/MC/ELF/cfi-advance-loc2.s index c11ccaf..98caa018 100644 --- a/llvm/test/MC/ELF/cfi-advance-loc2.s +++ b/llvm/test/MC/ELF/cfi-advance-loc2.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-def-cfa-offset.s b/llvm/test/MC/ELF/cfi-def-cfa-offset.s index 93158ce..59f7400 100644 --- a/llvm/test/MC/ELF/cfi-def-cfa-offset.s +++ b/llvm/test/MC/ELF/cfi-def-cfa-offset.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-def-cfa-register.s b/llvm/test/MC/ELF/cfi-def-cfa-register.s index 8c55053..178ba32 100644 --- a/llvm/test/MC/ELF/cfi-def-cfa-register.s +++ b/llvm/test/MC/ELF/cfi-def-cfa-register.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-def-cfa.s b/llvm/test/MC/ELF/cfi-def-cfa.s index f0b4934..dfb0d4b 100644 --- a/llvm/test/MC/ELF/cfi-def-cfa.s +++ b/llvm/test/MC/ELF/cfi-def-cfa.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-escape.s b/llvm/test/MC/ELF/cfi-escape.s index 3b76746..5394ee4 100644 --- a/llvm/test/MC/ELF/cfi-escape.s +++ b/llvm/test/MC/ELF/cfi-escape.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-offset.s b/llvm/test/MC/ELF/cfi-offset.s index 02f31ba..a65b4fc 100644 --- a/llvm/test/MC/ELF/cfi-offset.s +++ b/llvm/test/MC/ELF/cfi-offset.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-register.s b/llvm/test/MC/ELF/cfi-register.s index 3433bef..9441770 100644 --- a/llvm/test/MC/ELF/cfi-register.s +++ b/llvm/test/MC/ELF/cfi-register.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-rel-offset.s b/llvm/test/MC/ELF/cfi-rel-offset.s index f51b2d3..0dc69c8 100644 --- a/llvm/test/MC/ELF/cfi-rel-offset.s +++ b/llvm/test/MC/ELF/cfi-rel-offset.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-rel-offset2.s b/llvm/test/MC/ELF/cfi-rel-offset2.s index 0ce8d03..360e7b0 100644 --- a/llvm/test/MC/ELF/cfi-rel-offset2.s +++ b/llvm/test/MC/ELF/cfi-rel-offset2.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-remember.s b/llvm/test/MC/ELF/cfi-remember.s index c98695a..3a38948 100644 --- a/llvm/test/MC/ELF/cfi-remember.s +++ b/llvm/test/MC/ELF/cfi-remember.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-restore.s b/llvm/test/MC/ELF/cfi-restore.s index 99a74e7..e225797 100644 --- a/llvm/test/MC/ELF/cfi-restore.s +++ b/llvm/test/MC/ELF/cfi-restore.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-same-value.s b/llvm/test/MC/ELF/cfi-same-value.s index b7329d1..2d37f4d 100644 --- a/llvm/test/MC/ELF/cfi-same-value.s +++ b/llvm/test/MC/ELF/cfi-same-value.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-signal-frame.s b/llvm/test/MC/ELF/cfi-signal-frame.s index 9558d7b..98deb0a 100644 --- a/llvm/test/MC/ELF/cfi-signal-frame.s +++ b/llvm/test/MC/ELF/cfi-signal-frame.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-undefined.s b/llvm/test/MC/ELF/cfi-undefined.s index 09000c9..568b315 100644 --- a/llvm/test/MC/ELF/cfi-undefined.s +++ b/llvm/test/MC/ELF/cfi-undefined.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi-window-save.s b/llvm/test/MC/ELF/cfi-window-save.s index dd20164..b083901 100644 --- a/llvm/test/MC/ELF/cfi-window-save.s +++ b/llvm/test/MC/ELF/cfi-window-save.s @@ -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. diff --git a/llvm/test/MC/ELF/cfi-zero-addr-delta.s b/llvm/test/MC/ELF/cfi-zero-addr-delta.s index 61118ec..8662839 100644 --- a/llvm/test/MC/ELF/cfi-zero-addr-delta.s +++ b/llvm/test/MC/ELF/cfi-zero-addr-delta.s @@ -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 diff --git a/llvm/test/MC/ELF/cfi.s b/llvm/test/MC/ELF/cfi.s index 42b0189..21be615 100644 --- a/llvm/test/MC/ELF/cfi.s +++ b/llvm/test/MC/ELF/cfi.s @@ -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 diff --git a/llvm/test/MC/ELF/pr19430.s b/llvm/test/MC/ELF/pr19430.s index 528193d..a1e5246 100644 --- a/llvm/test/MC/ELF/pr19430.s +++ b/llvm/test/MC/ELF/pr19430.s @@ -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. diff --git a/llvm/test/MC/X86/fde-reloc.s b/llvm/test/MC/X86/fde-reloc.s index 9b5de15..63ac976 100644 --- a/llvm/test/MC/X86/fde-reloc.s +++ b/llvm/test/MC/X86/fde-reloc.s @@ -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