[lld] r239962 - [Mips] Use new llvm-readobj -mips-reginfo flag to check .reginfo content

Simon Atanasyan simon at atanasyan.com
Wed Jun 17 15:28:41 PDT 2015


Author: atanasyan
Date: Wed Jun 17 17:28:38 2015
New Revision: 239962

URL: http://llvm.org/viewvc/llvm-project?rev=239962&view=rev
Log:
[Mips] Use new llvm-readobj -mips-reginfo flag to check .reginfo content

No functional changes.

Modified:
    lld/trunk/test/elf/Mips/reginfo-02.test
    lld/trunk/test/elf/Mips/reginfo-03.test
    lld/trunk/test/elf/Mips/reginfo-04.test
    lld/trunk/test/elf/Mips/reginfo-05.test

Modified: lld/trunk/test/elf/Mips/reginfo-02.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/reginfo-02.test?rev=239962&r1=239961&r2=239962&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/reginfo-02.test (original)
+++ lld/trunk/test/elf/Mips/reginfo-02.test Wed Jun 17 17:28:38 2015
@@ -3,43 +3,47 @@
 # RUN: yaml2obj -format=elf -docnum 1 %s > %t1.o
 # RUN: yaml2obj -format=elf -docnum 2 %s > %t2.o
 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t1.o %t2.o
-# RUN: llvm-readobj -program-headers -s %t.so | FileCheck -check-prefix=SEC %s
-# RUN: llvm-objdump -s -t %t.so | FileCheck -check-prefix=RAW %s
+# RUN: llvm-readobj -program-headers -s -t -mips-reginfo %t.so | FileCheck %s
 
-# SEC:      Index: 1
-# SEC-NEXT: Name: .reginfo (1)
-# SEC-NEXT: Type: SHT_MIPS_REGINFO
-# SEC-NEXT: Flags [
-# SEC-NEXT:   SHF_ALLOC
-# SEC-NEXT: ]
-# SEC-NEXT: Address: {{[0-9A-F]+}}
-# SEC-NEXT: Offset: {{[0-9A-F]+}}
-# SEC-NEXT: Size: 24
-# SEC-NEXT: Link: 0
-# SEC-NEXT: Info: 0
-# SEC-NEXT: AddressAlignment: 4
-# SEC-NEXT: EntrySize: 24
+# CHECK:      Index: 1
+# CHECK-NEXT: Name: .reginfo (1)
+# CHECK-NEXT: Type: SHT_MIPS_REGINFO
+# CHECK-NEXT: Flags [
+# CHECK-NEXT:   SHF_ALLOC
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: {{[0-9A-F]+}}
+# CHECK-NEXT: Offset: {{[0-9A-F]+}}
+# CHECK-NEXT: Size: 24
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 4
+# CHECK-NEXT: EntrySize: 24
 
-# SEC:      ProgramHeaders [
-# SEC-NEXT:   ProgramHeader {
-# SEC-NEXT:     Type: PT_MIPS_REGINFO
-# SEC-NEXT:     Offset: 0x{{[0-9A-F]+}}
-# SEC-NEXT:     VirtualAddress: 0x{{[0-9A-F]+}}
-# SEC-NEXT:     PhysicalAddress: 0x{{[0-9A-F]+}}
-# SEC-NEXT:     FileSize: 24
-# SEC-NEXT:     MemSize: 24
-# SEC-NEXT:     Flags [
-# SEC-NEXT:       PF_R
-# SEC-NEXT:     ]
-# SEC-NEXT:     Alignment: 4
-# SEC-NEXT:   }
+# CHECK:      Name: _gp
+# CHECK-NEXT: 0x8FF0
 
-# RAW:      Contents of section .reginfo:
-# RAW-NEXT:  {{[0-9a-f]+}} f0000001 e0000002 d0000003 c0000004
-# RAW-NEXT:  {{[0-9a-f]+}} b0000005 f08f0000
+# CHECK:      ProgramHeaders [
+# CHECK-NEXT:   ProgramHeader {
+# CHECK-NEXT:     Type: PT_MIPS_REGINFO
+# CHECK-NEXT:     Offset: 0x{{[0-9A-F]+}}
+# CHECK-NEXT:     VirtualAddress: 0x{{[0-9A-F]+}}
+# CHECK-NEXT:     PhysicalAddress: 0x{{[0-9A-F]+}}
+# CHECK-NEXT:     FileSize: 24
+# CHECK-NEXT:     MemSize: 24
+# CHECK-NEXT:     Flags [
+# CHECK-NEXT:       PF_R
+# CHECK-NEXT:     ]
+# CHECK-NEXT:     Alignment: 4
+# CHECK-NEXT:   }
 
-# RAW: SYMBOL TABLE:
-# RAW: 00008ff0 g *ABS* 00000000 _gp
+# CHECK:      MIPS RegInfo {
+# CHECK-NEXT:   GP: 0x8FF0
+# CHECK-NEXT:   General Mask: 0x10000F0
+# CHECK-NEXT:   Co-Proc Mask0: 0x20000E0
+# CHECK-NEXT:   Co-Proc Mask1: 0x30000D0
+# CHECK-NEXT:   Co-Proc Mask2: 0x40000C0
+# CHECK-NEXT:   Co-Proc Mask3: 0x50000B0
+# CHECK-NEXT: }
 
 # t1.o
 ---

