[llvm] r314222 - [mips] Use llvm-dwarfdump to simplify the test. NFC

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 10:02:35 PDT 2017


Author: atanasyan
Date: Tue Sep 26 10:02:35 2017
New Revision: 314222

URL: http://llvm.org/viewvc/llvm-project?rev=314222&view=rev
Log:
[mips] Use llvm-dwarfdump to simplify the test. NFC

Modified:
    llvm/trunk/test/MC/Mips/eh-frame.s

Modified: llvm/trunk/test/MC/Mips/eh-frame.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/eh-frame.s?rev=314222&r1=314221&r2=314222&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/eh-frame.s (original)
+++ llvm/trunk/test/MC/Mips/eh-frame.s Tue Sep 26 10:02:35 2017
@@ -1,167 +1,58 @@
 // Test the bits of .eh_frame on mips that are already implemented correctly.
 
-// FIXME: This test would be a lot cleaner if llvm-objdump had the
-// --dwarf=frames option.
-
 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mips
-// RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS32 %s
+// RUN: llvm-objdump -r -section=.rel.eh_frame %t.o | FileCheck --check-prefix=REL32 %s
+// RUN: llvm-dwarfdump -eh-frame %t.o | FileCheck --check-prefix=DWARF32 %s
 
 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mipsel
-// RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS32EL %s
+// RUN: llvm-objdump -r -section=.rel.eh_frame %t.o | FileCheck --check-prefix=REL32 %s
+// RUN: llvm-dwarfdump -eh-frame %t.o | FileCheck --check-prefix=DWARF32 %s
 
 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mips64
-// RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS64 %s
+// RUN: llvm-objdump -r -section=.rela.eh_frame %t.o | FileCheck --check-prefix=REL64 %s
+// RUN: llvm-dwarfdump -eh-frame %t.o | FileCheck --check-prefix=DWARF64 %s
 
 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mips64el
-// RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS64EL %s
+// RUN: llvm-objdump -r -section=.rela.eh_frame %t.o | FileCheck --check-prefix=REL64 %s
+// RUN: llvm-dwarfdump -eh-frame %t.o | FileCheck --check-prefix=DWARF64 %s
 
 func:
 	.cfi_startproc
 	.cfi_endproc
 
-// MIPS32: RELOCATION RECORDS FOR [.rel.eh_frame]:
-// MIPS32-NEXT: R_MIPS_32
-// MIPS32: Contents of section .eh_frame:
-// MIPS32-NEXT: 0000
-
-// Length
-// MIPS32: 00000010
-
-// CIE ID
-// MIPS32: 00000000
-
-// Version
-// MIPS32: 01
-
-// Augmentation String
-// MIPS32: 7a5200
-
-// Code Alignment Factor
-// MIPS32: 01
-
-// Data Alignment Factor (-4)
-// MIPS32: 7c
-
-// Return Address Register
-// MIPS32: 1f
-
-// Augmentation Size
-// MIPS32: 01
-
-// MIPS32: .........zR..|..
-// MIPS32-NEXT: 0010
-
-// Augmentation (fde pointer encoding: DW_EH_PE_sdata4)
-// MIPS32: 0b
-// FIXME: The instructions are different from the ones produces by gas.
-
-// MIPS32EL: RELOCATION RECORDS FOR [.rel.eh_frame]:
-// MIPS32EL-NEXT: R_MIPS_32
-// MIPS32EL: Contents of section .eh_frame:
-// MIPS32EL-NEXT: 0000
-
-// Length
-// MIPS32EL: 10000000
-
-// CIE ID
-// MIPS32EL: 00000000
-
-// Version
-// MIPS32EL: 01
-
-// Augmentation String
-// MIPS32EL: 7a5200
-
-// Code Alignment Factor
-// MIPS32EL: 01
-
-// Data Alignment Factor (-4)
-// MIPS32EL: 7c
-
-// Return Address Register
-// MIPS32EL: 1f
-
-// Augmentation Size
-// MIPS32EL: 01
-
-// MIPS32EL: .........zR..|..
-// MIPS32EL-NEXT: 0010
-
-// Augmentation (fde pointer encoding: DW_EH_PE_sdata4)
-// MIPS32EL: 0b
-// FIXME: The instructions are different from the ones produces by gas.
-
-// MIPS64: RELOCATION RECORDS FOR [.rela.eh_frame]:
-// MIPS64-NEXT: R_MIPS_64
-// MIPS64: Contents of section .eh_frame:
-// MIPS64-NEXT: 0000
-
-// Length
-// MIPS64: 00000010
-
-// CIE ID
-// MIPS64: 00000000
-
-// Version
-// MIPS64: 01
-
-// Augmentation String
-// MIPS64: 7a5200
+// REL32: R_MIPS_32
+// REL64: R_MIPS_64/R_MIPS_NONE/R_MIPS_NONE
 
