summaryrefslogtreecommitdiff
path: root/test/MC/Mips
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/Mips')
-rw-r--r--test/MC/Mips/elf-N64.ll27
-rw-r--r--test/MC/Mips/elf-bigendian.ll39
-rw-r--r--test/MC/Mips/elf-gprel-32-64.ll15
-rw-r--r--test/MC/Mips/elf-reginfo.ll21
-rw-r--r--test/MC/Mips/elf-relsym.ll20
-rw-r--r--test/MC/Mips/elf-tls.ll12
-rw-r--r--test/MC/Mips/elf_basic.s52
-rw-r--r--test/MC/Mips/elf_eflags.ll44
-rw-r--r--test/MC/Mips/elf_st_other.ll7
-rw-r--r--test/MC/Mips/expr1.s26
-rw-r--r--test/MC/Mips/higher_highest.ll12
-rw-r--r--test/MC/Mips/micromips-alu-instructions.s64
-rw-r--r--test/MC/Mips/micromips-loadstore-instructions.s22
-rw-r--r--test/MC/Mips/micromips-shift-instructions.s22
-rw-r--r--test/MC/Mips/mips-alu-instructions.s1
-rw-r--r--test/MC/Mips/mips-expansions.s1
-rw-r--r--test/MC/Mips/mips-fpu-instructions.s5
-rw-r--r--test/MC/Mips/mips-jump-instructions.s122
-rw-r--r--test/MC/Mips/mips-memory-instructions.s1
-rw-r--r--test/MC/Mips/mips-relocations.s1
-rw-r--r--test/MC/Mips/mips64-alu-instructions.s3
-rw-r--r--test/MC/Mips/mips_directives.s18
-rw-r--r--test/MC/Mips/nabi-regs.s1
-rw-r--r--test/MC/Mips/r-mips-got-disp.ll5
-rw-r--r--test/MC/Mips/set-at-directive.s1
-rw-r--r--test/MC/Mips/sym-offset.ll6
-rw-r--r--test/MC/Mips/xgot.ll35
27 files changed, 396 insertions, 187 deletions
diff --git a/test/MC/Mips/elf-N64.ll b/test/MC/Mips/elf-N64.ll
index ae6de78d65520..a1ea34a80a71a 100644
--- a/test/MC/Mips/elf-N64.ll
+++ b/test/MC/Mips/elf-N64.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -disable-mips-delay-filler %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -disable-mips-delay-filler %s -o - | llvm-readobj -r | FileCheck %s
; Check for N64 relocation production.
;
@@ -12,25 +12,12 @@ define i32 @main() nounwind {
entry:
; Check that the appropriate relocations were created.
-; R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16
-; CHECK: ('r_type3', 0x05)
-; CHECK-NEXT: ('r_type2', 0x18)
-; CHECK-NEXT: ('r_type', 0x07)
-
-; R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16
-; CHECK: ('r_type3', 0x06)
-; CHECK-NEXT: ('r_type2', 0x18)
-; CHECK-NEXT: ('r_type', 0x07)
-
-; R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE
-; CHECK: ('r_type3', 0x00)
-; CHECK-NEXT: ('r_type2', 0x00)
-; CHECK-NEXT: ('r_type', 0x14)
-
-; R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE
-; CHECK: ('r_type3', 0x00)
-; CHECK-NEXT: ('r_type2', 0x00)
-; CHECK-NEXT: ('r_type', 0x15)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_PAGE/R_MIPS_NONE/R_MIPS_NONE
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE
+; CHECK: ]
%puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @str, i64 0, i64 0))
ret i32 0
diff --git a/test/MC/Mips/elf-bigendian.ll b/test/MC/Mips/elf-bigendian.ll
index 7111debd11b18..a92fe339f88b6 100644
--- a/test/MC/Mips/elf-bigendian.ll
+++ b/test/MC/Mips/elf-bigendian.ll
@@ -1,24 +1,37 @@
-; DISABLE: llc -filetype=obj -mtriple mips-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; DISABLE: llc -filetype=obj -mtriple mips-unknown-linux %s -o - | llvm-readobj -h -s -sd | FileCheck %s
; RUN: false
; XFAIL: *
; Check that this is big endian.
-; CHECK: ('e_indent[EI_DATA]', 0x02)
+; CHECK: ElfHeader {
+; CHECK: Ident {
+; CHECK: DataEncoding: BigEndian
+; CHECK: }
+; CHECK: }
; Make sure that a section table (text) entry is correct.
-; CHECK: (('sh_name', 0x{{[0]*}}5) # '.text'
-; CHECK-NEXT: ('sh_type', 0x{{[0]*}}1)
-; CHECK-NEXT: ('sh_flags', 0x{{[0]*}}6)
-; CHECK-NEXT: ('sh_addr', 0x{{[0-9,a-f]+}})
-; CHECK-NEXT: ('sh_offset', 0x{{[0-9,a-f]+}})
-; CHECK-NEXT: ('sh_size', 0x{{[0-9,a-f]+}})
-; CHECK-NEXT: ('sh_link', 0x{{[0]+}})
-; CHECK-NEXT: ('sh_info', 0x{{[0]+}})
-; CHECK-NEXT: ('sh_addralign', 0x{{[0]*}}4)
-; CHECK-NEXT: ('sh_entsize', 0x{{[0]+}})
+; CHECK: Sections [
+; CHECK: Section {
+; CHECK: Index:
+; CHECK: Name: .text
+; CHECK-NEXT: Type: SHT_PROGBITS
+; CHECK-NEXT: Flags [ (0x6)
+; CHECK-NEXT: SHF_ALLOC
+; CHECK-NEXT: SHF_EXECINSTR
+; CHECK-NEXT: ]
+; CHECK-NEXT: Address: 0x{{[0-9,A-F]+}}
+; CHECK-NEXT: Offset: 0x{{[0-9,A-F]+}}
+; CHECK-NEXT: Size: {{[0-9]+}}
+; CHECK-NEXT: Link: 0
+; CHECK-NEXT: Info: 0
+; CHECK-NEXT: AddressAlignment: 4
+; CHECK-NEXT: EntrySize: 0
; See that at least first 3 instructions are correct: GP prologue
-; CHECK-NEXT: ('_section_data', '3c1c0000 279c0000 0399e021 {{[0-9,a-f, ]*}}')
+; CHECK-NEXT: SectionData (
+; CHECK-NEXT: 0000: 3C1C0000 279C0000 0399E021 {{[0-9,A-F, ]*}}
+; CHECK: )
+; CHECK: }
; ModuleID = '../br1.c'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32"
diff --git a/test/MC/Mips/elf-gprel-32-64.ll b/test/MC/Mips/elf-gprel-32-64.ll
index b94682214df76..47003fa1e7527 100644
--- a/test/MC/Mips/elf-gprel-32-64.ll
+++ b/test/MC/Mips/elf-gprel-32-64.ll
@@ -1,5 +1,5 @@
; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 %s -o - \
-; RUN: | elf-dump --dump-section-data \
+; RUN: | llvm-readobj -r \
; RUN: | FileCheck %s
define i32 @test(i32 %c) nounwind {
@@ -30,8 +30,11 @@ return:
; Check that the appropriate relocations were created.
; R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
-; CHECK: (('sh_name', 0x{{[a-z0-9]+}}) # '.rela.rodata'
-; CHECK: ('r_type3', 0x00)
-; CHECK-NEXT: ('r_type2', 0x12)
-; CHECK-NEXT: ('r_type', 0x0c)
-
+; CHECK: Relocations [
+; CHECK: Section ({{[a-z0-9]+}}) .rodata {
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: }
+; CHECK-NEXT: ]
diff --git a/test/MC/Mips/elf-reginfo.ll b/test/MC/Mips/elf-reginfo.ll
index 1d7a18866c503..a255af931d833 100644
--- a/test/MC/Mips/elf-reginfo.ll
+++ b/test/MC/Mips/elf-reginfo.ll
@@ -1,7 +1,7 @@
; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 %s -o - \
- ; RUN: | elf-dump --dump-section-data | FileCheck --check-prefix=CHECK_64 %s
+ ; RUN: | llvm-readobj -s | FileCheck --check-prefix=CHECK_64 %s
; RUN: llc -filetype=obj -march=mipsel -mcpu=mips32 %s -o - \
- ; RUN: | elf-dump --dump-section-data | FileCheck --check-prefix=CHECK_32 %s
+ ; RUN: | llvm-readobj -s | FileCheck --check-prefix=CHECK_32 %s
; Check for register information sections.
;
@@ -13,14 +13,18 @@ entry:
; Check that the appropriate relocations were created.
; check for .MIPS.options
-; CHECK_64: (('sh_name', 0x{{[0-9|a-f]+}}) # '.MIPS.options'
-; CHECK_64-NEXT: ('sh_type', 0x7000000d)
-; CHECK_64-NEXT: ('sh_flags', 0x0000000008000002)
+; CHECK_64: Sections [
+; CHECK_64: Section {
+; CHECK_64: Name: .MIPS.options
+; CHECK_64-NEXT: Type: SHT_MIPS_OPTIONS
+; CHECK_64-NEXT: Flags [ (0x8000002)
; check for .reginfo
-; CHECK_32: (('sh_name', 0x{{[0-9|a-f]+}}) # '.reginfo'
-; CHECK_32-NEXT: ('sh_type', 0x70000006)
-; CHECK_32-NEXT: ('sh_flags', 0x00000002)
+; CHECK_32: Sections [
+; CHECK_32: Section {
+; CHECK_32: Name: .reginfo
+; CHECK_32-NEXT: Type: SHT_MIPS_REGINFO
+; CHECK_32-NEXT: Flags [ (0x2)
%puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @str, i64 0, i64 0))
@@ -28,4 +32,3 @@ entry:
}
declare i32 @puts(i8* nocapture) nounwind
-
diff --git a/test/MC/Mips/elf-relsym.ll b/test/MC/Mips/elf-relsym.ll
index 0f74437ec5d4d..6da926273ab75 100644
--- a/test/MC/Mips/elf-relsym.ll
+++ b/test/MC/Mips/elf-relsym.ll
@@ -1,11 +1,21 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -t | FileCheck %s
; Check that the appropriate symbols were created.
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$.str'
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$.str1'
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$CPI0_0'
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$CPI0_1'
+; CHECK: Symbols [
+; CHECK: Symbol {
+; CHECK: Name: $.str
+; CHECK: }
+; CHECK: Symbol {
+; CHECK: Name: $.str1
+; CHECK: }
+; CHECK: Symbol {
+; CHECK: Name: $CPI0_0
+; CHECK: }
+; CHECK: Symbol {
+; CHECK: Name: $CPI0_1
+; CHECK: }
+; CHECK: ]
@.str = private unnamed_addr constant [6 x i8] c"abcde\00", align 1
@gc1 = external global i8*
diff --git a/test/MC/Mips/elf-tls.ll b/test/MC/Mips/elf-tls.ll
index b4183b8357793..9f604e00a0a8f 100644
--- a/test/MC/Mips/elf-tls.ll
+++ b/test/MC/Mips/elf-tls.ll
@@ -1,10 +1,14 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -r | FileCheck %s
; Check that the appropriate relocations were created.
-; CHECK: ('r_type', 0x2b)
-; CHECK: ('r_type', 0x2c)
-; CHECK: ('r_type', 0x2d)
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: R_MIPS_TLS_LDM
+; CHECK: R_MIPS_TLS_DTPREL_HI16
+; CHECK: R_MIPS_TLS_DTPREL_LO16
+; CHECK: }
+; CHECK: ]
@t1 = thread_local global i32 0, align 4
diff --git a/test/MC/Mips/elf_basic.s b/test/MC/Mips/elf_basic.s
index ffc3b112e502d..6c1e7690126dd 100644
--- a/test/MC/Mips/elf_basic.s
+++ b/test/MC/Mips/elf_basic.s
@@ -1,35 +1,41 @@
// 32 bit big endian
-// RUN: llvm-mc -filetype=obj -triple mips-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32 %s
+// RUN: llvm-mc -filetype=obj -triple mips-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32 %s
// 32 bit little endian
-// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32 %s
+// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-LE32 %s
// 64 bit big endian
-// RUN: llvm-mc -filetype=obj -arch=mips64 -triple mips64-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64 %s
+// RUN: llvm-mc -filetype=obj -arch=mips64 -triple mips64-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64 %s
// 64 bit little endian
-// RUN: llvm-mc -filetype=obj -arch=mips64el -triple mips64el-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE64 %s
+// RUN: llvm-mc -filetype=obj -arch=mips64el -triple mips64el-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-LE64 %s
// Check that we produce 32 bit with each endian.
-// This is 32 bit.
-// CHECK-BE32: ('e_indent[EI_CLASS]', 0x01)
-// This is big endian.
-// CHECK-BE32: ('e_indent[EI_DATA]', 0x02)
+// CHECK-BE32: ElfHeader {
+// CHECK-BE32: Ident {
+// CHECK-BE32: Class: 32-bit
+// CHECK-BE32: DataEncoding: BigEndian
+// CHECK-BE32: }
+// CHECK-BE32: }
-// This is 32 bit.
-// CHECK-LE32: ('e_indent[EI_CLASS]', 0x01)
-// This is little endian.
-// CHECK-LE32: ('e_indent[EI_DATA]', 0x01)
+// CHECK-LE32: ElfHeader {
+// CHECK-LE32: Ident {
+// CHECK-LE32: Class: 32-bit
+// CHECK-LE32: DataEncoding: LittleEndian
+// CHECK-LE32: }
+// CHECK-LE32: }
// Check that we produce 64 bit with each endian.
-// This is 64 bit.
-// CHECK-BE64: ('e_indent[EI_CLASS]', 0x02)
-// This is big endian.
-// CHECK-BE64: ('e_indent[EI_DATA]', 0x02)
+// CHECK-BE64: ElfHeader {
+// CHECK-BE64: Ident {
+// CHECK-BE64: Class: 64-bit
+// CHECK-BE64: DataEncoding: BigEndian
+// CHECK-BE64: }
+// CHECK-BE64: }
-// This is 64 bit.
-// CHECK-LE64: ('e_indent[EI_CLASS]', 0x02)
-// This is little endian.
-// CHECK-LE64: ('e_indent[EI_DATA]', 0x01)
-
-// Check that we are setting EI_OSABI to ELFOSABI_LINUX.
-// CHECK-LE64: ('e_indent[EI_OSABI]', 0x03)
+// CHECK-LE64: ElfHeader {
+// CHECK-LE64: Ident {
+// CHECK-LE64: Class: 64-bit
+// CHECK-LE64: DataEncoding: LittleEndian
+// CHECK-LE64: OS/ABI: GNU/Linux
+// CHECK-LE64: }
+// CHECK-LE64: }
diff --git a/test/MC/Mips/elf_eflags.ll b/test/MC/Mips/elf_eflags.ll
index 315cb812bf778..6d16a42aca2fc 100644
--- a/test/MC/Mips/elf_eflags.ll
+++ b/test/MC/Mips/elf_eflags.ll
@@ -13,52 +13,52 @@
; EF_MIPS_ARCH_32R2 (0x70000000)
; EF_MIPS_ARCH_64R2 (0x80000000)
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64R2 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64R2 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
; 32(R1) bit with NO_REORDER and static
-; CHECK-BE32: ('e_flags', 0x50001001)
+; CHECK-BE32: Flags [ (0x50001001)
;
; 32(R1) bit with NO_REORDER and PIC
-; CHECK-BE32_PIC: ('e_flags', 0x50001003)
+; CHECK-BE32_PIC: Flags [ (0x50001003)
;
; 32R2 bit with NO_REORDER and static
-; CHECK-BE32R2: ('e_flags', 0x70001001)
+; CHECK-BE32R2: Flags [ (0x70001001)
;
; 32R2 bit with NO_REORDER and PIC
-; CHECK-BE32R2_PIC: ('e_flags', 0x70001003)
+; CHECK-BE32R2_PIC: Flags [ (0x70001003)
;
; 32R2 bit MICROMIPS with NO_REORDER and static
-; CHECK-BE32R2-MICROMIPS: ('e_flags', 0x72001001)
+; CHECK-BE32R2-MICROMIPS: Flags [ (0x72001001)
;
; 32R2 bit MICROMIPS with NO_REORDER and PIC
-;CHECK-BE32R2-MICROMIPS_PIC: ('e_flags', 0x72001003)
+;CHECK-BE32R2-MICROMIPS_PIC: Flags [ (0x72001003)
;
; 64(R1) bit with NO_REORDER and static
-; CHECK-BE64: ('e_flags', 0x60000001)
+; CHECK-BE64: Flags [ (0x60000001)
;
; 64(R1) bit with NO_REORDER and PIC
-; CHECK-BE64_PIC: ('e_flags', 0x60000003)
+; CHECK-BE64_PIC: Flags [ (0x60000003)
;
; 64R2 bit with NO_REORDER and static
-; CHECK-BE64R2: ('e_flags', 0x80000001)
+; CHECK-BE64R2: Flags [ (0x80000001)
;
; 64R2 bit with NO_REORDER and PIC
-; CHECK-BE64R2_PIC: ('e_flags', 0x80000003)
+; CHECK-BE64R2_PIC: Flags [ (0x80000003)
;
; 32R2 bit MIPS16 with PIC
-; CHECK-LE32R2-MIPS16: ('e_flags', 0x74001002)
+; CHECK-LE32R2-MIPS16: Flags [ (0x74001002)
define i32 @main() nounwind {
entry:
diff --git a/test/MC/Mips/elf_st_other.ll b/test/MC/Mips/elf_st_other.ll
index f188ce7ba387c..bc56c0033e583 100644
--- a/test/MC/Mips/elf_st_other.ll
+++ b/test/MC/Mips/elf_st_other.ll
@@ -1,13 +1,12 @@
; This tests value of ELF st_other field for function symbol table entries.
; For microMIPS value should be equal to STO_MIPS_MICROMIPS.
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | llvm-readobj -t | FileCheck %s
define i32 @main() nounwind {
entry:
ret i32 0
}
-; CHECK: 'main'
-; CHECK: ('st_other', 0x80)
-
+; CHECK: Name: main
+; CHECK: Other: 128
diff --git a/test/MC/Mips/expr1.s b/test/MC/Mips/expr1.s
new file mode 100644
index 0000000000000..67664c1a2ae40
--- /dev/null
+++ b/test/MC/Mips/expr1.s
@@ -0,0 +1,26 @@
+# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
+# Check that the assembler can handle the expressions as operands.
+# CHECK: .text
+# CHECK: .globl foo
+# CHECK: foo:
+# CHECK: lw $4, %lo(foo)($4) # encoding: [A,A,0x84,0x8c]
+# CHECK: # fixup A - offset: 0, value: foo@ABS_LO, kind: fixup_Mips_LO16
+# CHECK: lw $4, 56($4) # encoding: [0x38,0x00,0x84,0x8c]
+# CHECK: lw $4, %lo(foo+8)($4) # encoding: [0x08'A',A,0x84,0x8c]
+# CHECK: # fixup A - offset: 0, value: foo@ABS_LO, kind: fixup_Mips_LO16
+# CHECK: lw $4, %lo(foo+8)($4) # encoding: [0x08'A',A,0x84,0x8c]
+# CHECK: # fixup A - offset: 0, value: foo@ABS_LO, kind: fixup_Mips_LO16
+# CHECK: lw $4, %lo(foo+8)($4) # encoding: [0x08'A',A,0x84,0x8c]
+# CHECK: # fixup A - offset: 0, value: foo@ABS_LO, kind: fixup_Mips_LO16
+# CHECK: .space 64
+
+ .globl foo
+ .ent foo
+foo:
+ lw $4,%lo(foo)($4)
+ lw $4,((10 + 4) * 4)($4)
+ lw $4,%lo (2 * 4) + foo($4)
+ lw $4,%lo((2 * 4) + foo)($4)
+ lw $4,(((%lo ((2 * 4) + foo))))($4)
+ .space 64
+ .end foo
diff --git a/test/MC/Mips/higher_highest.ll b/test/MC/Mips/higher_highest.ll
index 0c665220335bc..6c3d71f6a4b13 100644
--- a/test/MC/Mips/higher_highest.ll
+++ b/test/MC/Mips/higher_highest.ll
@@ -1,14 +1,16 @@
-; DISABLE: llc -march=mips64el -mcpu=mips64 -mattr=n64 -force-mips-long-branch -filetype=obj < %s -o - | elf-dump --dump-section-data | FileCheck %s
+; DISABLE: llc -march=mips64el -mcpu=mips64 -mattr=n64 -force-mips-long-branch -filetype=obj < %s -o - | llvm-readobj -r | FileCheck %s
; RUN: false
; XFAIL: *
; Disabled because currently we don't have a way to generate these relocations.
;
; Check that the R_MIPS_HIGHER and R_MIPS_HIGHEST relocations were created.
-; CHECK: ('r_type', 0x1d)
-; CHECK: ('r_type', 0x1d)
-; CHECK: ('r_type', 0x1c)
-; CHECK: ('r_type', 0x1c)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHEST
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHEST
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHER
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHER
+; CHECK: ]
@g0 = external global i32
diff --git a/test/MC/Mips/micromips-alu-instructions.s b/test/MC/Mips/micromips-alu-instructions.s
new file mode 100644
index 0000000000000..c541e1ace554c
--- /dev/null
+++ b/test/MC/Mips/micromips-alu-instructions.s
@@ -0,0 +1,64 @@
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips | FileCheck %s
+# Check that the assembler can handle the documented syntax
+# for arithmetic and logical instructions.
+#------------------------------------------------------------------------------
+# Arithmetic and Logical Instructions
+#------------------------------------------------------------------------------
+# CHECK: add $9, $6, $7 # encoding: [0x10,0x49,0xe6,0x00]
+# CHECK: addi $9, $6, 17767 # encoding: [0x67,0x45,0x26,0x11]
+# CHECK: addiu $9, $6, -15001 # encoding: [0x67,0xc5,0x26,0x31]
+# CHECK: addi $9, $6, 17767 # encoding: [0x67,0x45,0x26,0x11]
+# CHECK: addiu $9, $6, -15001 # encoding: [0x67,0xc5,0x26,0x31]
+# CHECK: addu $9, $6, $7 # encoding: [0x50,0x49,0xe6,0x00]
+# CHECK: sub $9, $6, $7 # encoding: [0x90,0x49,0xe6,0x00]
+# CHECK: subu $4, $3, $5 # encoding: [0xd0,0x21,0xa3,0x00]
+# CHECK: neg $6, $7 # encoding: [0x90,0x31,0xe0,0x00]
+# CHECK: negu $6, $7 # encoding: [0xd0,0x31,0xe0,0x00]
+# CHECK: move $7, $8 # encoding: [0x50,0x39,0x08,0x00]
+# CHECK: slt $3, $3, $5 # encoding: [0x50,0x1b,0xa3,0x00]
+# CHECK: slti $3, $3, 103 # encoding: [0x67,0x00,0x63,0x90]
+# CHECK: slti $3, $3, 103 # encoding: [0x67,0x00,0x63,0x90]
+# CHECK: sltiu $3, $3, 103 # encoding: [0x67,0x00,0x63,0xb0]
+# CHECK: sltu $3, $3, $5 # encoding: [0x90,0x1b,0xa3,0x00]
+# CHECK: and $9, $6, $7 # encoding: [0x50,0x4a,0xe6,0x00]
+# CHECK: andi $9, $6, 17767 # encoding: [0x67,0x45,0x26,0xd1]
+# CHECK: andi $9, $6, 17767 # encoding: [0x67,0x45,0x26,0xd1]
+# CHECK: or $3, $4, $5 # encoding: [0x90,0x1a,0xa4,0x00]
+# CHECK: ori $9, $6, 17767 # encoding: [0x67,0x45,0x26,0x51]
+# CHECK: xor $3, $3, $5 # encoding: [0x10,0x1b,0xa3,0x00]
+# CHECK: xori $9, $6, 17767 # encoding: [0x67,0x45,0x26,0x71]
+# CHECK: xori $9, $6, 17767 # encoding: [0x67,0x45,0x26,0x71]
+# CHECK: nor $9, $6, $7 # encoding: [0xd0,0x4a,0xe6,0x00]
+# CHECK: not $7, $8 # encoding: [0xd0,0x3a,0x08,0x00]
+# CHECK: mul $9, $6, $7 # encoding: [0x10,0x4a,0xe6,0x00]
+# CHECK: mult $9, $7 # encoding: [0x3c,0x8b,0xe9,0x00]
+# CHECK: multu $9, $7 # encoding: [0x3c,0x9b,0xe9,0x00]
+ add $9, $6, $7
+ add $9, $6, 17767
+ addu $9, $6, -15001
+ addi $9, $6, 17767
+ addiu $9, $6,-15001
+ addu $9, $6, $7
+ sub $9, $6, $7
+ subu $4, $3, $5
+ neg $6, $7
+ negu $6, $7
+ move $7, $8
+ slt $3, $3, $5
+ slt $3, $3, 103
+ slti $3, $3, 103
+ sltiu $3, $3, 103
+ sltu $3, $3, $5
+ and $9, $6, $7
+ and $9, $6, 17767
+ andi $9, $6, 17767
+ or $3, $4, $5
+ ori $9, $6, 17767
+ xor $3, $3, $5
+ xor $9, $6, 17767
+ xori $9, $6, 17767
+ nor $9, $6, $7
+ nor $7, $8, $zero
+ mul $9, $6, $7
+ mult $9, $7
+ multu $9, $7
diff --git a/test/MC/Mips/micromips-loadstore-instructions.s b/test/MC/Mips/micromips-loadstore-instructions.s
new file mode 100644
index 0000000000000..623e2acdcbf6a
--- /dev/null
+++ b/test/MC/Mips/micromips-loadstore-instructions.s
@@ -0,0 +1,22 @@
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips | FileCheck %s
+# Check that the assembler can handle the documented syntax
+# for load and store instructions.
+#------------------------------------------------------------------------------
+# Load and Store Instructions
+#------------------------------------------------------------------------------
+# CHECK: lb $5, 8($4) # encoding: [0x08,0x00,0xa4,0x1c]
+# CHECK: lbu $6, 8($4) # encoding: [0x08,0x00,0xc4,0x14]
+# CHECK: lh $2, 8($4) # encoding: [0x08,0x00,0x44,0x3c]
+# CHECK: lhu $4, 8($2) # encoding: [0x08,0x00,0x82,0x34]
+# CHECK: lw $6, 4($5) # encoding: [0x04,0x00,0xc5,0xfc]
+# CHECK: sb $5, 8($4) # encoding: [0x08,0x00,0xa4,0x18]
+# CHECK: sh $2, 8($4) # encoding: [0x08,0x00,0x44,0x38]
+# CHECK: sw $5, 4($6) # encoding: [0x04,0x00,0xa6,0xf8]
+ lb $5, 8($4)
+ lbu $6, 8($4)
+ lh $2, 8($4)
+ lhu $4, 8($2)
+ lw $6, 4($5)
+ sb $5, 8($4)
+ sh $2, 8($4)
+ sw $5, 4($6)
diff --git a/test/MC/Mips/micromips-shift-instructions.s b/test/MC/Mips/micromips-shift-instructions.s
new file mode 100644
index 0000000000000..3b5060f5280ef
--- /dev/null
+++ b/test/MC/Mips/micromips-shift-instructions.s
@@ -0,0 +1,22 @@
+# RUN: llvm-mc %s -triple=mipsel -show-encoding -mcpu=mips32r2 -mattr=micromips | FileCheck %s
+# Check that the assembler can handle the documented syntax
+# for shift instructions.
+#------------------------------------------------------------------------------
+# Shift Instructions
+#------------------------------------------------------------------------------
+# CHECK: sll $4, $3, 7 # encoding: [0x00,0x38,0x83,0x00]
+# CHECK: sllv $2, $3, $5 # encoding: [0x10,0x10,0x65,0x00]
+# CHECK: sra $4, $3, 7 # encoding: [0x80,0x38,0x83,0x00]
+# CHECK: srav $2, $3, $5 # encoding: [0x90,0x10,0x65,0x00]
+# CHECK: srl $4, $3, 7 # encoding: [0x40,0x38,0x83,0x00]
+# CHECK: srlv $2, $3, $5 # encoding: [0x50,0x10,0x65,0x00]
+# CHECK: rotr $9, $6, 7 # encoding: [0xc0,0x38,0x26,0x01]
+# CHECK: rotrv $9, $6, $7 # encoding: [0xd0,0x48,0xc7,0x00]
+ sll $4, $3, 7
+ sllv $2, $3, $5
+ sra $4, $3, 7
+ srav $2, $3, $5
+ srl $4, $3, 7
+ srlv $2, $3, $5
+ rotr $9, $6, 7
+ rotrv $9, $6, $7
diff --git a/test/MC/Mips/mips-alu-instructions.s b/test/MC/Mips/mips-alu-instructions.s
index 7384d19e440f4..586e88bc48141 100644
--- a/test/MC/Mips/mips-alu-instructions.s
+++ b/test/MC/Mips/mips-alu-instructions.s
@@ -1,7 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
# Check that the assembler can handle the documented syntax
# for arithmetic and logical instructions.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
#------------------------------------------------------------------------------
# Logical instructions
#------------------------------------------------------------------------------
diff --git a/test/MC/Mips/mips-expansions.s b/test/MC/Mips/mips-expansions.s
index 3385fe19309f7..1622965a4139b 100644
--- a/test/MC/Mips/mips-expansions.s
+++ b/test/MC/Mips/mips-expansions.s
@@ -1,7 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
# Check that the assembler can handle the documented syntax
# for macro instructions
-# CHECK: .section __TEXT,__text,regular,pure_instructions
#------------------------------------------------------------------------------
# Load immediate instructions
#------------------------------------------------------------------------------
diff --git a/test/MC/Mips/mips-fpu-instructions.s b/test/MC/Mips/mips-fpu-instructions.s
index a126c6f7188cd..e515872f260a5 100644
--- a/test/MC/Mips/mips-fpu-instructions.s
+++ b/test/MC/Mips/mips-fpu-instructions.s
@@ -1,7 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
# Check that the assembler can handle the documented syntax
# for FPU instructions.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
#------------------------------------------------------------------------------
# FP aritmetic instructions
#------------------------------------------------------------------------------
@@ -157,6 +156,8 @@
# CHECK: mtc0 $9, $8, 3 # encoding: [0x03,0x40,0x89,0x40]
# CHECK: mfc2 $5, $7, 4 # encoding: [0x04,0x38,0x05,0x48]
# CHECK: mtc2 $9, $4, 5 # encoding: [0x05,0x20,0x89,0x48]
+# CHECK: movf $2, $1, $fcc0 # encoding: [0x01,0x10,0x20,0x00]
+# CHECK: movt $2, $1, $fcc0 # encoding: [0x01,0x10,0x21,0x00]
cfc1 $a2,$0
mfc1 $a2,$f7
@@ -176,3 +177,5 @@
mtc0 $9, $8, 3
mfc2 $5, $7, 4
mtc2 $9, $4, 5
+ movf $2, $1, $fcc0
+ movt $2, $1, $fcc0
diff --git a/test/MC/Mips/mips-jump-instructions.s b/test/MC/Mips/mips-jump-instructions.s
index 1dcb287738ced..597f6872d60f5 100644
--- a/test/MC/Mips/mips-jump-instructions.s
+++ b/test/MC/Mips/mips-jump-instructions.s
@@ -1,31 +1,54 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
-# RUN: FileCheck %s
+# RUN: FileCheck -check-prefix=CHECK32 %s
+# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64r2 | \
+# RUN: FileCheck -check-prefix=CHECK64 %s
+
# Check that the assembler can handle the documented syntax
# for jumps and branches.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
#------------------------------------------------------------------------------
# Branch instructions
#------------------------------------------------------------------------------
-# CHECK: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+
+# CHECK64: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
.set noreorder
@@ -54,24 +77,43 @@ end_of_code:
#------------------------------------------------------------------------------
# Jump instructions
#------------------------------------------------------------------------------
-# CHECK: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jalr $6 # encoding: [0x09,0xf8,0xc0,0x00]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jalr $10, $11 # encoding: [0x09,0x50,0x60,0x01]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
-# CHECK: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
-# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $6 # encoding: [0x09,0xf8,0xc0,0x00]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $10, $11 # encoding: [0x09,0x50,0x60,0x01]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK32: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
+# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
+
+# CHECK64: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $6 # encoding: [0x09,0xf8,0xc0,0x00]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $10, $11 # encoding: [0x09,0x50,0x60,0x01]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK64: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
+# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
j 1328
diff --git a/test/MC/Mips/mips-memory-instructions.s b/test/MC/Mips/mips-memory-instructions.s
index b5f1267ef386c..c8b055906ebbf 100644
--- a/test/MC/Mips/mips-memory-instructions.s
+++ b/test/MC/Mips/mips-memory-instructions.s
@@ -1,7 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
# Check that the assembler can handle the documented syntax
# for loads and stores.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
#------------------------------------------------------------------------------
# Memory store instructions
#------------------------------------------------------------------------------
diff --git a/test/MC/Mips/mips-relocations.s b/test/MC/Mips/mips-relocations.s
index ff71c7559cd01..6f095d1ecdffe 100644
--- a/test/MC/Mips/mips-relocations.s
+++ b/test/MC/Mips/mips-relocations.s
@@ -1,7 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | FileCheck %s
# Check that the assembler can handle the documented syntax
# for relocations.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
# CHECK: lui $2, %hi(_gp_disp) # encoding: [A,A,0x02,0x3c]
# CHECK: # fixup A - offset: 0, value: _gp_disp@ABS_HI, kind: fixup_Mips_HI16
# CHECK: addiu $2, $2, %lo(_gp_disp) # encoding: [A,A,0x42,0x24]
diff --git a/test/MC/Mips/mips64-alu-instructions.s b/test/MC/Mips/mips64-alu-instructions.s
index 1b4ebdfbbd490..db6c972b3b49d 100644
--- a/test/MC/Mips/mips64-alu-instructions.s
+++ b/test/MC/Mips/mips64-alu-instructions.s
@@ -1,7 +1,6 @@
# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64r2 | FileCheck %s
# Check that the assembler can handle the documented syntax
# for arithmetic and logical instructions.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
#------------------------------------------------------------------------------
# Logical instructions
#------------------------------------------------------------------------------
@@ -13,6 +12,7 @@
# CHECK: ins $19, $9, 6, 7 # encoding: [0x84,0x61,0x33,0x7d]
# CHECK: nor $9, $6, $7 # encoding: [0x27,0x48,0xc7,0x00]
# CHECK: or $3, $3, $5 # encoding: [0x25,0x18,0x65,0x00]
+# CHECK: ori $4, $5, 17767 # encoding: [0x67,0x45,0xa4,0x34]
# CHECK: ori $9, $6, 17767 # encoding: [0x67,0x45,0xc9,0x34]
# CHECK: rotr $9, $6, 7 # encoding: [0xc2,0x49,0x26,0x00]
# CHECK: rotrv $9, $6, $7 # encoding: [0x46,0x48,0xe6,0x00]
@@ -40,6 +40,7 @@
ins $19, $9, 6,7
nor $9, $6, $7
or $3, $3, $5
+ or $4, $5, 17767
ori $9, $6, 17767
rotr $9, $6, 7
rotrv $9, $6, $7
diff --git a/test/MC/Mips/mips_directives.s b/test/MC/Mips/mips_directives.s
index df7e64563371f..45247cd162b53 100644
--- a/test/MC/Mips/mips_directives.s
+++ b/test/MC/Mips/mips_directives.s
@@ -1,11 +1,20 @@
# RUN: llvm-mc -show-encoding -triple mips-unknown-unknown %s | FileCheck %s
#
+# CHECK: .text
+# CHECK: $BB0_2:
$BB0_2:
.ent directives_test
.frame $sp,0,$ra
.mask 0x00000000,0
.fmask 0x00000000,0
+# CHECK: b 1332 # encoding: [0x10,0x00,0x01,0x4d]
+# CHECK: j 1328 # encoding: [0x08,0x00,0x01,0x4c]
+# CHECK: jal 1328 # encoding: [0x0c,0x00,0x01,0x4c]
+
.set noreorder
+ b 1332
+ j 1328
+ jal 1328
.set nomacro
.set noat
$JTI0_0:
@@ -15,7 +24,16 @@ $JTI0_0:
# CHECK-NEXT: .4byte 2013265916
.set at=$12
.set macro
+# CHECK: b 1332 # encoding: [0x10,0x00,0x01,0x4d]
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK: j 1328 # encoding: [0x08,0x00,0x01,0x4c]
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
+# CHECK: jal 1328 # encoding: [0x0c,0x00,0x01,0x4c]
+# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
.set reorder
+ b 1332
+ j 1328
+ jal 1328
.set at=$a0
.set STORE_MASK,$t7
.set FPU_MASK,$f7
diff --git a/test/MC/Mips/nabi-regs.s b/test/MC/Mips/nabi-regs.s
index 9371208a2a9e8..050fb8134880d 100644
--- a/test/MC/Mips/nabi-regs.s
+++ b/test/MC/Mips/nabi-regs.s
@@ -8,7 +8,6 @@
# RUN: -mcpu=mips64r2 -arch=mips64 | \
# RUN: FileCheck %s
-# CHECK: .section __TEXT,__text,regular,pure_instructions
.text
foo:
diff --git a/test/MC/Mips/r-mips-got-disp.ll b/test/MC/Mips/r-mips-got-disp.ll
index 73396ac5139dd..7e78a46649d8e 100644
--- a/test/MC/Mips/r-mips-got-disp.ll
+++ b/test/MC/Mips/r-mips-got-disp.ll
@@ -1,8 +1,9 @@
-; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s -o - | llvm-readobj -r | FileCheck %s
; Check that the R_MIPS_GOT_DISP relocations were created.
-; CHECK: ('r_type', 0x13)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_DISP
@shl = global i64 1, align 8
@.str = private unnamed_addr constant [8 x i8] c"0x%llx\0A\00", align 1
diff --git a/test/MC/Mips/set-at-directive.s b/test/MC/Mips/set-at-directive.s
index 98a3a35b54280..828175a223a7f 100644
--- a/test/MC/Mips/set-at-directive.s
+++ b/test/MC/Mips/set-at-directive.s
@@ -3,7 +3,6 @@
# Check that the assembler can handle the documented syntax
# for ".set at" and set the correct value.
-# CHECK: .section __TEXT,__text,regular,pure_instructions
.text
foo:
# CHECK: jr $1 # encoding: [0x08,0x00,0x20,0x00]
diff --git a/test/MC/Mips/sym-offset.ll b/test/MC/Mips/sym-offset.ll
index 5162c913ad068..c7450f74ae41c 100644
--- a/test/MC/Mips/sym-offset.ll
+++ b/test/MC/Mips/sym-offset.ll
@@ -1,4 +1,4 @@
-; DISABLED: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; DISABLED: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -s -sd | FileCheck %s
; RUN: false
; XFAIL: *
@@ -13,7 +13,9 @@ entry:
; 8841000e lwl at,14(v0)
; 9841000b lwr at,11(v0)
-; CHECK: ('_section_data', '00001c3c 00009c27 21e09903 0000828f 0e004188 0b004198
+; CHECK: SectionData (
+; CHECK: 0000: 00001C3C 00009C27 21E09903 0000828F
+; CHECK-NEXT: 0010: 0E004188 0B004198
%call = tail call i32 @memcmp(i8* getelementptr inbounds ([11 x i8]* @string1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @string2, i32 0, i32 0), i32 4) nounwind readonly
%cmp = icmp eq i32 %call, 0
diff --git a/test/MC/Mips/xgot.ll b/test/MC/Mips/xgot.ll
index bfe9b9ad6604c..e2a500ffdeeac 100644
--- a/test/MC/Mips/xgot.ll
+++ b/test/MC/Mips/xgot.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | llvm-readobj -r | FileCheck %s
@.str = private unnamed_addr constant [16 x i8] c"ext_1=%d, i=%d\0A\00", align 1
@ext_1 = external global i32
@@ -9,29 +9,16 @@ entry:
; Check that the appropriate relocations were created.
; For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.
-; R_MIPS_HI16
-; CHECK: ('r_type', 0x05)
-
-; R_MIPS_LO16
-; CHECK: ('r_type', 0x06)
-
-; R_MIPS_GOT_HI16
-; CHECK: ('r_type', 0x16)
-
-; R_MIPS_GOT_LO16
-; CHECK: ('r_type', 0x17)
-
-; R_MIPS_GOT
-; CHECK: ('r_type', 0x09)
-
-; R_MIPS_LO16
-; CHECK: ('r_type', 0x06)
-
-; R_MIPS_CALL_HI16
-; CHECK: ('r_type', 0x1e)
-
-; R_MIPS_CALL_LO16
-; CHECK: ('r_type', 0x1f)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_CALL_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_CALL_LO16
+; CHECK: ]
%0 = load i32* @ext_1, align 4
%call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8]* @.str, i32 0, i32 0), i32 %0) nounwind