Modified: lld/trunk/test/elf/Mips/reginfo-03.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/reginfo-03.test?rev=239962&r1=239961&r2=239962&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/reginfo-03.test (original)
+++ lld/trunk/test/elf/Mips/reginfo-03.test Wed Jun 17 17:28:38 2015
@@ -2,14 +2,19 @@
 
 # RUN: yaml2obj -format=elf %s > %t.o
 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.o
-# RUN: llvm-objdump -s -t %t.so | FileCheck %s
+# RUN: llvm-readobj -t -mips-reginfo %t.so | FileCheck %s
 
-# CHECK:      Contents of section .reginfo:
-# CHECK-NEXT:  {{[0-9a-f]+}} 00000000 00000000 00000000 00000000
-# CHECK-NEXT:  {{[0-9a-f]+}} 00000000 f08f0000
+# CHECK:      Name: _gp
+# CHECK-NEXT: 0x8FF0
 
-# CHECK: SYMBOL TABLE:
-# CHECK: 00008ff0 g *ABS* 00000000 _gp
+# CHECK:      MIPS RegInfo {
+# CHECK-NEXT:   GP: 0x8FF0
+# CHECK-NEXT:   General Mask: 0x0
+# CHECK-NEXT:   Co-Proc Mask0: 0x0
+# CHECK-NEXT:   Co-Proc Mask1: 0x0
+# CHECK-NEXT:   Co-Proc Mask2: 0x0
+# CHECK-NEXT:   Co-Proc Mask3: 0x0
+# CHECK-NEXT: }
 
 FileHeader:
   Class:   ELFCLASS32

Modified: lld/trunk/test/elf/Mips/reginfo-04.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/reginfo-04.test?rev=239962&r1=239961&r2=239962&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/reginfo-04.test (original)
+++ lld/trunk/test/elf/Mips/reginfo-04.test Wed Jun 17 17:28:38 2015
@@ -5,14 +5,19 @@
 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.so.o
 # RUN: yaml2obj -format=elf -docnum 2 %s > %t.exe.o
 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.so %t.exe.o
-# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
+# RUN: llvm-readobj -t -mips-reginfo %t.exe | FileCheck %s
 
-# CHECK:      Contents of section .reginfo:
-# CHECK-NEXT:  {{[0-9a-f]+}} 44444444 44444444 44444444 44444444
-# CHECK-NEXT:  {{[0-9a-f]+}} 44444444 f08f4000
+# CHECK:      Name: _gp
+# CHECK-NEXT: 0x408FF0
 
-# CHECK: SYMBOL TABLE:
-# CHECK: 00408ff0 g *ABS* 00000000 _gp
+# CHECK:      MIPS RegInfo {
+# CHECK-NEXT:   GP: 0x408FF0
+# CHECK-NEXT:   General Mask: 0x44444444
+# CHECK-NEXT:   Co-Proc Mask0: 0x44444444
+# CHECK-NEXT:   Co-Proc Mask1: 0x44444444
+# CHECK-NEXT:   Co-Proc Mask2: 0x44444444
+# CHECK-NEXT:   Co-Proc Mask3: 0x44444444
+# CHECK-NEXT: }
 
 # t.so.o
 ---

Modified: lld/trunk/test/elf/Mips/reginfo-05.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/reginfo-05.test?rev=239962&r1=239961&r2=239962&view=diff
==============================================================================
--- lld/trunk/test/elf/Mips/reginfo-05.test (original)
+++ lld/trunk/test/elf/Mips/reginfo-05.test Wed Jun 17 17:28:38 2015
@@ -7,14 +7,19 @@
 # RUN: llvm-ar q %T/libreginfo.a %t1.o %t2.o
 # RUN: yaml2obj -format=elf -docnum 3 %s > %t3.o
 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t3.o -L%T -lreginfo
-# RUN: llvm-objdump -s -t %t.exe | FileCheck %s
+# RUN: llvm-readobj -t -mips-reginfo %t.exe | FileCheck %s
 
-# CHECK:      Contents of section .reginfo:
-# CHECK-NEXT:  {{[0-9a-f]+}} 66666666 66666666 66666666 66666666
-# CHECK-NEXT:  {{[0-9a-f]+}} 66666666 f08f4000
+# CHECK:      Name: _gp
+# CHECK-NEXT: 0x408FF0
 
-# CHECK: SYMBOL TABLE:
-# CHECK: 00408ff0 g *ABS* 00000000 _gp
+# CHECK:      MIPS RegInfo {
+# CHECK-NEXT:   GP: 0x408FF0
+# CHECK-NEXT:   General Mask: 0x66666666
+# CHECK-NEXT:   Co-Proc Mask0: 0x66666666
+# CHECK-NEXT:   Co-Proc Mask1: 0x66666666
+# CHECK-NEXT:   Co-Proc Mask2: 0x66666666
+# CHECK-NEXT:   Co-Proc Mask3: 0x66666666
+# CHECK-NEXT: }
 
 # t1.o
 ---





More information about the llvm-commits mailing list