-// Code Alignment Factor
-// MIPS64: 01
-
-// Data Alignment Factor (-8). GAS uses -4. Should be ok as long as all
-// offsets we need are a multiple of 8.
-// MIPS64: 78
-
-// Return Address Register
-// MIPS64: 1f
-
-// Augmentation Size
-// MIPS64: 01
-
-// MIPS64: .........zR..x..
-// MIPS64-NEXT: 0010
-
-// Augmentation (fde pointer encoding: DW_EH_PE_sdata8)
-// MIPS64: 0c
+// DWARF32: 00000000 00000010 ffffffff CIE
+// DWARF32:   Version:               1
+// DWARF32:   Augmentation:          "zR"
+// DWARF32:   Code alignment factor: 1
+// DWARF32:   Data alignment factor: -4
+// DWARF32:   Return address column: 31
+// DWARF32:   Augmentation data:     0B
+//                                   ^^ fde pointer encoding: DW_EH_PE_sdata4
+// DWARF32:   DW_CFA_def_cfa: reg29 +0
 // FIXME: The instructions are different from the ones produces by gas.
-
-
-// MIPS64EL: RELOCATION RECORDS FOR [.rela.eh_frame]:
-// MIPS64EL-NEXT: R_MIPS_64
-// MIPS64EL: Contents of section .eh_frame:
-// MIPS64EL-NEXT: 0000
-
-// Length
-// MIPS64EL: 10000000
-
-// CIE ID
-// MIPS64EL: 00000000
-
-// Version
-// MIPS64EL: 01
-
-// Augmentation String
-// MIPS64EL: 7a5200
-
-// Code Alignment Factor
-// MIPS64EL: 01
-
-// Data Alignment Factor (-8). GAS uses -4. Should be ok as long as all
-// offsets we need are a multiple of 8.
-// MIPS64EL: 78
-
-// Return Address Register
-// MIPS64EL: 1f
-
-// Augmentation Size
-// MIPS64EL: 01
-
-// MIPS64EL: .........zR..x..
-// MIPS64EL-NEXT: 0010
-
-// Augmentation (fde pointer encoding: DW_EH_PE_sdata8)
-// MIPS64EL: 0c
+//
+// DWARF32: 00000014 00000010 00000018 FDE cie=00000018 pc=00000000...00000000
+// DWARF32:   DW_CFA_nop:
+// DWARF32:   DW_CFA_nop:
+// DWARF32:   DW_CFA_nop:
+
+// DWARF64: 00000000 00000010 ffffffff CIE
+// DWARF64:   Version:               1
+// DWARF64:   Augmentation:          "zR"
+// DWARF64:   Code alignment factor: 1
+// DWARF64:   Data alignment factor: -8
+//                                   ^^ GAS uses -4. Should be ok as long as
+//                                      all offsets we need are a multiple of 8.
+// DWARF64:   Return address column: 31
+// DWARF64:   Augmentation data:     0C
+//                                   ^^ fde pointer encoding: DW_EH_PE_sdata8
+// DWARF64:   DW_CFA_def_cfa: reg29 +0
 // FIXME: The instructions are different from the ones produces by gas.
+//
+// DWARF64: 00000014 00000018 00000018 FDE cie=00000018 pc=00000000...00000000
+// DWARF64:   DW_CFA_nop:
+// DWARF64:   DW_CFA_nop:
+// DWARF64:   DW_CFA_nop:




More information about the llvm-commits mailing list