diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-06-10 20:36:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-06-10 20:36:52 +0000 |
commit | 59d6cff90eecf31cb3dd860c4e786674cfdd42eb (patch) | |
tree | 909310b2e05119d1d6efda049977042abbb58bb1 /test/MC | |
parent | 4a16efa3e43e35f0cc9efe3a67f620f0017c3d36 (diff) | |
download | src-59d6cff90eecf31cb3dd860c4e786674cfdd42eb.tar.gz src-59d6cff90eecf31cb3dd860c4e786674cfdd42eb.zip |
Vendor import of llvm tags/RELEASE_33/final r183502 (effectively, 3.3vendor/llvm/llvm-release_33-r183502
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=251607
svn path=/vendor/llvm/llvm-release_33-r183502/; revision=251608; tag=vendor/llvm/llvm-release_33-r183502
Diffstat (limited to 'test/MC')
773 files changed, 16309 insertions, 4794 deletions
diff --git a/test/MC/AArch64/elf-globaladdress.ll b/test/MC/AArch64/elf-globaladdress.ll index 190439d8fe48..942920be4de2 100644 --- a/test/MC/AArch64/elf-globaladdress.ll +++ b/test/MC/AArch64/elf-globaladdress.ll @@ -1,10 +1,10 @@ ;; RUN: llc -mtriple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ -;; RUN: elf-dump | FileCheck -check-prefix=OBJ %s +;; RUN: llvm-readobj -h -r | FileCheck -check-prefix=OBJ %s ; Also take it on a round-trip through llvm-mc to stretch assembly-parsing's legs: ;; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - | \ -;; RUN: llvm-mc -arch=aarch64 -filetype=obj -o - | \ -;; RUN: elf-dump | FileCheck -check-prefix=OBJ %s +;; RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj -o - | \ +;; RUN: llvm-readobj -h -r | FileCheck -check-prefix=OBJ %s @var8 = global i8 0 @var16 = global i16 0 @@ -35,77 +35,28 @@ define void @address() { } ; Check we're using EM_AARCH64 -; OBJ: 'e_machine', 0x00 - -; OBJ: .rela.text - -; var8 -; R_AARCH64_ADR_PREL_PG_HI21 against var8 -; OBJ: 'r_sym', 0x0000000f -; OBJ-NEXT: 'r_type', 0x00000113 - -; R_AARCH64_LDST8_ABS_LO12_NC against var8 -; OBJ: 'r_sym', 0x0000000f -; OBJ-NEXT: 'r_type', 0x00000116 - - -; var16 -; R_AARCH64_ADR_PREL_PG_HI21 against var16 -; OBJ: 'r_sym', 0x0000000c -; OBJ-NEXT: 'r_type', 0x00000113 - -; R_AARCH64_LDST16_ABS_LO12_NC against var16 -; OBJ: 'r_sym', 0x0000000c -; OBJ-NEXT: 'r_type', 0x0000011c - - -; var32 -; R_AARCH64_ADR_PREL_PG_HI21 against var32 -; OBJ: 'r_sym', 0x0000000d -; OBJ-NEXT: 'r_type', 0x00000113 - -; R_AARCH64_LDST32_ABS_LO12_NC against var32 -; OBJ: 'r_sym', 0x0000000d -; OBJ-NEXT: 'r_type', 0x0000011d - - -; var64 -; R_AARCH64_ADR_PREL_PG_HI21 against var64 -; OBJ: 'r_sym', 0x0000000e -; OBJ-NEXT: 'r_type', 0x00000113 - -; R_AARCH64_LDST64_ABS_LO12_NC against var64 -; OBJ: 'r_sym', 0x0000000e -; OBJ-NEXT: 'r_type', 0x0000011e +; OBJ: ElfHeader { +; OBJ: Machine: EM_AARCH64 +; OBJ: } + +; OBJ: Relocations [ +; OBJ: Section (1) .text { +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var8 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST8_ABS_LO12_NC var8 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var16 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST16_ABS_LO12_NC var16 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var32 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST32_ABS_LO12_NC var32 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var64 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST64_ABS_LO12_NC var64 ; This is on the store, so not really important, but it stops the next ; match working. -; R_AARCH64_LDST64_ABS_LO12_NC against var64 -; OBJ: 'r_sym', 0x0000000e -; OBJ-NEXT: 'r_type', 0x0000011e - +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST64_ABS_LO12_NC var64 ; Pure address-calculation against var64 -; R_AARCH64_ADR_PREL_PG_HI21 against var64 -; OBJ: 'r_sym', 0x0000000e -; OBJ-NEXT: 'r_type', 0x00000113 - -; R_AARCH64_ADD_ABS_LO12_NC against var64 -; OBJ: 'r_sym', 0x0000000e -; OBJ-NEXT: 'r_type', 0x00000115 - - -; Make sure the symbols don't move around, otherwise relocation info -; will be wrong: - -; OBJ: Symbol 12 -; OBJ-NEXT: var16 - -; OBJ: Symbol 13 -; OBJ-NEXT: var32 - -; OBJ: Symbol 14 -; OBJ-NEXT: var64 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var64 +; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC var64 -; OBJ: Symbol 15 -; OBJ-NEXT: var8 +; OBJ: } +; OBJ: ] diff --git a/test/MC/AArch64/elf-objdump.s b/test/MC/AArch64/elf-objdump.s index c5aa5b19899e..51d444a36def 100644 --- a/test/MC/AArch64/elf-objdump.s +++ b/test/MC/AArch64/elf-objdump.s @@ -1,5 +1,5 @@ // 64 bit little endian -// RUN: llvm-mc -filetype=obj -arch=aarch64 -triple aarch64-none-linux-gnu %s -o - | llvm-objdump -d +// RUN: llvm-mc -filetype=obj -triple aarch64-none-linux-gnu %s -o - | llvm-objdump -d // We just want to see if llvm-objdump works at all. // CHECK: .text diff --git a/test/MC/AArch64/elf-reloc-addsubimm.s b/test/MC/AArch64/elf-reloc-addsubimm.s index 7fa6e90b5d0d..0321dda332c2 100644 --- a/test/MC/AArch64/elf-reloc-addsubimm.s +++ b/test/MC/AArch64/elf-reloc-addsubimm.s @@ -1,13 +1,10 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s add x2, x3, #:lo12:some_label -// OBJ: .rela.text -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000115 - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: some_label
\ No newline at end of file +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_ADD_ABS_LO12_NC some_label 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-condbr.s b/test/MC/AArch64/elf-reloc-condbr.s index 283d3b95d0db..684e75a33cb7 100644 --- a/test/MC/AArch64/elf-reloc-condbr.s +++ b/test/MC/AArch64/elf-reloc-condbr.s @@ -1,13 +1,10 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s b.eq somewhere -// OBJ: .rela.text -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000118 - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: somewhere
\ No newline at end of file +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_CONDBR19 somewhere 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-ldrlit.s b/test/MC/AArch64/elf-reloc-ldrlit.s index ce9ff49db448..de43c4feac98 100644 --- a/test/MC/AArch64/elf-reloc-ldrlit.s +++ b/test/MC/AArch64/elf-reloc-ldrlit.s @@ -1,28 +1,16 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s ldr x0, some_label ldr w3, some_label ldrsw x9, some_label prfm pldl3keep, some_label -// OBJ: .rela.text -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000111 - -// OBJ: 'r_offset', 0x0000000000000004 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000111 - -// OBJ: 'r_offset', 0x0000000000000008 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000111 - -// OBJ: 'r_offset', 0x000000000000000c -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000111 - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: some_label
\ No newline at end of file +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_LD_PREL_LO19 some_label 0x0 +// OBJ-NEXT: 0x4 R_AARCH64_LD_PREL_LO19 some_label 0x0 +// OBJ-NEXT: 0x8 R_AARCH64_LD_PREL_LO19 some_label 0x0 +// OBJ-NEXT: 0xC R_AARCH64_LD_PREL_LO19 some_label 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-ldstunsimm.s b/test/MC/AArch64/elf-reloc-ldstunsimm.s index 345fc8247d0e..e1f841bd20f7 100644 --- a/test/MC/AArch64/elf-reloc-ldstunsimm.s +++ b/test/MC/AArch64/elf-reloc-ldstunsimm.s @@ -1,5 +1,5 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s ldrb w0, [sp, #:lo12:some_label] ldrh w0, [sp, #:lo12:some_label] @@ -7,28 +7,12 @@ ldr x0, [sp, #:lo12:some_label] str q0, [sp, #:lo12:some_label] -// OBJ: .rela.text - -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000116 - -// OBJ: 'r_offset', 0x0000000000000004 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000011c - -// OBJ: 'r_offset', 0x0000000000000008 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000011d - -// OBJ: 'r_offset', 0x000000000000000c -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000011e - -// OBJ: 'r_offset', 0x0000000000000010 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000012b - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: some_label +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_LDST8_ABS_LO12_NC some_label 0x0 +// OBJ-NEXT: 0x4 R_AARCH64_LDST16_ABS_LO12_NC some_label 0x0 +// OBJ-NEXT: 0x8 R_AARCH64_LDST32_ABS_LO12_NC some_label 0x0 +// OBJ-NEXT: 0xC R_AARCH64_LDST64_ABS_LO12_NC some_label 0x0 +// OBJ-NEXT: 0x10 R_AARCH64_LDST128_ABS_LO12_NC some_label 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-movw.s b/test/MC/AArch64/elf-reloc-movw.s index cb7dc6768e32..8a7e532cdd23 100644 --- a/test/MC/AArch64/elf-reloc-movw.s +++ b/test/MC/AArch64/elf-reloc-movw.s @@ -1,5 +1,5 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s movz x0, #:abs_g0:some_label movk x0, #:abs_g0_nc:some_label @@ -21,78 +21,22 @@ movz x19, #:abs_g2_s:some_label movn x19, #:abs_g2_s:some_label -// OBJ: .rela.text -// :abs_g0: => R_AARCH64_MOVW_UABS_G0 -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000107 - -// :abs_g0_nc: => R_AARCH64_MOVW_UABS_G0_NC -// OBJ: 'r_offset', 0x0000000000000004 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000108 - -// :abs_g1: => R_AARCH64_MOVW_UABS_G1 -// OBJ: 'r_offset', 0x0000000000000008 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000109 - -// :abs_g1_nc: => R_AARCH64_MOVW_UABS_G1_NC -// OBJ: 'r_offset', 0x000000000000000c -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010a - -// :abs_g2: => R_AARCH64_MOVW_UABS_G2 -// OBJ: 'r_offset', 0x0000000000000010 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010b - -// :abs_g2_nc: => R_AARCH64_MOVW_UABS_G2_NC -// OBJ: 'r_offset', 0x0000000000000014 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010c - -// :abs_g3: => R_AARCH64_MOVW_UABS_G3 -// OBJ: 'r_offset', 0x0000000000000018 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010d - -// :abs_g3: => R_AARCH64_MOVW_UABS_G3 -// OBJ: 'r_offset', 0x000000000000001c -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010d - -// :abs_g0_s: => R_AARCH64_MOVW_SABS_G0 -// OBJ: 'r_offset', 0x0000000000000020 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010e - -// :abs_g0_s: => R_AARCH64_MOVW_SABS_G0 -// OBJ: 'r_offset', 0x0000000000000024 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010e - -// :abs_g1_s: => R_AARCH64_MOVW_SABS_G1 -// OBJ: 'r_offset', 0x0000000000000028 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010f - -// :abs_g1_s: => R_AARCH64_MOVW_SABS_G1 -// OBJ: 'r_offset', 0x000000000000002c -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000010f - -// :abs_g2_s: => R_AARCH64_MOVW_SABS_G2 -// OBJ: 'r_offset', 0x0000000000000030 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000110 - -// :abs_g2_s: => R_AARCH64_MOVW_SABS_G2 -// OBJ: 'r_offset', 0x0000000000000034 -// OBJ: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000110 - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: some_label +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_MOVW_UABS_G0 some_label 0x0 +// OBJ-NEXT: 0x4 R_AARCH64_MOVW_UABS_G0_NC some_label 0x0 +// OBJ-NEXT: 0x8 R_AARCH64_MOVW_UABS_G1 some_label 0x0 +// OBJ-NEXT: 0xC R_AARCH64_MOVW_UABS_G1_NC some_label 0x0 +// OBJ-NEXT: 0x10 R_AARCH64_MOVW_UABS_G2 some_label 0x0 +// OBJ-NEXT: 0x14 R_AARCH64_MOVW_UABS_G2_NC some_label 0x0 +// OBJ-NEXT: 0x18 R_AARCH64_MOVW_UABS_G3 some_label 0x0 +// OBJ-NEXT: 0x1C R_AARCH64_MOVW_UABS_G3 some_label 0x0 +// OBJ-NEXT: 0x20 R_AARCH64_MOVW_SABS_G0 some_label 0x0 +// OBJ-NEXT: 0x24 R_AARCH64_MOVW_SABS_G0 some_label 0x0 +// OBJ-NEXT: 0x28 R_AARCH64_MOVW_SABS_G1 some_label 0x0 +// OBJ-NEXT: 0x2C R_AARCH64_MOVW_SABS_G1 some_label 0x0 +// OBJ-NEXT: 0x30 R_AARCH64_MOVW_SABS_G2 some_label 0x0 +// OBJ-NEXT: 0x34 R_AARCH64_MOVW_SABS_G2 some_label 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-pcreladdressing.s b/test/MC/AArch64/elf-reloc-pcreladdressing.s index 39a8ba9402a8..b5f072712fd7 100644 --- a/test/MC/AArch64/elf-reloc-pcreladdressing.s +++ b/test/MC/AArch64/elf-reloc-pcreladdressing.s @@ -1,29 +1,17 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s adr x2, some_label adrp x5, some_label adrp x5, :got:some_label ldr x0, [x5, #:got_lo12:some_label] -// OBJ: .rela.text -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000112 - -// OBJ: 'r_offset', 0x0000000000000004 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000113 - -// OBJ: 'r_offset', 0x0000000000000008 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000137 - -// OBJ: 'r_offset', 0x000000000000000c -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000138 - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: some_label
\ No newline at end of file +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_ADR_PREL_LO21 some_label 0x0 +// OBJ-NEXT: 0x4 R_AARCH64_ADR_PREL_PG_HI21 some_label 0x0 +// OBJ-NEXT: 0x8 R_AARCH64_ADR_GOT_PAGE some_label 0x0 +// OBJ-NEXT: 0xC R_AARCH64_LD64_GOT_LO12_NC some_label 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-tstb.s b/test/MC/AArch64/elf-reloc-tstb.s index c5e2981a22ef..037e89632e82 100644 --- a/test/MC/AArch64/elf-reloc-tstb.s +++ b/test/MC/AArch64/elf-reloc-tstb.s @@ -1,18 +1,12 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s tbz x6, #45, somewhere tbnz w3, #15, somewhere -// OBJ: .rela.text -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000117 - -// OBJ: 'r_offset', 0x0000000000000004 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x00000117 - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: somewhere +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_TSTBR14 somewhere 0x0 +// OBJ-NEXT: 0x4 R_AARCH64_TSTBR14 somewhere 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/elf-reloc-uncondbrimm.s b/test/MC/AArch64/elf-reloc-uncondbrimm.s index 0e97bc66695f..bead07c12d2c 100644 --- a/test/MC/AArch64/elf-reloc-uncondbrimm.s +++ b/test/MC/AArch64/elf-reloc-uncondbrimm.s @@ -1,18 +1,12 @@ -// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \ +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s b somewhere bl somewhere -// OBJ: .rela.text -// OBJ: 'r_offset', 0x0000000000000000 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000011a - -// OBJ: 'r_offset', 0x0000000000000004 -// OBJ-NEXT: 'r_sym', 0x00000005 -// OBJ-NEXT: 'r_type', 0x0000011b - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: somewhere
\ No newline at end of file +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_AARCH64_JUMP26 somewhere 0x0 +// OBJ-NEXT: 0x4 R_AARCH64_CALL26 somewhere 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/AArch64/tls-relocs.s b/test/MC/AArch64/tls-relocs.s index 690fa8c00962..d0e336ecaf23 100644 --- a/test/MC/AArch64/tls-relocs.s +++ b/test/MC/AArch64/tls-relocs.s @@ -1,9 +1,6 @@ -// RUN: llvm-mc -arch=aarch64 -show-encoding < %s | FileCheck %s -// RUN: llvm-mc -arch=aarch64 -filetype=obj < %s -o %t -// RUN: elf-dump %t | FileCheck --check-prefix=CHECK-ELF %s -// RUN: llvm-objdump -r %t | FileCheck --check-prefix=CHECK-ELF-NAMES %s - -// CHECK-ELF: .rela.text +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -show-encoding < %s | FileCheck %s +// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj < %s -o - | \ +// RUN: llvm-readobj -r -t | FileCheck --check-prefix=CHECK-ELF %s // TLS local-dynamic forms movz x1, #:dtprel_g2:var @@ -12,34 +9,20 @@ movn x4, #:dtprel_g2:var // CHECK: movz x1, #:dtprel_g2:var // encoding: [0x01'A',A,0xc0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g2:var, kind: fixup_a64_movw_dtprel_g2 -// CHECK-NEXT: movn x2, #:dtprel_g2:var // encoding: [0x02'A',A,0xc0'A',0x92'A'] +// CHECK: movn x2, #:dtprel_g2:var // encoding: [0x02'A',A,0xc0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g2:var, kind: fixup_a64_movw_dtprel_g2 -// CHECK-NEXT: movz x3, #:dtprel_g2:var // encoding: [0x03'A',A,0xc0'A',0x92'A'] +// CHECK: movz x3, #:dtprel_g2:var // encoding: [0x03'A',A,0xc0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g2:var, kind: fixup_a64_movw_dtprel_g2 -// CHECK-NEXT: movn x4, #:dtprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A'] +// CHECK: movn x4, #:dtprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g2:var, kind: fixup_a64_movw_dtprel_g2 -// CHECK-ELF: # Relocation 0 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000000) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM:0x[0-9a-f]+]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020b) -// CHECK-ELF: # Relocation 1 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000004) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020b) -// CHECK-ELF: # Relocation 2 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000008) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020b) -// CHECK-ELF: # Relocation 3 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000000c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020b) - -// CHECK-ELF-NAMES: 0 R_AARCH64_TLSLD_MOVW_DTPREL_G2 -// CHECK-ELF-NAMES: 4 R_AARCH64_TLSLD_MOVW_DTPREL_G2 -// CHECK-ELF-NAMES: 8 R_AARCH64_TLSLD_MOVW_DTPREL_G2 -// CHECK-ELF-NAMES: 12 R_AARCH64_TLSLD_MOVW_DTPREL_G2 +// CHECK-ELF: Relocations [ +// CHECK-ELF-NEXT: Section (1) .text { +// CHECK-ELF-NEXT: 0x0 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM:[^ ]+]] +// CHECK-ELF-NEXT: 0x4 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]] +// CHECK-ELF-NEXT: 0x8 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]] +// CHECK-ELF-NEXT: 0xC R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]] + movz x5, #:dtprel_g1:var movn x6, #:dtprel_g1:var @@ -54,46 +37,22 @@ // CHECK-NEXT: movn w8, #:dtprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1:var, kind: fixup_a64_movw_dtprel_g1 -// CHECK-ELF: # Relocation 4 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000010) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020c) -// CHECK-ELF: # Relocation 5 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000014) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020c) -// CHECK-ELF: # Relocation 6 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000018) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020c) -// CHECK-ELF: # Relocation 7 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000001c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020c) - -// CHECK-ELF-NAMES: 16 R_AARCH64_TLSLD_MOVW_DTPREL_G1 -// CHECK-ELF-NAMES: 20 R_AARCH64_TLSLD_MOVW_DTPREL_G1 -// CHECK-ELF-NAMES: 24 R_AARCH64_TLSLD_MOVW_DTPREL_G1 -// CHECK-ELF-NAMES: 28 R_AARCH64_TLSLD_MOVW_DTPREL_G1 +// CHECK-ELF-NEXT: 0x10 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0x14 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0x18 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0x1C R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]] + movk x9, #:dtprel_g1_nc:var movk w10, #:dtprel_g1_nc:var // CHECK: movk x9, #:dtprel_g1_nc:var // encoding: [0x09'A',A,0xa0'A',0xf2'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1_nc:var, kind: fixup_a64_movw_dtprel_g1_nc -// CHECK-NEXT: movk w10, #:dtprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A'] +// CHECK: movk w10, #:dtprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1_nc:var, kind: fixup_a64_movw_dtprel_g1_nc -// CHECK-ELF: # Relocation 8 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020d) -// CHECK-ELF: # Relocation 9 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000024) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020d) +// CHECK-ELF-NEXT: 0x20 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x24 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC [[VARSYM]] -// CHECK-ELF-NAMES: 32 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC -// CHECK-ELF-NAMES: 36 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC movz x11, #:dtprel_g0:var movn x12, #:dtprel_g0:var @@ -101,275 +60,156 @@ movn w14, #:dtprel_g0:var // CHECK: movz x11, #:dtprel_g0:var // encoding: [0x0b'A',A,0x80'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0:var, kind: fixup_a64_movw_dtprel_g0 -// CHECK-NEXT: movn x12, #:dtprel_g0:var // encoding: [0x0c'A',A,0x80'A',0x92'A'] +// CHECK: movn x12, #:dtprel_g0:var // encoding: [0x0c'A',A,0x80'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0:var, kind: fixup_a64_movw_dtprel_g0 -// CHECK-NEXT: movz w13, #:dtprel_g0:var // encoding: [0x0d'A',A,0x80'A',0x12'A'] +// CHECK: movz w13, #:dtprel_g0:var // encoding: [0x0d'A',A,0x80'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0:var, kind: fixup_a64_movw_dtprel_g0 -// CHECK-NEXT: movn w14, #:dtprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A'] - - -// CHECK-ELF: # Relocation 10 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000028) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020e) -// CHECK-ELF: # Relocation 11 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000002c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020e) -// CHECK-ELF: # Relocation 12 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000030) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020e) -// CHECK-ELF: # Relocation 13 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000034) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020e) - -// CHECK-ELF-NAMES: 40 R_AARCH64_TLSLD_MOVW_DTPREL_G0 -// CHECK-ELF-NAMES: 44 R_AARCH64_TLSLD_MOVW_DTPREL_G0 -// CHECK-ELF-NAMES: 48 R_AARCH64_TLSLD_MOVW_DTPREL_G0 -// CHECK-ELF-NAMES: 52 R_AARCH64_TLSLD_MOVW_DTPREL_G0 +// CHECK: movn w14, #:dtprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A'] + +// CHECK-ELF-NEXT: 0x28 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]] +// CHECK-ELF-NEXT: 0x2C R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]] +// CHECK-ELF-NEXT: 0x30 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]] +// CHECK-ELF-NEXT: 0x34 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]] movk x15, #:dtprel_g0_nc:var movk w16, #:dtprel_g0_nc:var // CHECK: movk x15, #:dtprel_g0_nc:var // encoding: [0x0f'A',A,0x80'A',0xf2'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0_nc:var, kind: fixup_a64_movw_dtprel_g0_nc -// CHECK-NEXT: movk w16, #:dtprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A'] +// CHECK: movk w16, #:dtprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0_nc:var, kind: fixup_a64_movw_dtprel_g0_nc -// CHECK-ELF: # Relocation 14 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000038) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020f) -// CHECK-ELF: # Relocation 15 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000003c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000020f) +// CHECK-ELF-NEXT: 0x38 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x3C R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC [[VARSYM]] -// CHECK-ELF-NAMES: 56 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC -// CHECK-ELF-NAMES: 60 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC add x17, x18, #:dtprel_hi12:var, lsl #12 add w19, w20, #:dtprel_hi12:var, lsl #12 // CHECK: add x17, x18, #:dtprel_hi12:var, lsl #12 // encoding: [0x51'A',0x02'A',0x40'A',0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_hi12:var, kind: fixup_a64_add_dtprel_hi12 -// CHECK-NEXT: add w19, w20, #:dtprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A'] +// CHECK: add w19, w20, #:dtprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_hi12:var, kind: fixup_a64_add_dtprel_hi12 -// CHECK-ELF: # Relocation 16 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000040) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000210) -// CHECK-ELF: # Relocation 17 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000044) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000210) - -// CHECK-ELF-NAMES: 64 R_AARCH64_TLSLD_ADD_DTPREL_HI12 -// CHECK-ELF-NAMES: 68 R_AARCH64_TLSLD_ADD_DTPREL_HI12 +// CHECK-ELF-NEXT: 0x40 R_AARCH64_TLSLD_ADD_DTPREL_HI12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x44 R_AARCH64_TLSLD_ADD_DTPREL_HI12 [[VARSYM]] add x21, x22, #:dtprel_lo12:var add w23, w24, #:dtprel_lo12:var // CHECK: add x21, x22, #:dtprel_lo12:var // encoding: [0xd5'A',0x02'A',A,0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_add_dtprel_lo12 -// CHECK-NEXT: add w23, w24, #:dtprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A'] +// CHECK: add w23, w24, #:dtprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_add_dtprel_lo12 -// CHECK-ELF: # Relocation 18 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000048) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000211) -// CHECK-ELF: # Relocation 19 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000004c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000211) +// CHECK-ELF-NEXT: 0x48 R_AARCH64_TLSLD_ADD_DTPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x4C R_AARCH64_TLSLD_ADD_DTPREL_LO12 [[VARSYM]] -// CHECK-ELF-NAMES: 72 R_AARCH64_TLSLD_ADD_DTPREL_LO12 -// CHECK-ELF-NAMES: 76 R_AARCH64_TLSLD_ADD_DTPREL_LO12 add x25, x26, #:dtprel_lo12_nc:var add w27, w28, #:dtprel_lo12_nc:var // CHECK: add x25, x26, #:dtprel_lo12_nc:var // encoding: [0x59'A',0x03'A',A,0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_add_dtprel_lo12_nc -// CHECK-NEXT: add w27, w28, #:dtprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A'] +// CHECK: add w27, w28, #:dtprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_add_dtprel_lo12_nc -// CHECK-ELF: # Relocation 20 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000050) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000212) -// CHECK-ELF: # Relocation 21 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000054) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000212) +// CHECK-ELF-NEXT: 0x50 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x54 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 80 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC -// CHECK-ELF-NAMES: 84 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC ldrb w29, [x30, #:dtprel_lo12:var] ldrsb x29, [x28, #:dtprel_lo12_nc:var] // CHECK: ldrb w29, [x30, #:dtprel_lo12:var] // encoding: [0xdd'A',0x03'A',0x40'A',0x39'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_ldst8_dtprel_lo12 -// CHECK-NEXT: ldrsb x29, [x28, #:dtprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A'] +// CHECK: ldrsb x29, [x28, #:dtprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst8_dtprel_lo12_nc -// CHECK-ELF: # Relocation 22 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000058) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000213) -// CHECK-ELF: # Relocation 23 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000005c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000214) +// CHECK-ELF-NEXT: 0x58 R_AARCH64_TLSLD_LDST8_DTPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x5C R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 88 R_AARCH64_TLSLD_LDST8_DTPREL_LO12 -// CHECK-ELF-NAMES: 92 R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC strh w27, [x26, #:dtprel_lo12:var] ldrsh x25, [x24, #:dtprel_lo12_nc:var] // CHECK: strh w27, [x26, #:dtprel_lo12:var] // encoding: [0x5b'A',0x03'A',A,0x79'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_ldst16_dtprel_lo12 -// CHECK-NEXT: ldrsh x25, [x24, #:dtprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A'] +// CHECK: ldrsh x25, [x24, #:dtprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst16_dtprel_lo12_n -// CHECK-ELF: # Relocation 24 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000060) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000215) -// CHECK-ELF: # Relocation 25 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000064) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000216) +// CHECK-ELF-NEXT: 0x60 R_AARCH64_TLSLD_LDST16_DTPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x64 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 96 R_AARCH64_TLSLD_LDST16_DTPREL_LO12 -// CHECK-ELF-NAMES: 100 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC ldr w23, [x22, #:dtprel_lo12:var] ldrsw x21, [x20, #:dtprel_lo12_nc:var] // CHECK: ldr w23, [x22, #:dtprel_lo12:var] // encoding: [0xd7'A',0x02'A',0x40'A',0xb9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_ldst32_dtprel_lo12 -// CHECK-NEXT: ldrsw x21, [x20, #:dtprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A'] +// CHECK: ldrsw x21, [x20, #:dtprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst32_dtprel_lo12_n -// CHECK-ELF: # Relocation 26 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000068) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000217) -// CHECK-ELF: # Relocation 27 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000006c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000218) +// CHECK-ELF-NEXT: 0x68 R_AARCH64_TLSLD_LDST32_DTPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x6C R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 104 R_AARCH64_TLSLD_LDST32_DTPREL_LO12 -// CHECK-ELF-NAMES: 108 R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC ldr x19, [x18, #:dtprel_lo12:var] str x17, [x16, #:dtprel_lo12_nc:var] // CHECK: ldr x19, [x18, #:dtprel_lo12:var] // encoding: [0x53'A',0x02'A',0x40'A',0xf9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_ldst64_dtprel_lo12 -// CHECK-NEXT: str x17, [x16, #:dtprel_lo12_nc:var] // encoding: [0x11'A',0x02'A',A,0xf9'A'] +// CHECK: str x17, [x16, #:dtprel_lo12_nc:var] // encoding: [0x11'A',0x02'A',A,0xf9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst64_dtprel_lo12_nc -// CHECK-ELF: # Relocation 28 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000070) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000219) -// CHECK-ELF: # Relocation 29 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000074) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021a) +// CHECK-ELF-NEXT: 0x70 R_AARCH64_TLSLD_LDST64_DTPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x74 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 112 R_AARCH64_TLSLD_LDST64_DTPREL_LO12 -// CHECK-ELF-NAMES: 116 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC // TLS initial-exec forms movz x15, #:gottprel_g1:var movz w14, #:gottprel_g1:var // CHECK: movz x15, #:gottprel_g1:var // encoding: [0x0f'A',A,0xa0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g1:var, kind: fixup_a64_movw_gottprel_g1 -// CHECK-NEXT: movz w14, #:gottprel_g1:var // encoding: [0x0e'A',A,0xa0'A',0x12'A'] +// CHECK: movz w14, #:gottprel_g1:var // encoding: [0x0e'A',A,0xa0'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g1:var, kind: fixup_a64_movw_gottprel_g1 -// CHECK-ELF: # Relocation 30 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000078) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021b) -// CHECK-ELF: # Relocation 31 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000007c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021b) +// CHECK-ELF-NEXT: 0x78 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0x7C R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 [[VARSYM]] -// CHECK-ELF-NAMES: 120 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 -// CHECK-ELF-NAMES: 124 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 movk x13, #:gottprel_g0_nc:var movk w12, #:gottprel_g0_nc:var // CHECK: movk x13, #:gottprel_g0_nc:var // encoding: [0x0d'A',A,0x80'A',0xf2'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g0_nc:var, kind: fixup_a64_movw_gottprel_g0_nc -// CHECK-NEXT: movk w12, #:gottprel_g0_nc:var // encoding: [0x0c'A',A,0x80'A',0x72'A'] +// CHECK: movk w12, #:gottprel_g0_nc:var // encoding: [0x0c'A',A,0x80'A',0x72'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g0_nc:var, kind: fixup_a64_movw_gottprel_g0_nc -// CHECK-ELF: # Relocation 32 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000080) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021c) -// CHECK-ELF: # Relocation 33 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000084) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021c) +// CHECK-ELF-NEXT: 0x80 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x84 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC [[VARSYM]] -// CHECK-ELF-NAMES: 128 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC -// CHECK-ELF-NAMES: 132 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC adrp x11, :gottprel:var ldr x10, [x0, #:gottprel_lo12:var] ldr x9, :gottprel:var // CHECK: adrp x11, :gottprel:var // encoding: [0x0b'A',A,A,0x90'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel:var, kind: fixup_a64_adr_gottprel_page -// CHECK-NEXT: ldr x10, [x0, #:gottprel_lo12:var] // encoding: [0x0a'A',A,0x40'A',0xf9'A'] +// CHECK: ldr x10, [x0, #:gottprel_lo12:var] // encoding: [0x0a'A',A,0x40'A',0xf9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_lo12:var, kind: fixup_a64_ld64_gottprel_lo12_nc -// CHECK-NEXT: ldr x9, :gottprel:var // encoding: [0x09'A',A,A,0x58'A'] +// CHECK: ldr x9, :gottprel:var // encoding: [0x09'A',A,A,0x58'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :gottprel:var, kind: fixup_a64_ld_gottprel_prel19 -// CHECK-ELF: # Relocation 34 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000088) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021d) -// CHECK-ELF: # Relocation 35 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000008c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021e) -// CHECK-ELF: # Relocation 36 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000090) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000021f) - -// CHECK-ELF-NAMES: 136 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE -// CHECK-ELF-NAMES: 140 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC -// CHECK-ELF-NAMES: 144 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 +// CHECK-ELF-NEXT: 0x88 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 [[VARSYM]] +// CHECK-ELF-NEXT: 0x8C R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x90 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 [[VARSYM]] + // TLS local-exec forms movz x3, #:tprel_g2:var movn x4, #:tprel_g2:var // CHECK: movz x3, #:tprel_g2:var // encoding: [0x03'A',A,0xc0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g2:var, kind: fixup_a64_movw_tprel_g2 -// CHECK-NEXT: movn x4, #:tprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A'] +// CHECK: movn x4, #:tprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g2:var, kind: fixup_a64_movw_tprel_g2 -// CHECK-ELF: # Relocation 37 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000094) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000220) -// CHECK-ELF: # Relocation 38 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000098) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000220) +// CHECK-ELF-NEXT: 0x94 R_AARCH64_TLSLE_MOVW_TPREL_G2 [[VARSYM]] +// CHECK-ELF-NEXT: 0x98 R_AARCH64_TLSLE_MOVW_TPREL_G2 [[VARSYM]] -// CHECK-ELF-NAMES: 148 R_AARCH64_TLSLE_MOVW_TPREL_G2 -// CHECK-ELF-NAMES: 152 R_AARCH64_TLSLE_MOVW_TPREL_G2 movz x5, #:tprel_g1:var movn x6, #:tprel_g1:var @@ -377,53 +217,29 @@ movn w8, #:tprel_g1:var // CHECK: movz x5, #:tprel_g1:var // encoding: [0x05'A',A,0xa0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1:var, kind: fixup_a64_movw_tprel_g1 -// CHECK-NEXT: movn x6, #:tprel_g1:var // encoding: [0x06'A',A,0xa0'A',0x92'A'] +// CHECK: movn x6, #:tprel_g1:var // encoding: [0x06'A',A,0xa0'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1:var, kind: fixup_a64_movw_tprel_g1 -// CHECK-NEXT: movz w7, #:tprel_g1:var // encoding: [0x07'A',A,0xa0'A',0x12'A'] +// CHECK: movz w7, #:tprel_g1:var // encoding: [0x07'A',A,0xa0'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1:var, kind: fixup_a64_movw_tprel_g1 -// CHECK-NEXT: movn w8, #:tprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A'] +// CHECK: movn w8, #:tprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1:var, kind: fixup_a64_movw_tprel_g1 -// CHECK-ELF: # Relocation 39 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000009c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000221) -// CHECK-ELF: # Relocation 40 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a0) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000221) -// CHECK-ELF: # Relocation 41 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a4) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000221) -// CHECK-ELF: # Relocation 42 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a8) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000221) - -// CHECK-ELF-NAMES: 156 R_AARCH64_TLSLE_MOVW_TPREL_G1 -// CHECK-ELF-NAMES: 160 R_AARCH64_TLSLE_MOVW_TPREL_G1 -// CHECK-ELF-NAMES: 164 R_AARCH64_TLSLE_MOVW_TPREL_G1 -// CHECK-ELF-NAMES: 168 R_AARCH64_TLSLE_MOVW_TPREL_G1 +// CHECK-ELF-NEXT: 0x9C R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0xA0 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0xA4 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]] +// CHECK-ELF-NEXT: 0xA8 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]] + movk x9, #:tprel_g1_nc:var movk w10, #:tprel_g1_nc:var // CHECK: movk x9, #:tprel_g1_nc:var // encoding: [0x09'A',A,0xa0'A',0xf2'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1_nc:var, kind: fixup_a64_movw_tprel_g1_nc -// CHECK-NEXT: movk w10, #:tprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A'] +// CHECK: movk w10, #:tprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1_nc:var, kind: fixup_a64_movw_tprel_g1_nc -// CHECK-ELF: # Relocation 43 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000ac) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000222) -// CHECK-ELF: # Relocation 44 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b0) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000222) +// CHECK-ELF-NEXT: 0xAC R_AARCH64_TLSLE_MOVW_TPREL_G1_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0xB0 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC [[VARSYM]] -// CHECK-ELF-NAMES: 172 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC -// CHECK-ELF-NAMES: 176 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC movz x11, #:tprel_g0:var movn x12, #:tprel_g0:var @@ -431,187 +247,104 @@ movn w14, #:tprel_g0:var // CHECK: movz x11, #:tprel_g0:var // encoding: [0x0b'A',A,0x80'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0:var, kind: fixup_a64_movw_tprel_g0 -// CHECK-NEXT: movn x12, #:tprel_g0:var // encoding: [0x0c'A',A,0x80'A',0x92'A'] +// CHECK: movn x12, #:tprel_g0:var // encoding: [0x0c'A',A,0x80'A',0x92'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0:var, kind: fixup_a64_movw_tprel_g0 -// CHECK-NEXT: movz w13, #:tprel_g0:var // encoding: [0x0d'A',A,0x80'A',0x12'A'] +// CHECK: movz w13, #:tprel_g0:var // encoding: [0x0d'A',A,0x80'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0:var, kind: fixup_a64_movw_tprel_g0 -// CHECK-NEXT: movn w14, #:tprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A'] +// CHECK: movn w14, #:tprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0:var, kind: fixup_a64_movw_tprel_g0 -// CHECK-ELF: # Relocation 45 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b4) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000223) -// CHECK-ELF: # Relocation 46 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b8) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000223) -// CHECK-ELF: # Relocation 47 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000bc) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000223) -// CHECK-ELF: # Relocation 48 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c0) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000223) - -// CHECK-ELF-NAMES: 180 R_AARCH64_TLSLE_MOVW_TPREL_G0 -// CHECK-ELF-NAMES: 184 R_AARCH64_TLSLE_MOVW_TPREL_G0 -// CHECK-ELF-NAMES: 188 R_AARCH64_TLSLE_MOVW_TPREL_G0 -// CHECK-ELF-NAMES: 192 R_AARCH64_TLSLE_MOVW_TPREL_G0 +// CHECK-ELF-NEXT: 0xB4 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]] +// CHECK-ELF-NEXT: 0xB8 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]] +// CHECK-ELF-NEXT: 0xBC R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]] +// CHECK-ELF-NEXT: 0xC0 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]] + movk x15, #:tprel_g0_nc:var movk w16, #:tprel_g0_nc:var // CHECK: movk x15, #:tprel_g0_nc:var // encoding: [0x0f'A',A,0x80'A',0xf2'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0_nc:var, kind: fixup_a64_movw_tprel_g0_nc -// CHECK-NEXT: movk w16, #:tprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A'] +// CHECK: movk w16, #:tprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0_nc:var, kind: fixup_a64_movw_tprel_g0_nc -// CHECK-ELF: # Relocation 49 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c4) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000224) -// CHECK-ELF: # Relocation 50 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c8) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000224) +// CHECK-ELF-NEXT: 0xC4 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0xC8 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC [[VARSYM]] -// CHECK-ELF-NAMES: 196 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC -// CHECK-ELF-NAMES: 200 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC add x17, x18, #:tprel_hi12:var, lsl #12 add w19, w20, #:tprel_hi12:var, lsl #12 // CHECK: add x17, x18, #:tprel_hi12:var, lsl #12 // encoding: [0x51'A',0x02'A',0x40'A',0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_hi12:var, kind: fixup_a64_add_tprel_hi12 -// CHECK-NEXT: add w19, w20, #:tprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A'] +// CHECK: add w19, w20, #:tprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_hi12:var, kind: fixup_a64_add_tprel_hi12 -// CHECK-ELF: # Relocation 51 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000cc) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000225) -// CHECK-ELF: # Relocation 52 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d0) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000225) +// CHECK-ELF-NEXT: 0xCC R_AARCH64_TLSLE_ADD_TPREL_HI12 [[VARSYM]] +// CHECK-ELF-NEXT: 0xD0 R_AARCH64_TLSLE_ADD_TPREL_HI12 [[VARSYM]] -// CHECK-ELF-NAMES: 204 R_AARCH64_TLSLE_ADD_TPREL_HI12 -// CHECK-ELF-NAMES: 208 R_AARCH64_TLSLE_ADD_TPREL_HI12 add x21, x22, #:tprel_lo12:var add w23, w24, #:tprel_lo12:var // CHECK: add x21, x22, #:tprel_lo12:var // encoding: [0xd5'A',0x02'A',A,0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_add_tprel_lo12 -// CHECK-NEXT: add w23, w24, #:tprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A'] +// CHECK: add w23, w24, #:tprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_add_tprel_lo12 -// CHECK-ELF: # Relocation 53 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d4) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000226) -// CHECK-ELF: # Relocation 54 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d8) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000226) +// CHECK-ELF-NEXT: 0xD4 R_AARCH64_TLSLE_ADD_TPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0xD8 R_AARCH64_TLSLE_ADD_TPREL_LO12 [[VARSYM]] -// CHECK-ELF-NAMES: 212 R_AARCH64_TLSLE_ADD_TPREL_LO12 -// CHECK-ELF-NAMES: 216 R_AARCH64_TLSLE_ADD_TPREL_LO12 add x25, x26, #:tprel_lo12_nc:var add w27, w28, #:tprel_lo12_nc:var // CHECK: add x25, x26, #:tprel_lo12_nc:var // encoding: [0x59'A',0x03'A',A,0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_add_tprel_lo12_nc -// CHECK-NEXT: add w27, w28, #:tprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A'] +// CHECK: add w27, w28, #:tprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_add_tprel_lo12_nc -// CHECK-ELF: # Relocation 55 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000dc) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000227) -// CHECK-ELF: # Relocation 56 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e0) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000227) - +// CHECK-ELF-NEXT: 0xDC R_AARCH64_TLSLE_ADD_TPREL_LO12_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0xE0 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 220 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC -// CHECK-ELF-NAMES: 224 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC ldrb w29, [x30, #:tprel_lo12:var] ldrsb x29, [x28, #:tprel_lo12_nc:var] // CHECK: ldrb w29, [x30, #:tprel_lo12:var] // encoding: [0xdd'A',0x03'A',0x40'A',0x39'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_ldst8_tprel_lo12 -// CHECK-NEXT: ldrsb x29, [x28, #:tprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A'] +// CHECK: ldrsb x29, [x28, #:tprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst8_tprel_lo12_nc -// CHECK-ELF: # Relocation 57 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e4) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000228) -// CHECK-ELF: # Relocation 58 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e8) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000229) +// CHECK-ELF-NEXT: 0xE4 R_AARCH64_TLSLE_LDST8_TPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0xE8 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 228 R_AARCH64_TLSLE_LDST8_TPREL_LO12 -// CHECK-ELF-NAMES: 232 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC strh w27, [x26, #:tprel_lo12:var] ldrsh x25, [x24, #:tprel_lo12_nc:var] // CHECK: strh w27, [x26, #:tprel_lo12:var] // encoding: [0x5b'A',0x03'A',A,0x79'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_ldst16_tprel_lo12 -// CHECK-NEXT: ldrsh x25, [x24, #:tprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A'] +// CHECK: ldrsh x25, [x24, #:tprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst16_tprel_lo12_n -// CHECK-ELF: # Relocation 59 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000ec) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000022a) -// CHECK-ELF: # Relocation 60 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f0) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000022b) +// CHECK-ELF-NEXT: 0xEC R_AARCH64_TLSLE_LDST16_TPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0xF0 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC [[VARSYM]] -// CHECK-ELF-NAMES: 236 R_AARCH64_TLSLE_LDST16_TPREL_LO12 -// CHECK-ELF-NAMES: 240 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC ldr w23, [x22, #:tprel_lo12:var] ldrsw x21, [x20, #:tprel_lo12_nc:var] // CHECK: ldr w23, [x22, #:tprel_lo12:var] // encoding: [0xd7'A',0x02'A',0x40'A',0xb9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_ldst32_tprel_lo12 -// CHECK-NEXT: ldrsw x21, [x20, #:tprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A'] +// CHECK: ldrsw x21, [x20, #:tprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst32_tprel_lo12_n -// CHECK-ELF: # Relocation 61 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f4) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000022c) -// CHECK-ELF: # Relocation 62 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f8) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000022d) - -// CHECK-ELF-NAMES: 244 R_AARCH64_TLSLE_LDST32_TPREL_LO12 -// CHECK-ELF-NAMES: 248 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC +// CHECK-ELF-NEXT: 0xF4 R_AARCH64_TLSLE_LDST32_TPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0xF8 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC [[VARSYM]] ldr x19, [x18, #:tprel_lo12:var] str x17, [x16, #:tprel_lo12_nc:var] // CHECK: ldr x19, [x18, #:tprel_lo12:var] // encoding: [0x53'A',0x02'A',0x40'A',0xf9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_ldst64_tprel_lo12 -// CHECK-NEXT: str x17, [x16, #:tprel_lo12_nc:var] // encoding: [0x11'A',0x02'A',A,0xf9'A'] +// CHECK: str x17, [x16, #:tprel_lo12_nc:var] // encoding: [0x11'A',0x02'A',A,0xf9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst64_tprel_lo12_nc -// CHECK-ELF: # Relocation 63 -// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000fc) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000022e) -// CHECK-ELF: # Relocation 64 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000100) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x0000022f) - -// CHECK-ELF-NAMES: 252 R_AARCH64_TLSLE_LDST64_TPREL_LO12 -// CHECK-ELF-NAMES: 256 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC +// CHECK-ELF-NEXT: 0xFC R_AARCH64_TLSLE_LDST64_TPREL_LO12 [[VARSYM]] +// CHECK-ELF-NEXT: 0x100 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC [[VARSYM]] // TLS descriptor forms adrp x8, :tlsdesc:var @@ -622,41 +355,27 @@ // CHECK: adrp x8, :tlsdesc:var // encoding: [0x08'A',A,A,0x90'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tlsdesc:var, kind: fixup_a64_tlsdesc_adr_page -// CHECK-NEXT: ldr x7, [x6, #:tlsdesc_lo12:var] // encoding: [0xc7'A',A,0x40'A',0xf9'A'] +// CHECK: ldr x7, [x6, #:tlsdesc_lo12:var] // encoding: [0xc7'A',A,0x40'A',0xf9'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tlsdesc_lo12:var, kind: fixup_a64_tlsdesc_ld64_lo12_nc -// CHECK-NEXT: add x5, x4, #:tlsdesc_lo12:var // encoding: [0x85'A',A,A,0x91'A'] +// CHECK: add x5, x4, #:tlsdesc_lo12:var // encoding: [0x85'A',A,A,0x91'A'] // CHECK-NEXT: // fixup A - offset: 0, value: :tlsdesc_lo12:var, kind: fixup_a64_tlsdesc_add_lo12_nc -// CHECK-NEXT: .tlsdesccall var // encoding: [] +// CHECK: .tlsdesccall var // encoding: [] // CHECK-NEXT: // fixup A - offset: 0, value: :tlsdesc:var, kind: fixup_a64_tlsdesc_call // CHECK: blr x3 // encoding: [0x60,0x00,0x3f,0xd6] -// CHECK-ELF: # Relocation 65 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000104) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000232) -// CHECK-ELF: # Relocation 66 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000108) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000233) -// CHECK-ELF: # Relocation 67 -// CHECK-ELF-NEXT: (('r_offset', 0x000000000000010c) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000234) -// CHECK-ELF: # Relocation 68 -// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000110) -// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]]) -// CHECK-ELF-NEXT: ('r_type', 0x00000239) - -// CHECK-ELF-NAMES: 260 R_AARCH64_TLSDESC_ADR_PAGE -// CHECK-ELF-NAMES: 264 R_AARCH64_TLSDESC_LD64_LO12_NC -// CHECK-ELF-NAMES: 268 R_AARCH64_TLSDESC_ADD_LO12_NC -// CHECK-ELF-NAMES: 272 R_AARCH64_TLSDESC_CALL +// CHECK-ELF-NEXT: 0x104 R_AARCH64_TLSDESC_ADR_PAGE [[VARSYM]] +// CHECK-ELF-NEXT: 0x108 R_AARCH64_TLSDESC_LD64_LO12_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x10C R_AARCH64_TLSDESC_ADD_LO12_NC [[VARSYM]] +// CHECK-ELF-NEXT: 0x110 R_AARCH64_TLSDESC_CALL [[VARSYM]] // Make sure symbol 5 has type STT_TLS: -// CHECK-ELF: # Symbol 5 -// CHECK-ELF-NEXT: (('st_name', 0x00000006) # 'var' -// CHECK-ELF-NEXT: ('st_bind', 0x1) -// CHECK-ELF-NEXT: ('st_type', 0x6) +// CHECK-ELF: Symbols [ +// CHECK-ELF: Symbol { +// CHECK-ELF: Name: var (6) +// CHECK-ELF-NEXT: Value: +// CHECK-ELF-NEXT: Size: +// CHECK-ELF-NEXT: Binding: Global +// CHECK-ELF-NEXT: Type: TLS diff --git a/test/MC/ARM/arm-thumb-trustzone.s b/test/MC/ARM/arm-thumb-trustzone.s new file mode 100644 index 000000000000..a080b3efac88 --- /dev/null +++ b/test/MC/ARM/arm-thumb-trustzone.s @@ -0,0 +1,25 @@ +@ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ +@ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ + + .syntax unified + .globl _func + +@ Check that the assembler processes SMC instructions when TrustZone support is +@ active and that it rejects them when this feature is not enabled + +_func: +@ CHECK: _func + + +@------------------------------------------------------------------------------ +@ SMC +@------------------------------------------------------------------------------ + smc #0xf + ite eq + smceq #0 + +@ NOTZ-NOT: smc #15 +@ NOTZ-NOT: smceq #0 +@ TZ: smc #15 @ encoding: [0xff,0xf7,0x00,0x80] +@ TZ: ite eq @ encoding: [0x0c,0xbf] +@ TZ: smceq #0 @ encoding: [0xf0,0xf7,0x00,0x80] diff --git a/test/MC/ARM/arm-trustzone.s b/test/MC/ARM/arm-trustzone.s new file mode 100644 index 000000000000..69157f60dc0a --- /dev/null +++ b/test/MC/ARM/arm-trustzone.s @@ -0,0 +1,24 @@ +@ RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ +@ RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -show-encoding -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ + + .syntax unified + .globl _func + +@ Check that the assembler processes SMC instructions when TrustZone support is +@ active and that it rejects them when this feature is not enabled + +_func: +@ CHECK: _func + + +@------------------------------------------------------------------------------ +@ SMC +@------------------------------------------------------------------------------ + smc #0xf + smceq #0 + +@ NOTZ-NOT: smc #15 +@ NOTZ-NOT: smceq #0 +@ TZ: smc #15 @ encoding: [0x7f,0x00,0x60,0xe1] +@ TZ: smceq #0 @ encoding: [0x70,0x00,0x60,0x01] + diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index 560a0d633cbe..71b5b5da09be 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -1791,15 +1791,6 @@ Lforward: @ CHECK: shsub8gt r4, r8, r2 @ encoding: [0xf2,0x4f,0x38,0xc6] @------------------------------------------------------------------------------ -@ SMC -@------------------------------------------------------------------------------ - smc #0xf - smceq #0 - -@ CHECK: smc #15 @ encoding: [0x7f,0x00,0x60,0xe1] -@ CHECK: smceq #0 @ encoding: [0x70,0x00,0x60,0x01] - -@------------------------------------------------------------------------------ @ SMLABB/SMLABT/SMLATB/SMLATT @------------------------------------------------------------------------------ smlabb r3, r1, r9, r0 @@ -2318,7 +2309,7 @@ Lforward: strpl r3, [r10, #0]! @ CHECK: strpl r3, [r10, #-0]! @ encoding: [0x00,0x30,0x2a,0x55] -@ CHECK: strpl r3, [r10]! @ encoding: [0x00,0x30,0xaa,0x55] +@ CHECK: strpl r3, [r10, #0]! @ encoding: [0x00,0x30,0xaa,0x55] @------------------------------------------------------------------------------ @ SUB @@ -2879,7 +2870,6 @@ Lforward: wfilt yield yieldne - hint #5 hint #4 hint #3 hint #2 @@ -2892,7 +2882,6 @@ Lforward: @ CHECK: wfilt @ encoding: [0x03,0xf0,0x20,0xb3] @ CHECK: yield @ encoding: [0x01,0xf0,0x20,0xe3] @ CHECK: yieldne @ encoding: [0x01,0xf0,0x20,0x13] -@ CHECK: hint #5 @ encoding: [0x05,0xf0,0x20,0xe3] @ CHECK: sev @ encoding: [0x04,0xf0,0x20,0xe3] @ CHECK: wfi @ encoding: [0x03,0xf0,0x20,0xe3] @ CHECK: wfe @ encoding: [0x02,0xf0,0x20,0xe3] diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s index 9278a2a94b56..8127feba6d40 100644 --- a/test/MC/ARM/basic-thumb2-instructions.s +++ b/test/MC/ARM/basic-thumb2-instructions.s @@ -3486,8 +3486,6 @@ _func: wfelt wfige yieldlt - hint #5 - hint.w #5 hint.w #4 hint #3 hint #2 @@ -3501,8 +3499,6 @@ _func: @ CHECK: wfelt @ encoding: [0x20,0xbf] @ CHECK: wfige @ encoding: [0x30,0xbf] @ CHECK: yieldlt @ encoding: [0x10,0xbf] -@ CHECK: hint #5 @ encoding: [0xaf,0xf3,0x05,0x80] -@ CHECK: hint #5 @ encoding: [0xaf,0xf3,0x05,0x80] @ CHECK: sev.w @ encoding: [0xaf,0xf3,0x04,0x80] @ CHECK: wfi.w @ encoding: [0xaf,0xf3,0x03,0x80] @ CHECK: wfe.w @ encoding: [0xaf,0xf3,0x02,0x80] diff --git a/test/MC/ARM/cxx-global-constructor.ll b/test/MC/ARM/cxx-global-constructor.ll index e06d2c73ed93..4afd1e19ad44 100644 --- a/test/MC/ARM/cxx-global-constructor.ll +++ b/test/MC/ARM/cxx-global-constructor.ll @@ -1,5 +1,5 @@ ; RUN: llc %s -mtriple=armv7-linux-gnueabi -relocation-model=pic \ -; RUN: -filetype=obj -o - | elf-dump --dump-section-data | FileCheck %s +; RUN: -filetype=obj -o - | llvm-readobj -r | FileCheck %s @llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @f }] @@ -9,4 +9,5 @@ define void @f() { } ; Check for a relocation of type R_ARM_TARGET1. -; CHECK: ('r_type', 0x26) +; CHECK: Relocations [ +; CHECK: 0x{{[0-9,A-F]+}} R_ARM_TARGET1 diff --git a/test/MC/ARM/data-in-code.ll b/test/MC/ARM/data-in-code.ll index c2feec5303c3..e3325b6bf6e6 100644 --- a/test/MC/ARM/data-in-code.ll +++ b/test/MC/ARM/data-in-code.ll @@ -1,8 +1,8 @@ ;; RUN: llc -O0 -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \ -;; RUN: elf-dump | FileCheck -check-prefix=ARM %s +;; RUN: llvm-readobj -t | FileCheck -check-prefix=ARM %s ;; RUN: llc -O0 -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \ -;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=TMB %s +;; RUN: llvm-readobj -t | FileCheck -check-prefix=TMB %s ;; Ensure that if a jump table is generated that it has Mapping Symbols ;; marking the data-in-code region. @@ -108,68 +108,68 @@ exit: ret void } -;; ARM: # Symbol 2 -;; ARM-NEXT: $a -;; ARM-NEXT: 'st_value', 0x00000000 -;; ARM-NEXT: 'st_size', 0x00000000 -;; ARM-NEXT: 'st_bind', 0x0 -;; ARM-NEXT: 'st_type', 0x0 -;; ARM-NEXT: 'st_other' -;; ARM-NEXT: 'st_shndx', [[MIXED_SECT:0x[0-9a-f]+]] - -;; ARM: # Symbol 3 -;; ARM-NEXT: $a -;; ARM-NEXT: 'st_value', 0x000000ac -;; ARM-NEXT: 'st_size', 0x00000000 -;; ARM-NEXT: 'st_bind', 0x0 -;; ARM-NEXT: 'st_type', 0x0 -;; ARM-NEXT: 'st_other' -;; ARM-NEXT: 'st_shndx', [[MIXED_SECT]] - -;; ARM: # Symbol 4 -;; ARM-NEXT: $d -;; ARM-NEXT: 'st_value', 0x00000000 -;; ARM-NEXT: 'st_size', 0x00000000 -;; ARM-NEXT: 'st_bind', 0x0 -;; ARM-NEXT: 'st_type', 0x0 - -;; ARM: # Symbol 5 -;; ARM-NEXT: $d -;; ARM-NEXT: 'st_value', 0x00000030 -;; ARM-NEXT: 'st_size', 0x00000000 -;; ARM-NEXT: 'st_bind', 0x0 -;; ARM-NEXT: 'st_type', 0x0 -;; ARM-NEXT: 'st_other' -;; ARM-NEXT: 'st_shndx', [[MIXED_SECT]] +;; ARM: Symbol { +;; ARM: Name: $a +;; ARM-NEXT: Value: 0x0 +;; ARM-NEXT: Size: 0 +;; ARM-NEXT: Binding: Local +;; ARM-NEXT: Type: None +;; ARM-NEXT: Other: +;; ARM-NEXT: Section: [[MIXED_SECT:[^ ]+]] + +;; ARM: Symbol { +;; ARM: Name: $a +;; ARM-NEXT: Value: 0xAC +;; ARM-NEXT: Size: 0 +;; ARM-NEXT: Binding: Local +;; ARM-NEXT: Type: None +;; ARM-NEXT: Other: +;; ARM-NEXT: Section: [[MIXED_SECT]] + +;; ARM: Symbol { +;; ARM: Name: $d +;; ARM-NEXT: Value: 0 +;; ARM-NEXT: Size: 0 +;; ARM-NEXT: Binding: Local +;; ARM-NEXT: Type: None + +;; ARM: Symbol { +;; ARM: Name: $d +;; ARM-NEXT: Value: 0x30 +;; ARM-NEXT: Size: 0 +;; ARM-NEXT: Binding: Local +;; ARM-NEXT: Type: None +;; ARM-NEXT: Other: +;; ARM-NEXT: Section: [[MIXED_SECT]] ;; ARM-NOT: ${{[atd]}} -;; TMB: # Symbol 3 -;; TMB-NEXT: $d -;; TMB-NEXT: 'st_value', 0x00000016 -;; TMB-NEXT: 'st_size', 0x00000000 -;; TMB-NEXT: 'st_bind', 0x0 -;; TMB-NEXT: 'st_type', 0x0 -;; TMB-NEXT: 'st_other' -;; TMB-NEXT: 'st_shndx', [[MIXED_SECT:0x[0-9a-f]+]] - -;; TMB: # Symbol 4 -;; TMB-NEXT: $t -;; TMB-NEXT: 'st_value', 0x00000000 -;; TMB-NEXT: 'st_size', 0x00000000 -;; TMB-NEXT: 'st_bind', 0x0 -;; TMB-NEXT: 'st_type', 0x0 -;; TMB-NEXT: 'st_other' -;; TMB-NEXT: 'st_shndx', [[MIXED_SECT]] - -;; TMB: # Symbol 5 -;; TMB-NEXT: $t -;; TMB-NEXT: 'st_value', 0x00000036 -;; TMB-NEXT: 'st_size', 0x00000000 -;; TMB-NEXT: 'st_bind', 0x0 -;; TMB-NEXT: 'st_type', 0x0 -;; TMB-NEXT: 'st_other' -;; TMB-NEXT: 'st_shndx', [[MIXED_SECT]] +;; TMB: Symbol { +;; TMB: Name: $d.2 +;; TMB-NEXT: Value: 0x16 +;; TMB-NEXT: Size: 0 +;; TMB-NEXT: Binding: Local +;; TMB-NEXT: Type: None +;; TMB-NEXT: Other: +;; TMB-NEXT: Section: [[MIXED_SECT:[^ ]+]] + +;; TMB: Symbol { +;; TMB: Name: $t +;; TMB-NEXT: Value: 0x0 +;; TMB-NEXT: Size: 0 +;; TMB-NEXT: Binding: Local +;; TMB-NEXT: Type: None +;; TMB-NEXT: Other: +;; TMB-NEXT: Section: [[MIXED_SECT]] + +;; TMB: Symbol { +;; TMB: Name: $t +;; TMB-NEXT: Value: 0x36 +;; TMB-NEXT: Size: 0 +;; TMB-NEXT: Binding: Local +;; TMB-NEXT: Type: None +;; TMB-NEXT: Other: +;; TMB-NEXT: Section: [[MIXED_SECT]] ;; TMB-NOT: ${{[atd]}} diff --git a/test/MC/ARM/elf-eflags-eabi-cg.ll b/test/MC/ARM/elf-eflags-eabi-cg.ll index 2e86a0f36077..0b9de7f2a62a 100644 --- a/test/MC/ARM/elf-eflags-eabi-cg.ll +++ b/test/MC/ARM/elf-eflags-eabi-cg.ll @@ -1,7 +1,7 @@ ; Codegen version to check for ELF header flags. ; ; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \ -; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \ +; RUN: -filetype=obj -o - | llvm-readobj -h | \ ; RUN: FileCheck %s define void @bar() nounwind { @@ -10,4 +10,5 @@ entry: } ; For now the only e_flag set is EF_ARM_EABI_VER5 -;CHECK: 'e_flags', 0x05000000 +; CHECK: ElfHeader { +; CHECK: Flags [ (0x5000000) diff --git a/test/MC/ARM/elf-eflags-eabi.s b/test/MC/ARM/elf-eflags-eabi.s index ea89eacf74fb..fe0b6c071e62 100644 --- a/test/MC/ARM/elf-eflags-eabi.s +++ b/test/MC/ARM/elf-eflags-eabi.s @@ -1,5 +1,5 @@ @ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \ -@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s +@ RUN: llvm-readobj -h | FileCheck -check-prefix=OBJ %s .syntax unified .text .globl barf @@ -10,4 +10,5 @@ barf: @ @barf b foo @@@ make sure the EF_ARM_EABIMASK comes out OK -@OBJ: 'e_flags', 0x05000000 +@OBJ: ElfHeader { +@OBJ: Flags [ (0x5000000) diff --git a/test/MC/ARM/elf-movt.s b/test/MC/ARM/elf-movt.s index 02bb5a6907de..74b3c9f2f53b 100644 --- a/test/MC/ARM/elf-movt.s +++ b/test/MC/ARM/elf-movt.s @@ -1,6 +1,6 @@ @ RUN: llvm-mc %s -triple=armv7-linux-gnueabi | FileCheck -check-prefix=ASM %s @ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \ -@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s +@ RUN: llvm-readobj -s -sd -sr | FileCheck -check-prefix=OBJ %s .syntax unified .text .globl barf @@ -15,25 +15,24 @@ barf: @ @barf @ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+8)) @@ make sure that the text section fixups are sane too -@ OBJ: '.text' -@ OBJ-NEXT: 'sh_type', 0x00000001 -@ OBJ-NEXT: 'sh_flags', 0x00000006 -@ OBJ-NEXT: 'sh_addr', 0x00000000 -@ OBJ-NEXT: 'sh_offset', 0x00000034 -@ OBJ-NEXT: 'sh_size', 0x00000008 -@ OBJ-NEXT: 'sh_link', 0x00000000 -@ OBJ-NEXT: 'sh_info', 0x00000000 -@ OBJ-NEXT: 'sh_addralign', 0x00000004 -@ OBJ-NEXT: 'sh_entsize', 0x00000000 -@ OBJ-NEXT: '_section_data', 'f00f0fe3 f40f4fe3' - -@ OBJ: Relocation 0 -@ OBJ-NEXT: 'r_offset', 0x00000000 -@ OBJ-NEXT: 'r_sym' -@ OBJ-NEXT: 'r_type', 0x2d - -@ OBJ: Relocation 1 -@ OBJ-NEXT: 'r_offset', 0x00000004 -@ OBJ-NEXT: 'r_sym' -@ OBJ-NEXT: 'r_type', 0x2e - +@ OBJ: Section { +@ OBJ: Name: .text +@ OBJ-NEXT: Type: SHT_PROGBITS +@ OBJ-NEXT: Flags [ (0x6) +@ OBJ-NEXT: SHF_ALLOC +@ OBJ-NEXT: SHF_EXECINSTR +@ OBJ-NEXT: ] +@ OBJ-NEXT: Address: 0x0 +@ OBJ-NEXT: Offset: 0x34 +@ OBJ-NEXT: Size: 8 +@ OBJ-NEXT: Link: 0 +@ OBJ-NEXT: Info: 0 +@ OBJ-NEXT: AddressAlignment: 4 +@ OBJ-NEXT: EntrySize: 0 +@ OBJ-NEXT: Relocations [ +@ OBJ-NEXT: 0x0 R_ARM_MOVW_PREL_NC +@ OBJ-NEXT: 0x4 R_ARM_MOVT_PREL +@ OBJ-NEXT: ] +@ OBJ-NEXT: SectionData ( +@ OBJ-NEXT: 0000: F00F0FE3 F40F4FE3 +@ OBJ-NEXT: ) diff --git a/test/MC/ARM/elf-reloc-01.ll b/test/MC/ARM/elf-reloc-01.ll index 3ebd7c641b6d..9b5dbd9e99dd 100644 --- a/test/MC/ARM/elf-reloc-01.ll +++ b/test/MC/ARM/elf-reloc-01.ll @@ -1,7 +1,7 @@ ;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \ ;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \ ;; RUN: -filetype=obj %s -o - | \ -;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s +;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s ;; FIXME: This file needs to be in .s form! ;; The args to llc are there to constrain the codegen only. @@ -60,11 +60,8 @@ bb3: ; preds = %bb, %entry declare void @exit(i32) noreturn nounwind -;; OBJ: Relocation 1 -;; OBJ-NEXT: 'r_offset', -;; OBJ-NEXT: 'r_sym', 0x000007 -;; OBJ-NEXT: 'r_type', 0x2b - -;; OBJ: Symbol 7 -;; OBJ-NEXT: '_MergedGlobals' -;; OBJ-NEXT: 'st_value', 0x00000010 +; OBJ: Relocations [ +; OBJ: Section (1) .text { +; OBJ: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC _MergedGlobals +; OBJ: } +; OBJ: ] diff --git a/test/MC/ARM/elf-reloc-02.ll b/test/MC/ARM/elf-reloc-02.ll index 6b6b03c388a4..f0217644cad9 100644 --- a/test/MC/ARM/elf-reloc-02.ll +++ b/test/MC/ARM/elf-reloc-02.ll @@ -1,7 +1,7 @@ ;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \ ;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \ ;; RUN: -filetype=obj %s -o - | \ -;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s +;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s ;; FIXME: This file needs to be in .s form! ;; The args to llc are there to constrain the codegen only. @@ -41,10 +41,8 @@ declare i32 @write(...) declare void @exit(i32) noreturn nounwind -;; OBJ: Relocation 0 -;; OBJ-NEXT: 'r_offset', -;; OBJ-NEXT: 'r_sym', 0x000005 -;; OBJ-NEXT: 'r_type', 0x2b - -;; OBJ: Symbol 5 -;; OBJ-NEXT: '.L.str' +;; OBJ: Relocations [ +;; OBJ: Section (1) .text { +;; OBJ-NEXT: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC .L.str +;; OBJ: } +;; OBJ: ] diff --git a/test/MC/ARM/elf-reloc-03.ll b/test/MC/ARM/elf-reloc-03.ll index 87f91c11210b..ac46e697c18a 100644 --- a/test/MC/ARM/elf-reloc-03.ll +++ b/test/MC/ARM/elf-reloc-03.ll @@ -1,7 +1,7 @@ ;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \ ;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \ ;; RUN: -filetype=obj %s -o - | \ -;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s +;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s ;; FIXME: This file needs to be in .s form! ;; The args to llc are there to constrain the codegen only. @@ -88,10 +88,8 @@ entry: declare void @exit(i32) noreturn nounwind -;; OBJ: Relocation 1 -;; OBJ-NEXT: 'r_offset', -;; OBJ-NEXT: 'r_sym', 0x000010 -;; OBJ-NEXT: 'r_type', 0x2b - -;; OBJ: Symbol 16 -;; OBJ-NEXT: 'vtable' +;; OBJ: Relocations [ +;; OBJ: Section (1) .text { +;; OBJ: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC vtable +;; OBJ: } +;; OBJ: ] diff --git a/test/MC/ARM/elf-reloc-condcall.s b/test/MC/ARM/elf-reloc-condcall.s index 3fafb43eb060..612942f2c595 100644 --- a/test/MC/ARM/elf-reloc-condcall.s +++ b/test/MC/ARM/elf-reloc-condcall.s @@ -1,33 +1,18 @@ // RUN: llvm-mc -triple=armv7-linux-gnueabi -filetype=obj %s -o - | \ -// RUN: elf-dump | FileCheck -check-prefix=OBJ %s +// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s bleq some_label bl some_label blx some_label beq some_label b some_label -// OBJ: .rel.text -// OBJ: 'r_offset', 0x00000000 -// OBJ-NEXT: 'r_sym', 0x000005 -// OBJ-NEXT: 'r_type', 0x1d - -// OBJ: 'r_offset', 0x00000004 -// OBJ-NEXT: 'r_sym', 0x000005 -// OBJ-NEXT: 'r_type', 0x1c - -// OBJ: 'r_offset', 0x00000008 -// OBJ-NEXT: 'r_sym', 0x000005 -// OBJ-NEXT: 'r_type', 0x1c - -// OBJ: 'r_offset', 0x0000000c -// OBJ-NEXT: 'r_sym', 0x000005 -// OBJ-NEXT: 'r_type', 0x1d - -// OBJ: 'r_offset', 0x00000010 -// OBJ-NEXT: 'r_sym', 0x000005 -// OBJ-NEXT: 'r_type', 0x1d - -// OBJ: .symtab -// OBJ: Symbol 5 -// OBJ-NEXT: some_label +// OBJ: Relocations [ +// OBJ-NEXT: Section (1) .text { +// OBJ-NEXT: 0x0 R_ARM_JUMP24 some_label 0x0 +// OBJ-NEXT: 0x4 R_ARM_CALL some_label 0x0 +// OBJ-NEXT: 0x8 R_ARM_CALL some_label 0x0 +// OBJ-NEXT: 0xC R_ARM_JUMP24 some_label 0x0 +// OBJ-NEXT: 0x10 R_ARM_JUMP24 some_label 0x0 +// OBJ-NEXT: } +// OBJ-NEXT: ] diff --git a/test/MC/ARM/elf-thumbfunc-reloc.ll b/test/MC/ARM/elf-thumbfunc-reloc.ll index b2f253d2fa95..e7d2c340d44d 100644 --- a/test/MC/ARM/elf-thumbfunc-reloc.ll +++ b/test/MC/ARM/elf-thumbfunc-reloc.ll @@ -1,5 +1,5 @@ ; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \ -; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \ +; RUN: -filetype=obj -o - | llvm-readobj -s -sd -r -t | \ ; RUN: FileCheck %s ; FIXME: This file needs to be in .s form! @@ -22,16 +22,20 @@ entry: ; make sure that bl 0 <foo> (fff7feff) is correctly encoded -; CHECK: '_section_data', '704700bf 2de90048 fff7feff bde80088' - -; Offset Info Type Sym.Value Sym. Name -; 00000008 0000070a R_ARM_THM_CALL 00000001 foo -; CHECK: Relocation 0 -; CHECK-NEXT: 'r_offset', 0x00000008 -; CHECK-NEXT: 'r_sym', 0x000009 -; CHECK-NEXT: 'r_type', 0x0a +; CHECK: Sections [ +; CHECK: SectionData ( +; CHECK: 0000: 704700BF 2DE90048 FFF7FEFF BDE80088 +; CHECK: ) +; CHECK: ] + +; CHECK: Relocations [ +; CHECK-NEXT: Section (1) .text { +; CHECK-NEXT: 0x8 R_ARM_THM_CALL foo 0x0 +; CHECK-NEXT: } +; CHECK-NEXT: ] ; make sure foo is thumb function: bit 0 = 1 -; CHECK: Symbol 9 -; CHECK-NEXT: 'foo' -; CHECK-NEXT: 'st_value', 0x00000001 +; CHECK: Symbols [ +; CHECK: Symbol { +; CHECK: Name: foo +; CHECK-NEXT: Value: 0x1 diff --git a/test/MC/ARM/elf-thumbfunc-reloc.s b/test/MC/ARM/elf-thumbfunc-reloc.s index 4a311dd51131..87a26d8df84e 100644 --- a/test/MC/ARM/elf-thumbfunc-reloc.s +++ b/test/MC/ARM/elf-thumbfunc-reloc.s @@ -1,6 +1,6 @@ @@ test st_value bit 0 of thumb function @ RUN: llvm-mc %s -triple=arm-freebsd-eabi -filetype=obj -o - | \ -@ RUN: elf-dump | FileCheck %s +@ RUN: llvm-readobj -r | FileCheck %s .syntax unified @@ -17,7 +17,8 @@ f: pop {r7, pc} @@ make sure an R_ARM_THM_CALL relocation is generated for the call to g -@CHECK: ('_relocations', [ -@CHECK: (('r_offset', 0x00000004) -@CHECK-NEXT: ('r_sym', 0x{{[0-9a-fA-F]+}}) -@CHECK-NEXT: ('r_type', 0x0a) +@CHECK: Relocations [ +@CHECK-NEXT: Section (1) .text { +@CHECK-NEXT: 0x4 R_ARM_THM_CALL g 0x0 +@CHECK-NEXT: } +@CHECK-NEXT: ] diff --git a/test/MC/ARM/elf-thumbfunc.s b/test/MC/ARM/elf-thumbfunc.s index 91b2eee7592b..26f5f0b159af 100644 --- a/test/MC/ARM/elf-thumbfunc.s +++ b/test/MC/ARM/elf-thumbfunc.s @@ -1,6 +1,6 @@ @@ test st_value bit 0 of thumb function @ RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi -filetype=obj -o - | \ -@ RUN: elf-dump | FileCheck %s +@ RUN: llvm-readobj -t | FileCheck %s .syntax unified .text .globl foo @@ -12,9 +12,9 @@ foo: bx lr @@ make sure foo is thumb function: bit 0 = 1 (st_value) -@CHECK: Symbol 5 -@CHECK-NEXT: 'st_name', 0x00000001 -@CHECK-NEXT: 'st_value', 0x00000001 -@CHECK-NEXT: 'st_size', 0x00000000 -@CHECK-NEXT: 'st_bind', 0x1 -@CHECK-NEXT: 'st_type', 0x2 +@CHECK: Symbol { +@CHECK: Name: foo +@CHECK-NEXT: Value: 0x1 +@CHECK-NEXT: Size: 0 +@CHECK-NEXT: Binding: Global +@CHECK-NEXT: Type: Function diff --git a/test/MC/ARM/invalid-hint-arm.s b/test/MC/ARM/invalid-hint-arm.s new file mode 100644 index 000000000000..e0cd97a19028 --- /dev/null +++ b/test/MC/ARM/invalid-hint-arm.s @@ -0,0 +1,7 @@ +@ RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 < %s 2>&1 | FileCheck %s + +hint #5 +hint #100 + +@ CHECK: error: immediate operand must be in the range [0,4] +@ CHECK: error: immediate operand must be in the range [0,4] diff --git a/test/MC/ARM/invalid-hint-thumb.s b/test/MC/ARM/invalid-hint-thumb.s new file mode 100644 index 000000000000..fd0a761da27b --- /dev/null +++ b/test/MC/ARM/invalid-hint-thumb.s @@ -0,0 +1,9 @@ +@ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 < %s 2>&1 | FileCheck %s + +hint #5 +hint.w #5 +hint #100 + +@ CHECK: error: immediate operand must be in the range [0,4] +@ CHECK: error: immediate operand must be in the range [0,4] +@ CHECK: error: immediate operand must be in the range [0,4] diff --git a/test/MC/ARM/neon-cmp-encoding.s b/test/MC/ARM/neon-cmp-encoding.s index b3aedb8e52ec..cffbeab644a0 100644 --- a/test/MC/ARM/neon-cmp-encoding.s +++ b/test/MC/ARM/neon-cmp-encoding.s @@ -174,3 +174,24 @@ @ CHECK: vcge.u16 q8, q9, q8 @ encoding: [0xf0,0x03,0x52,0xf3] @ CHECK: vcge.u32 q8, q9, q8 @ encoding: [0xf0,0x03,0x62,0xf3] @ CHECK: vcge.f32 q8, q9, q8 @ encoding: [0xe0,0x0e,0x42,0xf3] + + +@ VACLT is an alias for VACGT w/ the source operands reversed. +@ VACLE is an alias for VACGE w/ the source operands reversed. + vaclt.f32 q9, q11, q12 + vaclt.f32 d9, d11, d12 + vaclt.f32 q11, q12 + vaclt.f32 d11, d12 + vacle.f32 q9, q11, q12 + vacle.f32 d9, d11, d12 + vacle.f32 q11, q12 + vacle.f32 d11, d12 + +@ CHECK: vacgt.f32 q9, q12, q11 @ encoding: [0xf6,0x2e,0x68,0xf3] +@ CHECK: vacgt.f32 d9, d12, d11 @ encoding: [0x1b,0x9e,0x2c,0xf3] +@ CHECK: vacgt.f32 q11, q12, q11 @ encoding: [0xf6,0x6e,0x68,0xf3] +@ CHECK: vacgt.f32 d11, d12, d11 @ encoding: [0x1b,0xbe,0x2c,0xf3] +@ CHECK: vacge.f32 q9, q12, q11 @ encoding: [0xf6,0x2e,0x48,0xf3] +@ CHECK: vacge.f32 d9, d12, d11 @ encoding: [0x1b,0x9e,0x0c,0xf3] +@ CHECK: vacge.f32 q11, q12, q11 @ encoding: [0xf6,0x6e,0x48,0xf3] +@ CHECK: vacge.f32 d11, d12, d11 @ encoding: [0x1b,0xbe,0x0c,0xf3] diff --git a/test/MC/ARM/xscale-attributes.ll b/test/MC/ARM/xscale-attributes.ll index 3ccf02b95e2c..d1e9931e1448 100644 --- a/test/MC/ARM/xscale-attributes.ll +++ b/test/MC/ARM/xscale-attributes.ll @@ -2,7 +2,7 @@ ; RUN: FileCheck -check-prefix=ASM %s ; RUN: llc %s -mtriple=thumbv5-linux-gnueabi -filetype=obj \ -; RUN: -mcpu=xscale -o - | elf-dump --dump-section-data | \ +; RUN: -mcpu=xscale -o - | llvm-readobj -s -sd | \ ; RUN: FileCheck -check-prefix=OBJ %s ; FIXME: The OBJ test should be a .s to .o test and the ASM test should @@ -17,15 +17,22 @@ entry: ; ASM-NEXT: .eabi_attribute 8, 1 ; ASM-NEXT: .eabi_attribute 9, 1 -; OBJ: Section 4 -; OBJ-NEXT: 'sh_name', 0x0000000c -; OBJ-NEXT: 'sh_type', 0x70000003 -; OBJ-NEXT: 'sh_flags', 0x00000000 -; OBJ-NEXT: 'sh_addr', 0x00000000 -; OBJ-NEXT: 'sh_offset', 0x00000038 -; OBJ-NEXT: 'sh_size', 0x00000020 -; OBJ-NEXT: 'sh_link', 0x00000000 -; OBJ-NEXT: 'sh_info', 0x00000000 -; OBJ-NEXT: 'sh_addralign', 0x00000001 -; OBJ-NEXT: 'sh_entsize', 0x00000000 -; OBJ-NEXT: '_section_data', '411f0000 00616561 62690001 15000000 06050801 09011401 15011703 18011901' +; OBJ: Sections [ +; OBJ: Section { +; OBJ: Index: 4 +; OBJ-NEXT: Name: .ARM.attributes (12) +; OBJ-NEXT: Type: SHT_ARM_ATTRIBUTES +; OBJ-NEXT: Flags [ (0x0) +; OBJ-NEXT: ] +; OBJ-NEXT: Address: 0x0 +; OBJ-NEXT: Offset: 0x38 +; OBJ-NEXT: Size: 32 +; OBJ-NEXT: Link: 0 +; OBJ-NEXT: Info: 0 +; OBJ-NEXT: AddressAlignment: 1 +; OBJ-NEXT: EntrySize: 0 +; OBJ-NEXT: SectionData ( +; OBJ-NEXT: 0000: 411F0000 00616561 62690001 15000000 +; OBJ-NEXT: 0010: 06050801 09011401 15011703 18011901 +; OBJ-NEXT: ) +; OBJ-NEXT: } diff --git a/test/MC/AsmParser/exprs.s b/test/MC/AsmParser/exprs.s index df075f85ecf5..a7e10020b67b 100644 --- a/test/MC/AsmParser/exprs.s +++ b/test/MC/AsmParser/exprs.s @@ -45,6 +45,7 @@ k: check_expr 0 || 0, 0 check_expr 1 + 2 < 3 + 4, 1 check_expr 1 << 8 - 1, 128 + check_expr 3 * 9 - 2 * 9 + 1, 10 .set c, 10 check_expr c + 1, 11 diff --git a/test/MC/AsmParser/section.s b/test/MC/AsmParser/section.s index 5abacc701354..0c3828d714a7 100644 --- a/test/MC/AsmParser/section.s +++ b/test/MC/AsmParser/section.s @@ -1,5 +1,5 @@ # RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s -# RUN: elf-dump --dump-section-data < %t | FileCheck %s +# RUN: llvm-readobj -s -sd < %t | FileCheck %s .section test1 .byte 1 .section test2 @@ -45,63 +45,85 @@ .previous .byte 1 .previous -# CHECK: (('sh_name', 0x00000044) # 'test1' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000034) -# CHECK-NEXT: ('sh_size', 0x00000007) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '01010101 010101') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x0000003e) # 'test2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x0000003b) -# CHECK-NEXT: ('sh_size', 0x00000006) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '02020202 0202') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x00000038) # 'test3' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000041) -# CHECK-NEXT: ('sh_size', 0x00000005) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '03030303 03') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x00000032) # 'test4' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000046) -# CHECK-NEXT: ('sh_size', 0x00000003) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '040404') -# CHECK-NEXT: ), -# CHECK: (('sh_name', 0x0000002c) # 'test5' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK-NEXT: ('sh_flags', 0x00000000) -# CHECK-NEXT: ('sh_addr', 0x00000000) -# CHECK-NEXT: ('sh_offset', 0x00000049) -# CHECK-NEXT: ('sh_size', 0x00000001) -# CHECK-NEXT: ('sh_link', 0x00000000) -# CHECK-NEXT: ('sh_info', 0x00000000) -# CHECK-NEXT: ('sh_addralign', 0x00000001) -# CHECK-NEXT: ('sh_entsize', 0x00000000) -# CHECK-NEXT: ('_section_data', '05') -# CHECK-NEXT: ), + +# CHECK: Sections [ +# CHECK: Section { +# CHECK: Name: test1 (68) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x34 +# CHECK-NEXT: Size: 7 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 01010101 010101 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test2 (62) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x3B +# CHECK-NEXT: Size: 6 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 02020202 0202 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test3 (56) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x41 +# CHECK-NEXT: Size: 5 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 03030303 03 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test4 (50) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x46 +# CHECK-NEXT: Size: 3 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 040404 +# CHECK-NEXT: ) +# CHECK-NEXT: } +# CHECK: Section { +# CHECK: Name: test5 (44) +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ (0x0) +# CHECK-NEXT: ] +# CHECK-NEXT: Address: 0x0 +# CHECK-NEXT: Offset: 0x49 +# CHECK-NEXT: Size: 1 +# CHECK-NEXT: Link: 0 +# CHECK-NEXT: Info: 0 +# CHECK-NEXT: AddressAlignment: 1 +# CHECK-NEXT: EntrySize: 0 +# CHECK-NEXT: SectionData ( +# CHECK-NEXT: 0000: 05 +# CHECK-NEXT: ) +# CHECK-NEXT: } diff --git a/test/MC/AsmParser/section_names.s b/test/MC/AsmParser/section_names.s index 332cdbe3fed5..3883e15880a5 100644 --- a/test/MC/AsmParser/section_names.s +++ b/test/MC/AsmParser/section_names.s @@ -1,5 +1,5 @@ # RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s -# RUN: elf-dump --dump-section-data < %t | FileCheck %s +# RUN: llvm-readobj -s < %t | FileCheck %s .section .nobits .byte 1 .section .nobits2 @@ -30,33 +30,33 @@ .byte 1 .section .notefoo .byte 1 -# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.nobitsfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array' -# CHECK-NEXT: ('sh_type', 0x0000000e) -# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.init_arrayfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array' -# CHECK-NEXT: ('sh_type', 0x0000000f) -# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_arrayfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array' -# CHECK-NEXT: ('sh_type', 0x00000010) -# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array2' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_arrayfoo' -# CHECK-NEXT: ('sh_type', 0x00000001) -# CHECK: (('sh_name', 0x00000{{...}}) # '.note' -# CHECK-NEXT: ('sh_type', 0x00000007) -# CHECK: (('sh_name', 0x00000{{...}}) # '.note2' -# CHECK-NEXT: ('sh_type', 0x00000007) -#CHECK: (('sh_name', 0x00000{{...}}) # '.notefoo' -# CHECK-NEXT: ('sh_type', 0x00000007) +# CHECK: Name: .nobits +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .nobits2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .nobitsfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .init_array +# CHECK-NEXT: Type: SHT_INIT_ARRAY +# CHECK: Name: .init_array2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .init_arrayfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .fini_array +# CHECK-NEXT: Type: SHT_FINI_ARRAY +# CHECK: Name: .fini_array2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .fini_arrayfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .preinit_array +# CHECK-NEXT: Type: SHT_PREINIT_ARRAY +# CHECK: Name: .preinit_array2 +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .preinit_arrayfoo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK: Name: .note +# CHECK-NEXT: Type: SHT_NOTE +# CHECK: Name: .note2 +# CHECK-NEXT: Type: SHT_NOTE +# CHECK: Name: .notefoo +# CHECK-NEXT: Type: SHT_NOTE diff --git a/test/MC/COFF/align-nops.s b/test/MC/COFF/align-nops.s index 2971ec67798e..02b488475e90 100644 --- a/test/MC/COFF/align-nops.s +++ b/test/MC/COFF/align-nops.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s // Test that we get optimal nops in text .text @@ -15,36 +15,40 @@ f0: .long 0 .align 8 -//CHECK: Name = .text -//CHECK-NEXT: VirtualSize -//CHECK-NEXT: VirtualAddress -//CHECK-NEXT: SizeOfRawData = 16 -//CHECK-NEXT: PointerToRawData -//CHECK-NEXT: PointerToRelocations -//CHECK-NEXT: PointerToLineNumbers -//CHECK-NEXT: NumberOfRelocations -//CHECK-NEXT: NumberOfLineNumbers -//CHECK-NEXT: Charateristics = 0x60400020 -//CHECK-NEXT: IMAGE_SCN_CNT_CODE +//CHECK: Name: .text +//CHECK-NEXT: VirtualSize +//CHECK-NEXT: VirtualAddress +//CHECK-NEXT: RawDataSize: 16 +//CHECK-NEXT: PointerToRawData +//CHECK-NEXT: PointerToRelocations +//CHECK-NEXT: PointerToLineNumbers +//CHECK-NEXT: RelocationCount +//CHECK-NEXT: LineNumberCount +//CHECK-NEXT: Characteristics [ (0x60400020) //CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES +//CHECK-NEXT: IMAGE_SCN_CNT_CODE //CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE //CHECK-NEXT: IMAGE_SCN_MEM_READ -//CHECK-NEXT: SectionData = -//CHECK-NEXT: 00 00 00 00 0F 1F 40 00 - 00 00 00 00 0F 1F 40 00 +//CHECK-NEXT: ] +//CHECK-NEXT: SectionData ( +//CHECK-NEXT: 0000: 00000000 0F1F4000 00000000 0F1F4000 +//CHECK-NEXT: ) -//CHECK: Name = .data -//CHECK-NEXT: VirtualSize -//CHECK-NEXT: VirtualAddress -//CHECK-NEXT: SizeOfRawData = 16 -//CHECK-NEXT: PointerToRawData -//CHECK-NEXT: PointerToRelocations -//CHECK-NEXT: PointerToLineNumbers -//CHECK-NEXT: NumberOfRelocations -//CHECK-NEXT: NumberOfLineNumbers -//CHECK-NEXT: Charateristics = 0xC0400040 -//CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA -//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES -//CHECK-NEXT: IMAGE_SCN_MEM_READ -//CHECK-NEXT: IMAGE_SCN_MEM_WRITE -//CHECK-NEXT: SectionData = -//CHECK-NEXT: 00 00 00 00 90 90 90 90 - 00 00 00 00 00 00 00 00 +//CHECK: Name: .data +//CHECK-NEXT: VirtualSize: +//CHECK-NEXT: VirtualAddress: +//CHECK-NEXT: RawDataSize: 16 +//CHECK-NEXT: PointerToRawData: +//CHECK-NEXT: PointerToRelocations: +//CHECK-NEXT: PointerToLineNumbers: +//CHECK-NEXT: RelocationCount: +//CHECK-NEXT: LineNumberCount: +//CHECK-NEXT: Characteristics [ (0xC0400040) +//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES +//CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA +//CHECK-NEXT: IMAGE_SCN_MEM_READ +//CHECK-NEXT: IMAGE_SCN_MEM_WRITE +//CHECK-NEXT: ] +//CHECK-NEXT: SectionData ( +//CHECK-NEXT: 0000: 00000000 90909090 00000000 00000000 +//CHECK-NEXT: ) diff --git a/test/MC/COFF/basic-coff-64.s b/test/MC/COFF/basic-coff-64.s new file mode 100644 index 000000000000..89d17452d0d7 --- /dev/null +++ b/test/MC/COFF/basic-coff-64.s @@ -0,0 +1,137 @@ +// This test checks that the COFF object emitter works for the most basic +// programs. + +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s + +.def _main; + .scl 2; + .type 32; + .endef + .text + .globl _main + .align 16, 0x90 +_main: # @main +# BB#0: # %entry + subl $4, %esp + movl $.L_.str, (%esp) + call _printf + xorl %eax, %eax + addl $4, %esp + ret + + .data +.L_.str: # @.str + .asciz "Hello World" + +// CHECK: ImageFileHeader { +// CHECK: Machine: IMAGE_FILE_MACHINE_AMD64 +// CHECK: SectionCount: 2 +// CHECK: TimeDateStamp: {{[0-9]+}} +// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}} +// CHECK: SymbolCount: 6 +// CHECK: OptionalHeaderSize: 0 +// CHECK: Characteristics [ (0x0) +// CHECK: ] +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Number: [[TextNum:[0-9]+]] +// CHECK: Name: .text +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: [[TextSize:[0-9]+]] +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}} +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 2 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0x60500020) +// CHECK: IMAGE_SCN_ALIGN_16BYTES +// CHECK: IMAGE_SCN_CNT_CODE +// CHECK: IMAGE_SCN_MEM_EXECUTE +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: ] +// CHECK: Relocations [ +// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_AMD64_ADDR32 .data +// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_AMD64_REL32 _printf +// CHECK: ] +// CHECK: } +// CHECK: Section { +// CHECK: Number: [[DataNum:[0-9]+]] +// CHECK: Name: .data +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: [[DataSize:[0-9]+]] +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x0 +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0xC0300040) +// CHECK: IMAGE_SCN_ALIGN_4BYTES +// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: IMAGE_SCN_MEM_WRITE +// CHECK: ] +// CHECK: Relocations [ +// CHECK: ] +// CHECK: SectionData ( +// CHECK: 0000: 48656C6C 6F20576F 726C6400 |Hello World.| +// CHECK: ) +// CHECK: } +// CHECK: ] +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Name: .text +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: [[TextSize]] +// CHECK: RelocationCount: 2 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: [[TextNum]] +// CHECK: Selection: 0x0 +// CHECK: } +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: .data +// CHECK: Value: 0 +// CHECK: Section: .data +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: [[DataSize]] +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: [[DataNum]] +// CHECK: Selection: 0x0 +// CHECK: Unused: (00 00 00) +// CHECK: } +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _main +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Function +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _printf +// CHECK: Value: 0 +// CHECK: Section: (0) +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: ] diff --git a/test/MC/COFF/basic-coff.s b/test/MC/COFF/basic-coff.s index 23156b82d2e5..9b299707a130 100644 --- a/test/MC/COFF/basic-coff.s +++ b/test/MC/COFF/basic-coff.s @@ -1,8 +1,7 @@ // This test checks that the COFF object emitter works for the most basic // programs. -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s -// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s .def _main; .scl 2; @@ -15,119 +14,124 @@ _main: # @main # BB#0: # %entry subl $4, %esp movl $L_.str, (%esp) - calll _printf + call _printf xorl %eax, %eax addl $4, %esp ret .data L_.str: # @.str - .asciz "Hello World" + .asciz "Hello World" -// CHECK: { -// CHECK: MachineType = IMAGE_FILE_MACHINE_I386 (0x14C) -// CHECK: NumberOfSections = 2 -// CHECK: TimeDateStamp = {{[0-9]+}} -// CHECK: PointerToSymbolTable = 0x{{[0-9A-F]+}} -// CHECK: NumberOfSymbols = 6 -// CHECK: SizeOfOptionalHeader = 0 -// CHECK: Characteristics = 0x0 -// CHECK: Sections = [ -// CHECK: 1 = { -// CHECK: Name = .text -// CHECK: VirtualSize = 0 -// CHECK: VirtualAddress = 0 -// CHECK: SizeOfRawData = {{[0-9]+}} -// CHECK: PointerToRawData = 0x{{[0-9A-F]+}} -// CHECK: PointerToRelocations = 0x{{[0-9A-F]+}} -// CHECK: PointerToLineNumbers = 0x0 -// CHECK: NumberOfRelocations = 2 -// CHECK: NumberOfLineNumbers = 0 -// CHECK: Charateristics = 0x60500020 -// CHECK: IMAGE_SCN_CNT_CODE -// CHECK: IMAGE_SCN_ALIGN_16BYTES -// CHECK: IMAGE_SCN_MEM_EXECUTE -// CHECK: IMAGE_SCN_MEM_READ -// CHECK: SectionData = -// CHECK: Relocations = [ -// CHECK: 0 = { -// CHECK: VirtualAddress = 0x{{[0-9A-F]+}} -// CHECK: SymbolTableIndex = 2 -// CHECK: Type = IMAGE_REL_I386_DIR32 (6) -// CHECK: SymbolName = .data -// CHECK: } -// CHECK: 1 = { -// CHECK: VirtualAddress = 0x{{[0-9A-F]+}} -// CHECK: SymbolTableIndex = 5 -// CHECK: Type = IMAGE_REL_I386_REL32 (20) -// CHECK: SymbolName = _printf -// CHECK: } -// CHECK: ] -// CHECK: } -// CHECK: 2 = { -// CHECK: Name = .data -// CHECK: VirtualSize = 0 -// CHECK: VirtualAddress = 0 -// CHECK: SizeOfRawData = {{[0-9]+}} -// CHECK: PointerToRawData = 0x{{[0-9A-F]+}} -// CHECK: PointerToRelocations = 0x0 -// CHECK: PointerToLineNumbers = 0x0 -// CHECK: NumberOfRelocations = 0 -// CHECK: NumberOfLineNumbers = 0 -// CHECK: Charateristics = 0xC0300040 -// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA -// CHECK: IMAGE_SCN_ALIGN_4BYTES -// CHECK: IMAGE_SCN_MEM_READ -// CHECK: IMAGE_SCN_MEM_WRITE -// CHECK: SectionData = -// CHECK: 48 65 6C 6C 6F 20 57 6F - 72 6C 64 00 |Hello World.| -// CHECK: Relocations = None -// CHECK: } +// CHECK: ImageFileHeader { +// CHECK: Machine: IMAGE_FILE_MACHINE_I386 +// CHECK: SectionCount: 2 +// CHECK: TimeDateStamp: {{[0-9]+}} +// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}} +// CHECK: SymbolCount: 6 +// CHECK: OptionalHeaderSize: 0 +// CHECK: Characteristics [ (0x0) // CHECK: ] -// CHECK: Symbols = [ -// CHECK: 0 = { -// CHECK: Name = .text -// CHECK: Value = 0 -// CHECK: SectionNumber = 1 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3) -// CHECK: NumberOfAuxSymbols = 1 -// CHECK: AuxillaryData = -// CHECK: 15 00 00 00 02 00 00 00 - 00 00 00 00 01 00 00 00 |................| -// CHECK: 00 00 |..| -// CHECK: } -// CHECK: 2 = { -// CHECK: Name = .data -// CHECK: Value = 0 -// CHECK: SectionNumber = 2 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3) -// CHECK: NumberOfAuxSymbols = 1 -// CHECK: AuxillaryData = -// CHECK: 0C 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |................| -// CHECK: 00 00 |..| -// CHECK: } -// CHECK: 4 = { -// CHECK: Name = _main -// CHECK: Value = 0 -// CHECK: SectionNumber = 1 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_FUNCTION (2) -// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2) -// CHECK: NumberOfAuxSymbols = 0 -// CHECK: AuxillaryData = +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Number: [[TextNum:[0-9]+]] +// CHECK: Name: .text +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: {{[0-9]+}} +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}} +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 2 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0x60500020) +// CHECK: IMAGE_SCN_ALIGN_16BYTES +// CHECK: IMAGE_SCN_CNT_CODE +// CHECK: IMAGE_SCN_MEM_EXECUTE +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: ] +// CHECK: Relocations [ +// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_I386_DIR32 .data +// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_I386_REL32 _printf +// CHECK: ] +// CHECK: } +// CHECK: Section { +// CHECK: Number: [[DataNum:[0-9]+]] +// CHECK: Name: .data +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: {{[0-9]+}} +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x0 +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0xC0300040) +// CHECK: IMAGE_SCN_ALIGN_4BYTES +// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: IMAGE_SCN_MEM_WRITE +// CHECK: ] +// CHECK: Relocations [ +// CHECK: ] +// CHECK: SectionData ( +// CHECK: 0000: 48656C6C 6F20576F 726C6400 |Hello World.| +// CHECK: ) +// CHECK: } +// CHECK: ] +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Name: .text +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: 21 +// CHECK: RelocationCount: 2 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: 1 +// CHECK: Selection: 0x0 // CHECK: } -// CHECK: 5 = { -// CHECK: Name = _printf -// CHECK: Value = 0 -// CHECK: SectionNumber = 0 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2) -// CHECK: NumberOfAuxSymbols = 0 -// CHECK: AuxillaryData = +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: .data +// CHECK: Value: 0 +// CHECK: Section: .data +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: 12 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: 2 +// CHECK: Selection: 0x0 +// CHECK: Unused: (00 00 00) // CHECK: } -// CHECK: ] -// CHECK: } +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _main +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Function +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _printf +// CHECK: Value: 0 +// CHECK: Section: (0) +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: ] diff --git a/test/MC/COFF/bss.s b/test/MC/COFF/bss.s index 3bed13d4aac9..86294c18683e 100644 --- a/test/MC/COFF/bss.s +++ b/test/MC/COFF/bss.s @@ -1,7 +1,7 @@ // The purpose of this test is to verify that bss sections are emited correctly. -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s .bss .globl _g0 @@ -9,7 +9,7 @@ _g0: .long 0 -// CHECK: Name = .bss -// CHECK-NEXT: VirtualSize = 0 -// CHECK-NEXT: VirtualAddress = 0 -// CHECK-NEXT: SizeOfRawData = 4 +// CHECK: Name: .bss +// CHECK-NEXT: VirtualSize: 0 +// CHECK-NEXT: VirtualAddress: 0 +// CHECK-NEXT: RawDataSize: 4 diff --git a/test/MC/COFF/diff.s b/test/MC/COFF/diff.s index aa683f26a7b1..820272a40bf4 100644 --- a/test/MC/COFF/diff.s +++ b/test/MC/COFF/diff.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | llvm-readobj -s -sr -sd | FileCheck %s .def _foobar; .scl 2; @@ -21,26 +21,12 @@ _rust_crate: .long _foobar-_rust_crate .long _foobar-_rust_crate -// CHECK: Name = .data -// CHECK: SectionData = -// CHECK-NEXT: 00 00 00 00 00 00 00 00 - 1C 00 00 00 20 00 00 00 |............ ...| -// CHECK: Relocations = [ -// CHECK-NEXT: 0 = { -// CHECK-NEXT: VirtualAddress = 0x4 -// CHECK-NEXT: SymbolTableIndex = -// CHECK-NEXT: Type = IMAGE_REL_I386_DIR32 (6) -// CHECK-NEXT: SymbolName = _foobar -// CHECK-NEXT: } -// CHECK-NEXT: 1 = { -// CHECK-NEXT: VirtualAddress = 0x8 -// CHECK-NEXT: SymbolTableIndex = 0 -// CHECK-NEXT: Type = IMAGE_REL_I386_REL32 (20) -// CHECK-NEXT: SymbolName = .text -// CHECK-NEXT: } -// CHECK-NEXT: 2 = { -// CHECK-NEXT: VirtualAddress = 0xC -// CHECK-NEXT: SymbolTableIndex = 0 -// CHECK-NEXT: Type = IMAGE_REL_I386_REL32 (20) -// CHECK-NEXT: SymbolName = .text -// CHECK-NEXT: } -// CHECK-NEXT: ] +// CHECK: Name: .data +// CHECK: Relocations [ +// CHECK-NEXT: 0x4 IMAGE_REL_I386_DIR32 _foobar +// CHECK-NEXT: 0x8 IMAGE_REL_I386_REL32 .text +// CHECK-NEXT: 0xC IMAGE_REL_I386_REL32 .text +// CHECK-NEXT: ] +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 00000000 00000000 1C000000 20000000 +// CHECK-NEXT: ) diff --git a/test/MC/COFF/linker-options.ll b/test/MC/COFF/linker-options.ll new file mode 100755 index 000000000000..de119417447e --- /dev/null +++ b/test/MC/COFF/linker-options.ll @@ -0,0 +1,21 @@ +; RUN: llc -O0 -mtriple=i386-pc-win32 -filetype=asm -o - %s | FileCheck %s + +!0 = metadata !{ i32 6, metadata !"Linker Options", + metadata !{ + metadata !{ metadata !"/DEFAULTLIB:msvcrt.lib" }, + metadata !{ metadata !"/DEFAULTLIB:msvcrt.lib", + metadata !"/DEFAULTLIB:secur32.lib" }, + metadata !{ metadata !"/with spaces" } } } + +!llvm.module.flags = !{ !0 } + +define dllexport void @foo() { + ret void +} + +; CHECK: .section .drectve,"r" +; CHECK: .ascii " /DEFAULTLIB:msvcrt.lib" +; CHECK: .ascii " /DEFAULTLIB:msvcrt.lib" +; CHECK: .ascii " /DEFAULTLIB:secur32.lib" +; CHECK: .ascii " \"/with spaces\"" +; CHECK: .ascii " /EXPORT:_foo" diff --git a/test/MC/COFF/module-asm.ll b/test/MC/COFF/module-asm.ll index 9c6d00d2f503..bf14dc695b58 100644 --- a/test/MC/COFF/module-asm.ll +++ b/test/MC/COFF/module-asm.ll @@ -1,26 +1,28 @@ ; The purpose of this test is to verify that various module level assembly ; constructs work. -; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s -; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | coff-dump.py | FileCheck %s +; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s +; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s module asm ".text" module asm "_foo:" module asm " ret" -; CHECK: Name = .text -; CHECK-NEXT: VirtualSize = 0 -; CHECK-NEXT: VirtualAddress = 0 -; CHECK-NEXT: SizeOfRawData = {{[0-9]+}} -; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}} -; CHECK-NEXT: PointerToRelocations = 0x{{[0-9A-F]+}} -; CHECK-NEXT: PointerToLineNumbers = 0x0 -; CHECK-NEXT: NumberOfRelocations = 0 -; CHECK-NEXT: NumberOfLineNumbers = 0 -; CHECK-NEXT: Charateristics = 0x60300020 -; CHECK-NEXT: IMAGE_SCN_CNT_CODE +; CHECK: Name: .text +; CHECK-NEXT: VirtualSize: 0 +; CHECK-NEXT: VirtualAddress: 0 +; CHECK-NEXT: RawDataSize: {{[0-9]+}} +; CHECK-NEXT: PointerToRawData: 0x{{[0-9A-F]+}} +; CHECK-NEXT: PointerToRelocations: 0x{{[0-9A-F]+}} +; CHECK-NEXT: PointerToLineNumbers: 0x0 +; CHECK-NEXT: RelocationCount: 0 +; CHECK-NEXT: LineNumberCount: 0 +; CHECK-NEXT: Characteristics [ (0x60300020) ; CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES +; CHECK-NEXT: IMAGE_SCN_CNT_CODE ; CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE ; CHECK-NEXT: IMAGE_SCN_MEM_READ -; CHECK-NEXT: SectionData = -; CHECK-NEXT: C3 +; CHECK-NEXT: ] +; CHECK-NEXT: SectionData ( +; CHECK-NEXT: 0000: C3 +; CHECK-NEXT: ) diff --git a/test/MC/COFF/relocation-imgrel.s b/test/MC/COFF/relocation-imgrel.s new file mode 100644 index 000000000000..ccd19ee318b6 --- /dev/null +++ b/test/MC/COFF/relocation-imgrel.s @@ -0,0 +1,29 @@ +// COFF Image-relative relocations +// +// Test that we produce image-relative relocations (IMAGE_REL_I386_DIR32NB +// and IMAGE_REL_AMD64_ADDR32NB) when accessing foo@imgrel. + +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -r | FileCheck --check-prefix=W32 %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -r | FileCheck --check-prefix=W64 %s + +.data +foo: + .long 1 + +.text + mov foo@IMGREL(%ebx, %ecx, 4), %eax + mov foo@imgrel(%ebx, %ecx, 4), %eax + +// W32: Relocations [ +// W32-NEXT: Section (1) .text { +// W32-NEXT: 0x3 IMAGE_REL_I386_DIR32NB foo +// W32-NEXT: 0xA IMAGE_REL_I386_DIR32NB foo +// W32-NEXT: } +// W32-NEXT: ] + +// W64: Relocations [ +// W64-NEXT: Section (1) .text { +// W64-NEXT: 0x4 IMAGE_REL_AMD64_ADDR32NB foo +// W64-NEXT: 0xC IMAGE_REL_AMD64_ADDR32NB foo +// W64-NEXT: } +// W64-NEXT: ] diff --git a/test/MC/COFF/secrel-variant.s b/test/MC/COFF/secrel-variant.s new file mode 100644 index 000000000000..1061bd404eaa --- /dev/null +++ b/test/MC/COFF/secrel-variant.s @@ -0,0 +1,19 @@ +// COFF section-relative relocations + +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -r | FileCheck %s + +.data +values: + .long 1 + .long 0 + +.text + movq values@SECREL32(%rax), %rcx + movq values@SECREL32+8(%rax), %rax + +// CHECK: Relocations [ +// CHECK-NEXT: Section (1) .text { +// CHECK-NEXT: 0x3 IMAGE_REL_AMD64_SECREL values +// CHECK-NEXT: 0xA IMAGE_REL_AMD64_SECREL values +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/COFF/secrel32.s b/test/MC/COFF/secrel32.s index ce148db9000c..deadfe09e0e4 100644 --- a/test/MC/COFF/secrel32.s +++ b/test/MC/COFF/secrel32.s @@ -1,14 +1,10 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s -sr | FileCheck %s // check that we produce the correct relocation for .secrel32 Lfoo: .secrel32 Lfoo -// CHECK: Relocations = [ -// CHECK-NEXT: 0 = { -// CHECK-NEXT: VirtualAddress = 0x0 -// CHECK-NEXT: SymbolTableIndex = 0 -// CHECK-NEXT: Type = IMAGE_REL_I386_SECREL (11) -// CHECK-NEXT: SymbolName = .text -// CHECK-NEXT: } +// CHECK: Relocations [ +// CHECK-NEXT: 0x0 IMAGE_REL_I386_SECREL .text +// CHECK-NEXT: ] diff --git a/test/MC/COFF/seh-section.s b/test/MC/COFF/seh-section.s index 802cba5e6b31..7f05cc372e07 100644 --- a/test/MC/COFF/seh-section.s +++ b/test/MC/COFF/seh-section.s @@ -1,24 +1,26 @@ // This test ensures that, if the section containing a function has a suffix // (e.g. .text$foo), its unwind info section also has a suffix (.xdata$foo). -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s // XFAIL: * -// CHECK: Name = .xdata$foo +// CHECK: Name: .xdata$foo // CHECK-NEXT: VirtualSize // CHECK-NEXT: VirtualAddress -// CHECK-NEXT: SizeOfRawData = 8 +// CHECK-NEXT: RawDataSize: 8 // CHECK-NEXT: PointerToRawData // CHECK-NEXT: PointerToRelocations // CHECK-NEXT: PointerToLineNumbers -// CHECK-NEXT: NumberOfRelocations = 0 -// CHECK-NEXT: NumberOfLineNumbers = 0 -// CHECK-NEXT: Charateristics -// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK-NEXT: RelocationCount: 0 +// CHECK-NEXT: LineNumberCount: 0 +// CHECK-NEXT: Characteristics [ // CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES +// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA // CHECK-NEXT: IMAGE_SCN_MEM_READ // CHECK-NEXT: IMAGE_SCN_MEM_WRITE -// CHECK-NEXT: SectionData -// CHECK-NEXT: 01 05 02 00 05 50 04 02 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 01050200 05500402 +// CHECK-NEXT: ) .section .text$foo,"x" .globl foo diff --git a/test/MC/COFF/seh.s b/test/MC/COFF/seh.s index 3f728056005b..bef425efb437 100644 --- a/test/MC/COFF/seh.s +++ b/test/MC/COFF/seh.s @@ -1,24 +1,105 @@ // This test checks that the SEH directives emit the correct unwind data. -// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | coff-dump.py | FileCheck %s -// CHECK: Name = .xdata -// CHECK-NEXT: VirtualSize -// CHECK-NEXT: VirtualAddress -// CHECK-NEXT: SizeOfRawData = 52 -// CHECK-NEXT: PointerToRawData -// CHECK-NEXT: PointerToRelocations -// CHECK-NEXT: PointerToLineNumbers -// CHECK-NEXT: NumberOfRelocations = 4 -// CHECK-NEXT: NumberOfLineNumbers = 0 -// CHECK-NEXT: Charateristics -// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA -// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES -// CHECK-NEXT: IMAGE_SCN_MEM_READ -// CHECK-NEXT: SectionData -// CHECK-NEXT: 09 12 08 03 00 03 0F 30 - 0E 88 00 00 09 64 02 00 -// CHECK-NEXT: 04 22 00 1A 00 00 00 00 - 00 00 00 00 21 00 00 00 -// CHECK-NEXT: 00 00 00 00 1B 00 00 00 - 00 00 00 00 01 00 00 00 -// CHECK-NEXT: 00 00 00 00 +// TODO: Expected fail because SET_FPREG has a wrong offset. +// XFAIL: * +// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -s -u | FileCheck %s + +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Name: .text +// CHECK: RelocationCount: 0 +// CHECK: Characteristics [ +// CHECK-NEXT: ALIGN_4BYTES +// CHECK-NEXT: CNT_CODE +// CHECK-NEXT: MEM_EXECUTE +// CHECK-NEXT: MEM_READ +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .xdata +// CHECK: RawDataSize: 52 +// CHECK: RelocationCount: 4 +// CHECK: Characteristics [ +// CHECK-NEXT: ALIGN_4BYTES +// CHECK-NEXT: CNT_INITIALIZED_DATA +// CHECK-NEXT: MEM_READ +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .pdata +// CHECK: RelocationCount: 9 +// CHECK: Characteristics [ +// CHECK-NEXT: ALIGN_4BYTES +// CHECK-NEXT: CNT_INITIALIZED_DATA +// CHECK-NEXT: MEM_READ +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: ] + +// CHECK: UnwindInformation [ +// CHECK-NEXT: RuntimeFunction { +// CHECK-NEXT: StartAddress: [[CodeSect1:[^ ]+]] [[BeginDisp1:(\+0x[A-F0-9]+)?]] +// CHECK-NEXT: EndAddress: [[CodeSect1]] [[EndDisp1:(\+0x[A-F0-9]+)?]] +// CHECK-NEXT: UnwindInfoAddress: +// CHECK-NEXT: UnwindInfo { +// CHECK-NEXT: Version: 1 +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ExceptionHandler +// CHECK-NEXT: ] +// CHECK-NEXT: PrologSize: 18 +// CHECK-NEXT: FrameRegister: RBX +// CHECK-NEXT: FrameOffset: 0x0 +// CHECK-NEXT: UnwindCodeCount: 8 +// CHECK-NEXT: UnwindCodes [ +// CHECK-NEXT: 0x12: SET_FPREG reg=RBX, offset=0x0 +// CHECK-NEXT: 0x0F: PUSH_NONVOL reg=RBX +// CHECK-NEXT: 0x0E: SAVE_XMM128 reg=XMM8, offset=0x0 +// CHECK-NEXT: 0x09: SAVE_NONVOL reg=RSI, offset=0x10 +// CHECK-NEXT: 0x04: ALLOC_SMALL size=24 +// CHECK-NEXT: 0x00: PUSH_MACHFRAME errcode=yes +// CHECK-NEXT: ] +// CHECK-NEXT: Handler: __C_specific_handler +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: RuntimeFunction { +// CHECK-NEXT: StartAddress: [[CodeSect2:[^ ]+]] [[BeginDisp2:(\+0x[A-F0-9]+)?]] +// CHECK-NEXT: EndAddress: [[CodeSect2]] [[BeginDisp2:(\+0x[A-F0-9]+)?]] +// CHECK-NEXT: UnwindInfoAddress: +// CHECK-NEXT: UnwindInfo { +// CHECK-NEXT: Version: 1 +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ChainInfo +// CHECK-NEXT: ] +// CHECK-NEXT: PrologSize: 0 +// CHECK-NEXT: FrameRegister: - +// CHECK-NEXT: FrameOffset: - +// CHECK-NEXT: UnwindCodeCount: 0 +// CHECK-NEXT: UnwindCodes [ +// CHECK-NEXT: ] +// CHECK-NEXT: Chained { +// CHECK-NEXT: StartAddress: [[CodeSect1]] [[BeginDisp1]] +// CHECK-NEXT: EndAddress: [[CodeSect1]] [[EndDisp1]] +// CHECK-NEXT: UnwindInfoAddress: +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: RuntimeFunction { +// CHECK-NEXT: StartAddress: [[CodeSect3:[^ ]+]] [[BeginDisp3:(\+0x[A-F0-9]+)?]] +// CHECK-NEXT: EndAddress: [[CodeSect3]] [[BeginDisp3:(\+0x[A-F0-9]+)?]] +// CHECK-NEXT: UnwindInfoAddress: +// CHECK-NEXT: UnwindInfo { +// CHECK-NEXT: Version: 1 +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: PrologSize: 0 +// CHECK-NEXT: FrameRegister: - +// CHECK-NEXT: FrameOffset: - +// CHECK-NEXT: UnwindCodeCount: 0 +// CHECK-NEXT: UnwindCodes [ +// CHECK-NEXT: ] +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] .text .globl func diff --git a/test/MC/COFF/simple-fixups.s b/test/MC/COFF/simple-fixups.s index 4c9b4d44528f..2a74f21f12d0 100644 --- a/test/MC/COFF/simple-fixups.s +++ b/test/MC/COFF/simple-fixups.s @@ -1,8 +1,8 @@ // The purpose of this test is to verify that we do not produce unneeded // relocations when symbols are in the same section and we know their offset. -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s -// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s .def _foo; .scl 2; @@ -41,10 +41,9 @@ _baz: # @baz # BB#0: # %e subl $4, %esp Ltmp0: - calll _baz + call _baz addl $4, %esp ret -// CHECK: Sections = [ -// CHECK-NOT: NumberOfRelocations = {{[^0]}} -// CHECK: Symbols = [ +// CHECK: Sections [ +// CHECK-NOT: RelocationCount: {{[^0]}} diff --git a/test/MC/COFF/symbol-alias.s b/test/MC/COFF/symbol-alias.s index 4b1772ce711b..ccada3793ca3 100644 --- a/test/MC/COFF/symbol-alias.s +++ b/test/MC/COFF/symbol-alias.s @@ -1,9 +1,9 @@ // The purpose of this test is to verify that symbol aliases -// (@foo = alias <type> @bar) generate the correct entries in the symbol table. +// (@foo: alias <type> @bar) generate the correct entries in the symbol table. // They should be identical except for the name. -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s .def _foo; .scl 2; @@ -31,43 +31,43 @@ _bar_alias_alias = _bar_alias .globl _bar_alias _bar_alias = _bar -// CHECK: Name = {{_?}}foo -// CHECK-NEXT: Value = [[FOO_VALUE:.*$]] -// CHECK-NEXT: SectionNumber = [[FOO_SECTION_NUMBER:.*$]] -// CHECK-NEXT: SimpleType = [[FOO_SIMPLE_TYPE:.*$]] -// CHECK-NEXT: ComplexType = [[FOO_COMPLEX_TYPE:.*$]] -// CHECK-NEXT: StorageClass = [[FOO_STORAGE_CLASS:.*$]] -// CHECK-NEXT: NumberOfAuxSymbols = [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]] +// CHECK: Name: {{_?}}foo +// CHECK-NEXT: Value: [[FOO_VALUE:.*$]] +// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER:.*$]] +// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE:.*$]] +// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE:.*$]] +// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS:.*$]] +// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]] -// CHECK: Name = {{_?}}bar -// CHECK-NEXT: Value = [[BAR_VALUE:.*$]] -// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER:.*$]] -// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE:.*$]] -// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE:.*$]] -// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS:.*$]] -// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]] +// CHECK: Name: {{_?}}bar +// CHECK-NEXT: Value: [[BAR_VALUE:.*$]] +// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER:.*$]] +// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE:.*$]] +// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE:.*$]] +// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS:.*$]] +// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]] -// CHECK: Name = {{_?}}foo_alias -// CHECK-NEXT: Value = [[FOO_VALUE]] -// CHECK-NEXT: SectionNumber = [[FOO_SECTION_NUMBER]] -// CHECK-NEXT: SimpleType = [[FOO_SIMPLE_TYPE]] -// CHECK-NEXT: ComplexType = [[FOO_COMPLEX_TYPE]] -// CHECK-NEXT: StorageClass = [[FOO_STORAGE_CLASS]] -// CHECK-NEXT: NumberOfAuxSymbols = [[FOO_NUMBER_OF_AUX_SYMBOLS]] +// CHECK: Name: {{_?}}foo_alias +// CHECK-NEXT: Value: [[FOO_VALUE]] +// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER]] +// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE]] +// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE]] +// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS]] +// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS]] -// CHECK: Name = {{_?}}bar_alias_alias -// CHECK-NEXT: Value = [[BAR_VALUE]] -// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER]] -// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE]] -// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE]] -// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS]] -// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS]] +// CHECK: Name: {{_?}}bar_alias_alias +// CHECK-NEXT: Value: [[BAR_VALUE]] +// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]] +// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]] +// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]] +// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]] +// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]] -// CHECK: Name = {{_?}}bar_alias -// CHECK-NEXT: Value = [[BAR_VALUE]] -// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER]] -// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE]] -// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE]] -// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS]] -// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS]] +// CHECK: Name: {{_?}}bar_alias +// CHECK-NEXT: Value: [[BAR_VALUE]] +// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]] +// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]] +// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]] +// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]] +// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]] diff --git a/test/MC/COFF/symbol-fragment-offset-64.s b/test/MC/COFF/symbol-fragment-offset-64.s new file mode 100644 index 000000000000..b8244709aa75 --- /dev/null +++ b/test/MC/COFF/symbol-fragment-offset-64.s @@ -0,0 +1,168 @@ +// The purpose of this test is to see if the COFF object writer is emitting the +// proper relocations for multiple pieces of data in a single data fragment. + +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s + +.def _main; + .scl 2; + .type 32; + .endef + .text + .globl _main + .align 16, 0x90 +_main: # @main +# BB#0: # %entry + subl $4, %esp + movl $.L_.str0, (%esp) + callq _printf + movl $.L_.str1, (%esp) + callq _puts + movl $.L_.str2, (%esp) + callq _puts + xorl %eax, %eax + addl $4, %esp + ret + + .data +.L_.str0: # @.str0 + .asciz "Hello " + +.L_.str1: # @.str1 + .asciz "World!" + + .align 16 # @.str2 +.L_.str2: + .asciz "I'm The Last Line." + +// CHECK: { +// CHECK: Machine: IMAGE_FILE_MACHINE_AMD64 +// CHECK: SectionCount: 2 +// CHECK: TimeDateStamp: {{[0-9]+}} +// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}} +// CHECK: SymbolCount: 7 +// CHECK: OptionalHeaderSize: 0 +// CHECK: Characteristics [ (0x0) +// CHECK: ] +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Number: 1 +// CHECK: Name: .text +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: {{[0-9]+}} +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}} +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 6 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0x60500020) +// CHECK: IMAGE_SCN_ALIGN_16BYTES +// CHECK: IMAGE_SCN_CNT_CODE +// CHECK: IMAGE_SCN_MEM_EXECUTE +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: ] +// CHECK: Relocations [ +// CHECK: 0x7 IMAGE_REL_AMD64_ADDR32 .data +// CHECK: 0xC IMAGE_REL_AMD64_REL32 _printf +// CHECK: 0x14 IMAGE_REL_AMD64_ADDR32 .data +// CHECK: 0x19 IMAGE_REL_AMD64_REL32 _puts +// CHECK: 0x21 IMAGE_REL_AMD64_ADDR32 .data +// CHECK: 0x26 IMAGE_REL_AMD64_REL32 _puts +// CHECK: ] +// CHECK: SectionData ( +// CHECK: 0000: 83EC0467 C7042400 000000E8 00000000 +// CHECK: 0010: 67C70424 07000000 E8000000 0067C704 +// CHECK: 0020: 24100000 00E80000 000031C0 83C404C3 +// CHECK: ) +// CHECK: } +// CHECK: Section { +// CHECK: Number: 2 +// CHECK: Name: .data +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: {{[0-9]+}} +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x0 +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0xC0500040) +// CHECK: IMAGE_SCN_ALIGN_16BYTES +// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: IMAGE_SCN_MEM_WRITE +// CHECK: Relocations [ +// CHECK: ] +// CHECK: SectionData ( +// CHECK: 0000: 48656C6C 6F200057 6F726C64 21000000 |Hello .World!...| +// CHECK: 0010: 49276D20 54686520 4C617374 204C696E |I'm The Last Lin| +// CHECK: 0020: 652E00 |e..| +// CHECK: ) +// CHECK: } +// CHECK: ] +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Name: .text +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: 48 +// CHECK: RelocationCount: 6 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: 1 +// CHECK: Selection: 0x0 +// CHECK: Unused: (00 00 00) +// CHECK: } +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: .data +// CHECK: Value: 0 +// CHECK: Section: .data +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: 35 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: 2 +// CHECK: Selection: 0x0 +// CHECK: Unused: (00 00 00) +// CHECK: } +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _main +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Function +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _printf +// CHECK: Value: 0 +// CHECK: Section: (0) +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _puts +// CHECK: Value: 0 +// CHECK: Section: (0) +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: ] diff --git a/test/MC/COFF/symbol-fragment-offset.s b/test/MC/COFF/symbol-fragment-offset.s index 1df8baacaf22..71b1703972ab 100644 --- a/test/MC/COFF/symbol-fragment-offset.s +++ b/test/MC/COFF/symbol-fragment-offset.s @@ -1,8 +1,7 @@ // The purpose of this test is to see if the COFF object writer is emitting the // proper relocations for multiple pieces of data in a single data fragment. -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s -// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s .def _main; .scl 2; @@ -36,152 +35,134 @@ L_.str2: .asciz "I'm The Last Line." // CHECK: { -// CHECK: MachineType = IMAGE_FILE_MACHINE_I386 (0x14C) -// CHECK: NumberOfSections = 2 -// CHECK: TimeDateStamp = {{[0-9]+}} -// CHECK: PointerToSymbolTable = 0x{{[0-9A-F]+}} -// CHECK: NumberOfSymbols = 7 -// CHECK: SizeOfOptionalHeader = 0 -// CHECK: Characteristics = 0x0 -// CHECK: Sections = [ -// CHECK: 1 = { -// CHECK: Name = .text -// CHECK: VirtualSize = 0 -// CHECK: VirtualAddress = 0 -// CHECK: SizeOfRawData = {{[0-9]+}} -// CHECK: PointerToRawData = 0x{{[0-9A-F]+}} -// CHECK: PointerToRelocations = 0x{{[0-9A-F]+}} -// CHECK: PointerToLineNumbers = 0x0 -// CHECK: NumberOfRelocations = 6 -// CHECK: NumberOfLineNumbers = 0 -// CHECK: Charateristics = 0x60500020 -// CHECK: IMAGE_SCN_CNT_CODE -// CHECK: IMAGE_SCN_ALIGN_16BYTES -// CHECK: IMAGE_SCN_MEM_EXECUTE -// CHECK: IMAGE_SCN_MEM_READ -// CHECK: SectionData = -// CHECK: 83 EC 04 C7 04 24 00 00 - 00 00 E8 00 00 00 00 C7 |.....$..........| -// CHECK: 04 24 07 00 00 00 E8 00 - 00 00 00 C7 04 24 10 00 |.$...........$..| -// CHECK: 00 00 E8 00 00 00 00 31 - C0 83 C4 04 C3 |.......1.....| -// CHECK: Relocations = [ -// CHECK: 0 = { -// CHECK: VirtualAddress = 0x6 -// CHECK: SymbolTableIndex = 2 -// CHECK: Type = IMAGE_REL_I386_DIR32 (6) -// CHECK: SymbolName = .data -// CHECK: } -// CHECK: 1 = { -// CHECK: VirtualAddress = 0xB -// CHECK: SymbolTableIndex = 5 -// CHECK: Type = IMAGE_REL_I386_REL32 (20) -// CHECK: SymbolName = _printf -// CHECK: } -// CHECK: 2 = { -// CHECK: VirtualAddress = 0x12 -// CHECK: SymbolTableIndex = 2 -// CHECK: Type = IMAGE_REL_I386_DIR32 (6) -// CHECK: SymbolName = .data -// CHECK: } -// CHECK: 3 = { -// CHECK: VirtualAddress = 0x17 -// CHECK: SymbolTableIndex = 6 -// CHECK: Type = IMAGE_REL_I386_REL32 (20) -// CHECK: SymbolName = _puts -// CHECK: } -// CHECK: 4 = { -// CHECK: VirtualAddress = 0x1E -// CHECK: SymbolTableIndex = 2 -// CHECK: Type = IMAGE_REL_I386_DIR32 (6) -// CHECK: SymbolName = .data -// CHECK: } -// CHECK: 5 = { -// CHECK: VirtualAddress = 0x23 -// CHECK: SymbolTableIndex = 6 -// CHECK: Type = IMAGE_REL_I386_REL32 (20) -// CHECK: SymbolName = _puts -// CHECK: } -// CHECK: ] -// CHECK: } -// CHECK: 2 = { -// CHECK: Name = .data -// CHECK: VirtualSize = 0 -// CHECK: VirtualAddress = 0 -// CHECK: SizeOfRawData = {{[0-9]+}} -// CHECK: PointerToRawData = 0x{{[0-9A-F]+}} -// CHECK: PointerToRelocations = 0x0 -// CHECK: PointerToLineNumbers = 0x0 -// CHECK: NumberOfRelocations = 0 -// CHECK: NumberOfLineNumbers = 0 -// CHECK: Charateristics = 0xC0500040 -// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA -// CHECK: IMAGE_SCN_ALIGN_16BYTES -// CHECK: IMAGE_SCN_MEM_READ -// CHECK: IMAGE_SCN_MEM_WRITE -// CHECK: SectionData = -// CHECK: 48 65 6C 6C 6F 20 00 57 - 6F 72 6C 64 21 00 00 00 |Hello .World!...| -// CHECK: 49 27 6D 20 54 68 65 20 - 4C 61 73 74 20 4C 69 6E |I'm The Last Lin| -// CHECK: 65 2E 00 |e..| -// CHECK: Relocations = None -// CHECK: } +// CHECK: Machine: IMAGE_FILE_MACHINE_I386 (0x14C) +// CHECK: SectionCount: 2 +// CHECK: TimeDateStamp: {{[0-9]+}} +// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}} +// CHECK: SymbolCount: 7 +// CHECK: OptionalHeaderSize: 0 +// CHECK: Characteristics [ (0x0) // CHECK: ] -// CHECK: Symbols = [ -// CHECK: 0 = { -// CHECK: Name = .text -// CHECK: Value = 0 -// CHECK: SectionNumber = 1 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3) -// CHECK: NumberOfAuxSymbols = 1 -// CHECK: AuxillaryData = -// CHECK: 2D 00 00 00 06 00 00 00 - 00 00 00 00 01 00 00 00 |-...............| -// CHECK: 00 00 |..| - -// CHECK: } -// CHECK: 2 = { -// CHECK: Name = .data -// CHECK: Value = 0 -// CHECK: SectionNumber = 2 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3) -// CHECK: NumberOfAuxSymbols = 1 -// CHECK: AuxillaryData = -// CHECK: 23 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |#...............| -// CHECK: 00 00 |..| - -// CHECK: } -// CHECK: 4 = { -// CHECK: Name = _main -// CHECK: Value = 0 -// CHECK: SectionNumber = 1 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_FUNCTION (2) -// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2) -// CHECK: NumberOfAuxSymbols = 0 -// CHECK: AuxillaryData = - -// CHECK: 5 = { -// CHECK: Name = _printf -// CHECK: Value = 0 -// CHECK: SectionNumber = 0 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2) -// CHECK: NumberOfAuxSymbols = 0 -// CHECK: AuxillaryData = - +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Number: 1 +// CHECK: Name: .text +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: {{[0-9]+}} +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}} +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 6 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0x60500020) +// CHECK: IMAGE_SCN_ALIGN_16BYTES +// CHECK: IMAGE_SCN_CNT_CODE +// CHECK: IMAGE_SCN_MEM_EXECUTE +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: ] +// CHECK: Relocations [ +// CHECK: 0x6 IMAGE_REL_I386_DIR32 .data +// CHECK: 0xB IMAGE_REL_I386_REL32 _printf +// CHECK: 0x12 IMAGE_REL_I386_DIR32 .data +// CHECK: 0x17 IMAGE_REL_I386_REL32 _puts +// CHECK: 0x1E IMAGE_REL_I386_DIR32 .data +// CHECK: 0x23 IMAGE_REL_I386_REL32 _puts +// CHECK: ] +// CHECK: SectionData ( +// CHECK: 0000: 83EC04C7 04240000 0000E800 000000C7 |.....$..........| +// CHECK: 0010: 04240700 0000E800 000000C7 04241000 |.$...........$..| +// CHECK: 0020: 0000E800 00000031 C083C404 C3 |.......1.....| +// CHECK: ) +// CHECK: } +// CHECK: Section { +// CHECK: Number: 2 +// CHECK: Name: .data +// CHECK: VirtualSize: 0 +// CHECK: VirtualAddress: 0 +// CHECK: RawDataSize: {{[0-9]+}} +// CHECK: PointerToRawData: 0x{{[0-9A-F]+}} +// CHECK: PointerToRelocations: 0x0 +// CHECK: PointerToLineNumbers: 0x0 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Characteristics [ (0xC0500040) +// CHECK: IMAGE_SCN_ALIGN_16BYTES +// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA +// CHECK: IMAGE_SCN_MEM_READ +// CHECK: IMAGE_SCN_MEM_WRITE +// CHECK: Relocations [ +// CHECK: ] +// CHECK: SectionData ( +// CHECK: 0000: 48656C6C 6F200057 6F726C64 21000000 |Hello .World!...| +// CHECK: 0010: 49276D20 54686520 4C617374 204C696E |I'm The Last Lin| +// CHECK: 0020: 652E00 |e..| +// CHECK: ) +// CHECK: } +// CHECK: ] +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Name: .text +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: 45 +// CHECK: RelocationCount: 6 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: 1 +// CHECK: Selection: 0x0 +// CHECK: Unused: (00 00 00) // CHECK: } -// CHECK: 6 = { -// CHECK: Name = _puts -// CHECK: Value = 0 -// CHECK: SectionNumber = 0 -// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2) -// CHECK: NumberOfAuxSymbols = 0 -// CHECK: AuxillaryData = - +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: .data +// CHECK: Value: 0 +// CHECK: Section: .data +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: Static +// CHECK: AuxSymbolCount: 1 +// CHECK: AuxSectionDef { +// CHECK: Length: 35 +// CHECK: RelocationCount: 0 +// CHECK: LineNumberCount: 0 +// CHECK: Checksum: 0x0 +// CHECK: Number: 2 +// CHECK: Selection: 0x0 +// CHECK: Unused: (00 00 00) // CHECK: } -// CHECK: ] -// CHECK: } +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _main +// CHECK: Value: 0 +// CHECK: Section: .text +// CHECK: BaseType: Null +// CHECK: ComplexType: Function +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _printf +// CHECK: Value: 0 +// CHECK: Section: (0) +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: Symbol { +// CHECK: Name: _puts +// CHECK: Value: 0 +// CHECK: Section: (0) +// CHECK: BaseType: Null +// CHECK: ComplexType: Null +// CHECK: StorageClass: External +// CHECK: AuxSymbolCount: 0 +// CHECK: } +// CHECK: ] diff --git a/test/MC/COFF/weak-symbol-section-specification.ll b/test/MC/COFF/weak-symbol-section-specification.ll index 5049372959fb..4772c929f29e 100644 --- a/test/MC/COFF/weak-symbol-section-specification.ll +++ b/test/MC/COFF/weak-symbol-section-specification.ll @@ -1,23 +1,25 @@ ; The purpose of this test is to verify that weak linkage type is not ignored by backend, ; if section was specialized. -; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s +; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s @a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data" -; CHECK: Name = .data$a -; CHECK-NEXT: VirtualSize = 0 -; CHECK-NEXT: VirtualAddress = 0 -; CHECK-NEXT: SizeOfRawData = {{[0-9]+}} -; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}} -; CHECK-NEXT: PointerToRelocations = 0x0 -; CHECK-NEXT: PointerToLineNumbers = 0x0 -; CHECK-NEXT: NumberOfRelocations = 0 -; CHECK-NEXT: NumberOfLineNumbers = 0 -; CHECK-NEXT: Charateristics = 0x40401040 +; CHECK: Name: .data$a +; CHECK-NEXT: VirtualSize: 0 +; CHECK-NEXT: VirtualAddress: 0 +; CHECK-NEXT: RawDataSize: {{[0-9]+}} +; CHECK-NEXT: PointerToRawData: 0x{{[0-9A-F]+}} +; CHECK-NEXT: PointerToRelocations: 0x0 +; CHECK-NEXT: PointerToLineNumbers: 0x0 +; CHECK-NEXT: RelocationCount: 0 +; CHECK-NEXT: LineNumberCount: 0 +; CHECK-NEXT: Characteristics [ (0x40401040) +; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES ; CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA ; CHECK-NEXT: IMAGE_SCN_LNK_COMDAT -; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES ; CHECK-NEXT: IMAGE_SCN_MEM_READ -; CHECK-NEXT: SectionData = -; CHECK-NEXT: 00 00 00 00 00 00 00 00 - 00 00 00 00 +; CHECK-NEXT: ] +; CHECK-NEXT: SectionData ( +; CHECK-NEXT: 0000: 00000000 00000000 00000000 +; CHECK-NEXT: ) diff --git a/test/MC/COFF/weak.s b/test/MC/COFF/weak.s index 0f99313c9c03..b9df0f1df2fd 100644 --- a/test/MC/COFF/weak.s +++ b/test/MC/COFF/weak.s @@ -1,7 +1,8 @@ // This tests that default-null weak symbols (a GNU extension) are created // properly via the .weak directive. -// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 < %s | coff-dump.py | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s .def _main; .scl 2; @@ -17,7 +18,7 @@ _main: # @main testl %eax, %eax je LBB0_2 # BB#1: # %if.then - calll _test_weak + call _test_weak movl $1, %eax addl $4, %esp ret @@ -28,24 +29,47 @@ LBB0_2: # %return .weak _test_weak -// CHECK: Symbols = [ - -// CHECK: Name = _test_weak -// CHECK-NEXT: Value = 0 -// CHECK-NEXT: SectionNumber = 0 -// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_WEAK_EXTERNAL (105) -// CHECK-NEXT: NumberOfAuxSymbols = 1 -// CHECK-NEXT: AuxillaryData = -// CHECK-NEXT: 05 00 00 00 02 00 00 00 - 00 00 00 00 00 00 00 00 |................| -// CHECK-NEXT: 00 00 |..| - -// CHECK: Name = .weak._test_weak.default -// CHECK-NEXT: Value = 0 -// CHECK-NEXT: SectionNumber = 65535 -// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0) -// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0) -// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2) -// CHECK-NEXT: NumberOfAuxSymbols = 0 -// CHECK-NEXT: AuxillaryData = + .weak _test_weak_alias + _test_weak_alias=_main + +// CHECK: Symbols [ + +// CHECK: Symbol { +// CHECK: Name: _test_weak +// CHECK-NEXT: Value: 0 +// CHECK-NEXT: Section: (0) +// CHECK-NEXT: BaseType: Null +// CHECK-NEXT: ComplexType: Null +// CHECK-NEXT: StorageClass: WeakExternal +// CHECK-NEXT: AuxSymbolCount: 1 +// CHECK-NEXT: AuxWeakExternal { +// CHECK-NEXT: Linked: .weak._test_weak.default +// CHECK-NEXT: Search: Library +// CHECK-NEXT: Unused: (00 00 00 00 00 00 00 00 00 00) +// CHECK-NEXT: } +// CHECK-NEXT: } + +// CHECK: Symbol { +// CHECK: Name: .weak._test_weak.default +// CHECK-NEXT: Value: 0 +// CHECK-NEXT: Section: (-1) +// CHECK-NEXT: BaseType: Null +// CHECK-NEXT: ComplexType: Null +// CHECK-NEXT: StorageClass: External +// CHECK-NEXT: AuxSymbolCount: 0 +// CHECK-NEXT: } + +// CHECK: Symbol { +// CHECK: Name: _test_weak_alias +// CHECK-NEXT: Value: 0 +// CHECK-NEXT: Section: (0) +// CHECK-NEXT: BaseType: Null +// CHECK-NEXT: ComplexType: Null +// CHECK-NEXT: StorageClass: WeakExternal +// CHECK-NEXT: AuxSymbolCount: 1 +// CHECK-NEXT: AuxWeakExternal { +// CHECK-NEXT: Linked: _main +// CHECK-NEXT: Search: Library +// CHECK-NEXT: Unused: (00 00 00 00 00 00 00 00 00 00) +// CHECK-NEXT: } +// CHECK-NEXT: } diff --git a/test/MC/Disassembler/ARM/arm-tests.txt b/test/MC/Disassembler/ARM/arm-tests.txt index 0c9aaab38c7e..98daaa7649aa 100644 --- a/test/MC/Disassembler/ARM/arm-tests.txt +++ b/test/MC/Disassembler/ARM/arm-tests.txt @@ -51,24 +51,48 @@ # CHECKx: ldclvc p5, cr15, [r8], #-0 #0x00 0xf5 0x78 0x7c +# CHECK: ldc p13, c9, [r2, #0]! +0x00 0x9d 0xb2 0xed + +# CHECK: ldcl p1, c9, [r3, #0]! +0x00 0x91 0xf3 0xed + # CHECK: ldr r0, [r2], #15 0x0f 0x00 0x92 0xe4 # CHECK: ldr r5, [r7, -r10, lsl #2] 0x0a 0x51 0x17 0xe7 +# CHECK: ldr r4, [r5, #0]! +0x00 0x40 0xb5 0xe5 + +# CHECK: ldrb lr, [r10, #0]! +0x00 0xe0 0xfa 0xe5 + +# CHECK: ldrd r4, r5, [r0, #0]! +0xd0 0x40 0xe0 0xe1 + # CHECK: ldrh r0, [r2], #0 0xb0 0x00 0xd2 0xe0 # CHECK: ldrh r0, [r2] 0xb0 0x00 0xd2 0xe1 +# CHECK: ldrh lr, [sp, #0]! +0xb0 0xe0 0xfd 0xe1 + # CHECK: ldrht r0, [r2], #15 0xbf 0x00 0xf2 0xe0 +# CHECK: ldrsb r1, [lr, #0]! +0xd0 0x10 0xfe 0xe1 + # CHECK: ldrsbtvs lr, [r2], -r9 0xd9 0xe0 0x32 0x60 +# CHECK: ldrsh r9, [r1, #0] +0xf0 0x90 0xf1 0xe1 + # CHECK: lsls r0, r2, #31 0x82 0x0f 0xb0 0xe1 @@ -245,9 +269,27 @@ # CHECK: stc p2, c4, [r9], {157} 0x9d 0x42 0x89 0xec +# CHECK: stc p15, c0, [r3, #0]! +0x00 0x0f 0xa3 0xed + # CHECK: stc2 p2, c4, [r9], {157} 0x9d 0x42 0x89 0xfc +# CHECK: stcl p13, c12, [r9, #0]! +0x00 0xcd 0xe9 0xed + +# CHECK: str pc, [r11, #0]! +0x00 0xf0 0xab 0xe5 + +# CHECK: strb r9, [r10, #0]! +0x00 0x90 0xea 0xe5 + +# CHECK: strd r12, sp, [r6, #0]! +0xf0 0xc0 0xe6 0xe1 + +# CHECK: strh r7, [r9, #0]! +0xb0 0x70 0xe9 0xe1 + # CHECK: bne #-24 0xfa 0xff 0xff 0x1a diff --git a/test/MC/Disassembler/ARM/arm-thumb-trustzone.txt b/test/MC/Disassembler/ARM/arm-thumb-trustzone.txt new file mode 100644 index 000000000000..d6b7cf1a0bb5 --- /dev/null +++ b/test/MC/Disassembler/ARM/arm-thumb-trustzone.txt @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -disassemble -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ +# RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -disassemble -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ + + +#------------------------------------------------------------------------------ +# SMC +#------------------------------------------------------------------------------ + +0xff 0xf7 0x00 0x80 +0x0c 0xbf +0xf0 0xf7 0x00 0x80 + +# NOTZ-NOT: smc #15 +# NOTZ-NOT: smceq #0 +# TZ: smc #15 +# TZ: ite eq +# TZ: smceq #0 diff --git a/test/MC/Disassembler/ARM/arm-trustzone.txt b/test/MC/Disassembler/ARM/arm-trustzone.txt new file mode 100644 index 000000000000..92d5d6b29072 --- /dev/null +++ b/test/MC/Disassembler/ARM/arm-trustzone.txt @@ -0,0 +1,16 @@ +# RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -disassemble -mattr=-trustzone < %s | FileCheck %s -check-prefix=NOTZ +# RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -disassemble -mattr=trustzone < %s | FileCheck %s -check-prefix=TZ + + +#------------------------------------------------------------------------------ +# SMC +#------------------------------------------------------------------------------ + +0x7f 0x00 0x60 0xe1 +0x70 0x00 0x60 0x01 + +# NOTZ-NOT: smc #15 +# NOTZ-NOT: smceq #0 +# TZ: smc #15 +# TZ: smceq #0 + diff --git a/test/MC/Disassembler/ARM/basic-arm-instructions.txt b/test/MC/Disassembler/ARM/basic-arm-instructions.txt index 1100ce64a947..9f63e1e914ff 100644 --- a/test/MC/Disassembler/ARM/basic-arm-instructions.txt +++ b/test/MC/Disassembler/ARM/basic-arm-instructions.txt @@ -707,8 +707,10 @@ # CHECK: mov r3, #7 # CHECK: mov r4, #4080 # CHECK: mov r5, #16711680 +# CHECK: mov sp, #35 # CHECK: movw r6, #65535 # CHECK: movw r9, #65535 +# CHECK: movw sp, #1193 # CHECK: movs r3, #7 # CHECK: moveq r4, #4080 # CHECK: movseq r5, #16711680 @@ -716,8 +718,10 @@ 0x07 0x30 0xa0 0xe3 0xff 0x4e 0xa0 0xe3 0xff 0x58 0xa0 0xe3 +0x23 0xd0 0xa0 0xe3 0xff 0x6f 0x0f 0xe3 0xff 0x9f 0x0f 0xe3 +0xa9 0xd4 0x00 0xe3 0x07 0x30 0xb0 0xe3 0xff 0x4e 0xa0 0x03 0xff 0x58 0xb0 0x03 @@ -740,10 +744,12 @@ #------------------------------------------------------------------------------ # CHECK: movt r3, #7 # CHECK: movt r6, #65535 +# CHECK: movt sp, #3397 # CHECK: movteq r4, #4080 0x07 0x30 0x40 0xe3 0xff 0x6f 0x4f 0xe3 +0x45 0xdd 0x40 0xe3 0xf0 0x4f 0x40 0x03 @@ -1442,15 +1448,6 @@ 0xf2 0x4f 0x38 0xc6 #------------------------------------------------------------------------------ -# SMC -#------------------------------------------------------------------------------ -# CHECK: smc #15 -# CHECK: smceq #0 - -0x7f 0x00 0x60 0xe1 -0x70 0x00 0x60 0x01 - -#------------------------------------------------------------------------------ # SMLABB/SMLABT/SMLATB/SMLATT #------------------------------------------------------------------------------ # CHECK: smlabb r3, r1, r9, r0 @@ -1826,12 +1823,13 @@ # CHECK: strexh r4, r2, [r5 # CHECK: strex r2, r1, [r7 # CHECK: strexd r6, r2, r3, [r8 +# CHECK: strexd sp, r0, r1, [r0] 0x93 0x1f 0xc4 0xe1 0x92 0x4f 0xe5 0xe1 0x91 0x2f 0x87 0xe1 0x92 0x6f 0xa8 0xe1 - +0x90 0xdf 0xa0 0xe1 #------------------------------------------------------------------------------ # SUB diff --git a/test/MC/Disassembler/ARM/invalid-LDR_POST-arm.txt b/test/MC/Disassembler/ARM/invalid-LDR_POST-arm.txt index 0cff28ad2b2b..ecab5a5758e2 100644 --- a/test/MC/Disassembler/ARM/invalid-LDR_POST-arm.txt +++ b/test/MC/Disassembler/ARM/invalid-LDR_POST-arm.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=arm-apple-darwin9 2>&1 | grep "invalid instruction encoding" -# XFAIL: * # LDR_PRE/POST has encoding Inst{4} = 0. 0xde 0x69 0x18 0x46 diff --git a/test/MC/Disassembler/ARM/invalid-hint-arm.txt b/test/MC/Disassembler/ARM/invalid-hint-arm.txt new file mode 100644 index 000000000000..7da96d8f15ce --- /dev/null +++ b/test/MC/Disassembler/ARM/invalid-hint-arm.txt @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple=armv7-apple-darwin -mcpu=cortex-a8 -disassemble < %s 2>&1 | FileCheck %s + +#------------------------------------------------------------------------------ +# Undefined encoding space for hint instructions +#------------------------------------------------------------------------------ + +0x05 0xf0 0x20 0xe3 +# CHECK: invalid instruction encoding +0x41 0xf0 0x20 0xe3 +# CHECK: invalid instruction encoding +0xfe 0xf0 0x20 0xe3 +# CHECK: invalid instruction encoding + diff --git a/test/MC/Disassembler/ARM/invalid-hint-thumb.txt b/test/MC/Disassembler/ARM/invalid-hint-thumb.txt new file mode 100644 index 000000000000..1e4133668b84 --- /dev/null +++ b/test/MC/Disassembler/ARM/invalid-hint-thumb.txt @@ -0,0 +1,8 @@ +# RUN: llvm-mc -triple=thumbv7 -disassemble -show-encoding < %s 2>&1 | FileCheck %s + +#------------------------------------------------------------------------------ +# Undefined encoding space for hint instructions +#------------------------------------------------------------------------------ + +0xaf 0xf3 0x05 0x80 +# CHECK: invalid instruction encoding diff --git a/test/MC/Disassembler/Mips/mips-dsp.txt b/test/MC/Disassembler/Mips/mips-dsp.txt new file mode 100644 index 000000000000..d10e62cd23cd --- /dev/null +++ b/test/MC/Disassembler/Mips/mips-dsp.txt @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple=mipsel-unknown-linux -mattr=+dsp -disassemble < %s | FileCheck %s + +# CHECK: mfhi $21, $ac3 +0x10 0xa8 0x60 0x00 + +# CHECK: mflo $21, $ac3 +0x12 0xa8 0x60 0x00 + +# CHECK: mthi $21, $ac3 +0x11 0x18 0xa0 0x02 + +# CHECK: mtlo $21, $ac3 +0x13 0x18 0xa0 0x02 diff --git a/test/MC/Disassembler/Mips/mips32.txt b/test/MC/Disassembler/Mips/mips32.txt index 70224860bc71..ef8bf71bd3a6 100644 --- a/test/MC/Disassembler/Mips/mips32.txt +++ b/test/MC/Disassembler/Mips/mips32.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: abs.d $f12, $f14 0x46 0x20 0x73 0x05 diff --git a/test/MC/Disassembler/Mips/mips32_le.txt b/test/MC/Disassembler/Mips/mips32_le.txt index 48fa8e2c7fac..a0885a4bfe85 100644 --- a/test/MC/Disassembler/Mips/mips32_le.txt +++ b/test/MC/Disassembler/Mips/mips32_le.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: abs.d $f12, $f14 0x05 0x73 0x20 0x46 diff --git a/test/MC/Disassembler/Mips/mips32r2.txt b/test/MC/Disassembler/Mips/mips32r2.txt index 3b70db3bc29d..991eaa6cc97f 100644 --- a/test/MC/Disassembler/Mips/mips32r2.txt +++ b/test/MC/Disassembler/Mips/mips32r2.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux -mcpu=mips32r2 | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: abs.d $f12, $f14 0x46 0x20 0x73 0x05 diff --git a/test/MC/Disassembler/Mips/mips32r2_le.txt b/test/MC/Disassembler/Mips/mips32r2_le.txt index ecfde7a39c4f..10c293821c9d 100644 --- a/test/MC/Disassembler/Mips/mips32r2_le.txt +++ b/test/MC/Disassembler/Mips/mips32r2_le.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux -mcpu=mips32r2 | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: abs.d $f12, $f14 0x05 0x73 0x20 0x46 diff --git a/test/MC/Disassembler/Mips/mips64.txt b/test/MC/Disassembler/Mips/mips64.txt index 38b137766125..b88747370b67 100644 --- a/test/MC/Disassembler/Mips/mips64.txt +++ b/test/MC/Disassembler/Mips/mips64.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mips64-unknown-linux | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: daddiu $11, $26, 31949 0x67 0x4b 0x7c 0xcd diff --git a/test/MC/Disassembler/Mips/mips64_le.txt b/test/MC/Disassembler/Mips/mips64_le.txt index a7ef0e473bbe..ddc3c2b60be4 100644 --- a/test/MC/Disassembler/Mips/mips64_le.txt +++ b/test/MC/Disassembler/Mips/mips64_le.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mips64el-unknown-linux | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: daddiu $11, $26, 31949 0xcd 0x7c 0x4b 0x67 diff --git a/test/MC/Disassembler/Mips/mips64r2.txt b/test/MC/Disassembler/Mips/mips64r2.txt index 0b421fc551e2..cee6f3c21f72 100644 --- a/test/MC/Disassembler/Mips/mips64r2.txt +++ b/test/MC/Disassembler/Mips/mips64r2.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mips64-unknown-linux -mattr +mips64r2 | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: daddiu $11, $26, 31949 0x67 0x4b 0x7c 0xcd diff --git a/test/MC/Disassembler/Mips/mips64r2_le.txt b/test/MC/Disassembler/Mips/mips64r2_le.txt index c1d326f6d674..82e4d6ae1ce0 100644 --- a/test/MC/Disassembler/Mips/mips64r2_le.txt +++ b/test/MC/Disassembler/Mips/mips64r2_le.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=mips64el-unknown-linux -mattr +mips64r2 | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # CHECK: daddiu $11, $26, 31949 0xcd 0x7c 0x4b 0x67 diff --git a/test/MC/Disassembler/X86/intel-syntax.txt b/test/MC/Disassembler/X86/intel-syntax.txt index 27694cd01446..57e602f1500e 100644 --- a/test/MC/Disassembler/X86/intel-syntax.txt +++ b/test/MC/Disassembler/X86/intel-syntax.txt @@ -110,3 +110,12 @@ # CHECK: vpgatherdd XMM10, DWORD PTR [R15 + 2*XMM9], XMM8 0xc4 0x02 0x39 0x90 0x14 0x4f + +# CHECK: xsave64 OPAQUE PTR [RAX] +0x48 0x0f 0xae 0x20 + +# CHECK: xrstor64 OPAQUE PTR [RAX] +0x48 0x0f 0xae 0x28 + +# CHECK: xsaveopt64 OPAQUE PTR [RAX] +0x48 0x0f 0xae 0x30 diff --git a/test/MC/Disassembler/X86/x86-64.txt b/test/MC/Disassembler/X86/x86-64.txt index 5de1d5978433..c285af72b358 100644 --- a/test/MC/Disassembler/X86/x86-64.txt +++ b/test/MC/Disassembler/X86/x86-64.txt @@ -112,3 +112,18 @@ # CHECK: xabort $13 0xc6 0xf8 0x0d + +# CHECK: xsaveq (%rax) +0x48 0x0f 0xae 0x20 + +# CHECK: xrstorq (%rax) +0x48 0x0f 0xae 0x28 + +# CHECK: xsaveoptq (%rax) +0x48 0x0f 0xae 0x30 + +# CHECK: clac +0x0f 0x01 0xca + +# CHECK: stac +0x0f 0x01 0xcb diff --git a/test/MC/Disassembler/XCore/xcore.txt b/test/MC/Disassembler/XCore/xcore.txt index 99e54e9857c5..116433051a5a 100644 --- a/test/MC/Disassembler/XCore/xcore.txt +++ b/test/MC/Disassembler/XCore/xcore.txt @@ -1,5 +1,4 @@ # RUN: llvm-mc --disassemble %s -triple=xcore-xmos-elf | FileCheck %s -# CHECK: .section __TEXT,__text,regular,pure_instructions # 0r instructions @@ -649,12 +648,24 @@ # CHECK: ldap r11, 53112 0x33 0xf0 0x78 0xdb +# CHECK: ldap r11, -22 +0x16 0xdc + +# CHECK: ldap r11, -9999 +0x09 0xf0 0x0f 0xdf + # CHECK: bl 8 0x08 0xd0 # CHECK: bl 38631 0x25 0xf0 0xe7 0xd2 +# CHECK: bl -222 +0xde 0xd4 + +# CHECK: bl -55132 +0x35 0xf0 0x5c 0xd7 + # CHECK: bla cp[500] 0xf4 0xe1 diff --git a/test/MC/ELF/abs.s b/test/MC/ELF/abs.s index 48dbe3dffcc5..1836f4005973 100644 --- a/test/MC/ELF/abs.s +++ b/test/MC/ELF/abs.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that zed will be an ABS symbol @@ -6,11 +6,12 @@ .Lbar: zed = .Lfoo - .Lbar -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000001) # 'zed' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0xfff1) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) +// CHECK: Symbol { +// CHECK: Name: zed +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0xFFF1) +// CHECK-NEXT: } diff --git a/test/MC/ELF/alias-reloc.s b/test/MC/ELF/alias-reloc.s index f0db81592e78..c25c25932f09 100644 --- a/test/MC/ELF/alias-reloc.s +++ b/test/MC/ELF/alias-reloc.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s // Test that this produces a R_X86_64_PLT32 with bar. @@ -17,36 +17,30 @@ foo2: .set bar2,foo2 .quad bar2 -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000001) -// CHECK-NEXT: ('r_sym', 0x00000001) -// CHECK-NEXT: ('r_type', 0x00000004) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) -// CHECK-NEXT: ), - -// CHECK: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000005) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), - -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000005) # 'bar' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), - -// CHECK: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2' -// CHECK-NEXT: ('st_bind', 0x2) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) -// CHECK-NEXT: ('st_value', 0x0000000000000005) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Relocations [ +// CHECK-NEXT: Section ({{[0-9]+}}) zed { +// CHECK-NEXT: 0x1 R_X86_64_PLT32 bar 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x5 R_X86_64_64 bar2 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: ] + +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK-NEXT: Name: bar +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } + +// CHECK: Symbol { +// CHECK: Name: bar2 +// CHECK-NEXT: Value: 0x5 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: zed +// CHECK-NEXT: } diff --git a/test/MC/ELF/alias.s b/test/MC/ELF/alias.s index f38262801353..0575f41fc851 100644 --- a/test/MC/ELF/alias.s +++ b/test/MC/ELF/alias.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s foo: bar = foo @@ -16,70 +16,78 @@ foo4: bar4 = foo4 .long foo2 -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000005) # 'bar' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x0000001d) # 'bar4' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x2) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 3 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x0000000e) # 'foo3' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000018) # 'foo4' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x2) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 8 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 9 -// CHECK-NEXT: (('st_name', 0x00000013) # 'bar3' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK: # Symbol 10 -// CHECK-NEXT: (('st_name', 0x00000009) # 'bar2' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) + +// CHECK: Symbols [ +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar4 +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Function +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo3 +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo4 +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Function +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .text (0) +// CHECK: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .data (0) +// CHECK: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .bss (0) +// CHECK: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar3 +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar2 +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/align-bss.s b/test/MC/ELF/align-bss.s index a59232b812a4..776eef38467c 100644 --- a/test/MC/ELF/align-bss.s +++ b/test/MC/ELF/align-bss.s @@ -1,17 +1,22 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that the bss section is correctly aligned .local foo .comm foo,2048,16 -// CHECK: ('sh_name', 0x00000007) # '.bss' -// CHECK-NEXT: ('sh_type', 0x00000008) -// CHECK-NEXT: ('sh_flags', 0x0000000000000003) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000800) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000010) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) +// CHECK: Section { +// CHECK: Name: .bss +// CHECK-NEXT: Type: SHT_NOBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 2048 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 16 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } diff --git a/test/MC/ELF/align-nops.s b/test/MC/ELF/align-nops.s index 3bf96e956a93..5e3386823f26 100644 --- a/test/MC/ELF/align-nops.s +++ b/test/MC/ELF/align-nops.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s // Test that we get optimal nops in text .text @@ -15,26 +15,40 @@ f0: .long 0 .align 8 -// CHECK: (('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000010) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '00000000 0f1f4000 00000000 0f1f4000') +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 16 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 00000000 0F1F4000 00000000 0F1F4000 +// CHECK-NEXT: ) +// CHECK-NEXT: } -// CHECK: (('sh_name', 0x00000026) # '.data' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000003) -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000010) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '00000000 90909090 00000000 00000000') +// CHECK: Section { +// CHECK: Name: .data +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 16 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 00000000 90909090 00000000 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/ELF/align-size.s b/test/MC/ELF/align-size.s index f6282910db07..84a6e9981488 100644 --- a/test/MC/ELF/align-size.s +++ b/test/MC/ELF/align-size.s @@ -1,13 +1,18 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that the alignment does contribute to the size of the section. .zero 4 .align 8 -// CHECK: (('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000008) +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 8 +// CHECK: } diff --git a/test/MC/ELF/align-text.s b/test/MC/ELF/align-text.s index 2fd3cba50231..b00af4a34b08 100644 --- a/test/MC/ELF/align-text.s +++ b/test/MC/ELF/align-text.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that the .text directive doesn't cause alignment. @@ -6,14 +6,18 @@ .text .zero 1 -// CHECK: (('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000002) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 2 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } diff --git a/test/MC/ELF/align.s b/test/MC/ELF/align.s index 3142ffb55351..46be3df62f2d 100644 --- a/test/MC/ELF/align.s +++ b/test/MC/ELF/align.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that the alignment of rodata doesn't force a alignment of the // previous section (.bss) @@ -7,26 +7,33 @@ .section .rodata,"a",@progbits .align 8 -// CHECK: # Section 3 -// CHECK-NEXT: (('sh_name', 0x00000007) # '.bss' -// CHECK-NEXT: ('sh_type', 0x00000008) -// CHECK-NEXT: ('sh_flags', 0x0000000000000003) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000044) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000026) # '.rodata' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) +// CHECK: Section { +// CHECK: Name: .bss +// CHECK-NEXT: Type: SHT_NOBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x44 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 4 +// CHECK-NEXT: Name: .rodata +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } diff --git a/test/MC/ELF/basic-elf-32.s b/test/MC/ELF/basic-elf-32.s index 2c6a9841956c..3ddb53981a9f 100644 --- a/test/MC/ELF/basic-elf-32.s +++ b/test/MC/ELF/basic-elf-32.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -h -s -r -t | FileCheck %s .text .globl main @@ -30,49 +30,53 @@ main: # @main .section .note.GNU-stack,"",@progbits -// CHECK: ('e_indent[EI_CLASS]', 0x01) -// CHECK: ('e_indent[EI_DATA]', 0x01) -// CHECK: ('e_indent[EI_VERSION]', 0x01) -// CHECK: ('_sections', [ -// CHECK: # Section 0 -// CHECK: (('sh_name', 0x00000000) # '' +// CHECK: ElfHeader { +// CHECK: Class: 32-bit +// CHECK: DataEncoding: LittleEndian +// CHECK: FileVersion: 1 +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Index: 0 +// CHECK: Name: (0) -// CHECK: # '.text' +// CHECK: Name: .text -// CHECK: # '.rel.text' +// CHECK: Name: .rel.text -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('r_offset', 0x00000006) -// CHECK: ('r_type', 0x01) -// CHECK: ), -// CHECK: # Relocation 1 -// CHECK: (('r_offset', 0x0000000b) -// CHECK: ('r_type', 0x02) -// CHECK: ), -// CHECK: # Relocation 2 -// CHECK: (('r_offset', 0x00000012) -// CHECK: ('r_type', 0x01) -// CHECK: ), -// CHECK: # Relocation 3 -// CHECK: (('r_offset', 0x00000017) -// CHECK: ('r_type', 0x02) -// CHECK: ), -// CHECK: ]) +// CHECK: Relocations [ +// CHECK: Section (1) .text { +// CHECK: 0x6 R_386_32 .rodata.str1.1 +// CHECK: 0xB R_386_PC32 puts +// CHECK: 0x12 R_386_32 .rodata.str1.1 +// CHECK: 0x17 R_386_PC32 puts +// CHECK: } +// CHECK: ] -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Binding: Local +// CHECK: Type: Section +// CHECK: } -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) +// CHECK: Symbol { +// CHECK: Binding: Local +// CHECK: Type: Section +// CHECK: } -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) +// CHECK: Symbol { +// CHECK: Binding: Local +// CHECK: Type: Section +// CHECK: } -// CHECK: # 'main' -// CHECK: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x2) +// CHECK: Symbol { +// CHECK: Name: main +// CHECK: Binding: Global +// CHECK: Type: Function +// CHECK: } -// CHECK: # 'puts' -// CHECK: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) +// CHECK: Symbol { +// CHECK: Name: puts +// CHECK: Binding: Global +// CHECK: Type: None +// CHECK: } diff --git a/test/MC/ELF/basic-elf-64.s b/test/MC/ELF/basic-elf-64.s index 38ffaa724acc..f98623ad1e3c 100644 --- a/test/MC/ELF/basic-elf-64.s +++ b/test/MC/ELF/basic-elf-64.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -h -s -r -t | FileCheck %s .text .globl main @@ -30,53 +30,51 @@ main: # @main .section .note.GNU-stack,"",@progbits -// CHECK: ('e_indent[EI_CLASS]', 0x02) -// CHECK: ('e_indent[EI_DATA]', 0x01) -// CHECK: ('e_indent[EI_VERSION]', 0x01) -// CHECK: ('_sections', [ -// CHECK: # Section 0 -// CHECK: (('sh_name', 0x00000000) # '' +// CHECK: ElfHeader { +// CHECK: Class: 64-bit +// CHECK: DataEncoding: LittleEndian +// CHECK: FileVersion: 1 +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Index: 0 +// CHECK: Name: (0) -// CHECK: # '.text' +// CHECK: Name: .text -// CHECK: # '.rela.text' +// CHECK: Name: .rela.text -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('r_offset', 0x0000000000000005) -// CHECK: ('r_type', 0x0000000a) -// CHECK: ('r_addend', 0x0000000000000000) -// CHECK: ), -// CHECK: # Relocation 1 -// CHECK: (('r_offset', 0x000000000000000a) -// CHECK: ('r_type', 0x00000002) -// CHECK: ('r_addend', 0xfffffffffffffffc) -// CHECK: ), -// CHECK: # Relocation 2 -// CHECK: (('r_offset', 0x000000000000000f) -// CHECK: ('r_type', 0x0000000a) -// CHECK: ('r_addend', 0x0000000000000006) -// CHECK: ), -// CHECK: # Relocation 3 -// CHECK: (('r_offset', 0x0000000000000014) -// CHECK: ('r_type', 0x00000002) -// CHECK: ('r_addend', 0xfffffffffffffffc) -// CHECK: ), -// CHECK: ]) +// CHECK: Relocations [ +// CHECK: Section (1) .text { +// CHECK: 0x5 R_X86_64_32 .rodata.str1.1 0x0 +// CHECK: 0xA R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC +// CHECK: 0xF R_X86_64_32 .rodata.str1.1 0x6 +// CHECK: 0x14 R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC +// CHECK: } +// CHECK: ] -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) +// CHECK: Symbol { +// CHECK: Binding: Local +// CHECK: Type: Section -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) +// CHECK: Symbol { +// CHECK: Binding: Local +// CHECK: Type: Section +// CHECK: } -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) +// CHECK: Symbol { +// CHECK: Binding: Local +// CHECK: Type: Section +// CHECK: } -// CHECK: # 'main' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x2) +// CHECK: Symbol { +// CHECK: Name: main +// CHECK: Binding: Global +// CHECK: Type: Function +// CHECK: } -// CHECK: # 'puts' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) +// CHECK: Symbol { +// CHECK: Name: puts +// CHECK: Binding: Global +// CHECK: Type: None +// CHECK: } diff --git a/test/MC/ELF/call-abs.s b/test/MC/ELF/call-abs.s index 795a65993c0d..81265a1b075d 100644 --- a/test/MC/ELF/call-abs.s +++ b/test/MC/ELF/call-abs.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s .text .globl f @@ -15,10 +15,8 @@ f: # @f .section .note.GNU-stack,"",@progbits -// CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x00000004) -// CHECK-NEXT: ('r_sym', 0x000000) -// CHECK-NEXT: ('r_type', 0x02) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) +// CHECK: Relocations [ +// CHECK: Section ({{[^ ]+}}) {{[^ ]+}} { +// CHECK-NEXT: 0x4 R_386_PC32 - +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/cfi-adjust-cfa-offset.s b/test/MC/ELF/cfi-adjust-cfa-offset.s index f0d9c5fe23ee..137b8b6f8490 100644 --- a/test/MC/ELF/cfi-adjust-cfa-offset.s +++ b/test/MC/ELF/cfi-adjust-cfa-offset.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -11,36 +11,43 @@ f: ret .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000038) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 0a000000 00440e10 410e1444 0e080000 00000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x00000000000003a0) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 56 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 1C000000 1C000000 +// CHECK-NEXT: 0020: 00000000 0A000000 00440E10 410E1444 +// CHECK-NEXT: 0030: 0E080000 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x3A0 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-advance-loc2.s b/test/MC/ELF/cfi-advance-loc2.s index b3c08e0a0ec0..1cad32507cde 100644 --- a/test/MC/ELF/cfi-advance-loc2.s +++ b/test/MC/ELF/cfi-advance-loc2.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -10,36 +10,41 @@ f: nop .cfi_endproc -// CHECK: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000148) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01010000 00030001 0e080000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x148 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 01010000 00030001 0E080000 +// CHECK-NEXT: ) +// CHECK-NEXT: } - -// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000490) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x490 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-def-cfa-offset.s b/test/MC/ELF/cfi-def-cfa-offset.s index 0ed2be057edd..f1a54a810e0a 100644 --- a/test/MC/ELF/cfi-def-cfa-offset.s +++ b/test/MC/ELF/cfi-def-cfa-offset.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -10,37 +10,43 @@ f: ret .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 0a000000 00440e10 450e0800') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 0A000000 00440E10 450E0800 +// CHECK-NEXT: ) +// CHECK-NEXT: } -// CHECK: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000398) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x398 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-def-cfa-register.s b/test/MC/ELF/cfi-def-cfa-register.s index e87b4f67d4b6..b1e74ea098c2 100644 --- a/test/MC/ELF/cfi-def-cfa-register.s +++ b/test/MC/ELF/cfi-def-cfa-register.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,35 +7,41 @@ f: nop .cfi_endproc -// CHECK: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410d06 00000000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00410D06 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } -// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-def-cfa.s b/test/MC/ELF/cfi-def-cfa.s index e25bf5c8e3c4..abde0de4fad0 100644 --- a/test/MC/ELF/cfi-def-cfa.s +++ b/test/MC/ELF/cfi-def-cfa.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,36 +7,41 @@ f: nop .cfi_endproc -// CHECK: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410c07 08000000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00410C07 08000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } - -// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-escape.s b/test/MC/ELF/cfi-escape.s index 3a5af00901cf..a910faba64cc 100644 --- a/test/MC/ELF/cfi-escape.s +++ b/test/MC/ELF/cfi-escape.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,36 +7,42 @@ f: nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00411507 7f000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00411507 7F000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-offset.s b/test/MC/ELF/cfi-offset.s index 9acb76c24d5b..f7f95fbc5f2d 100644 --- a/test/MC/ELF/cfi-offset.s +++ b/test/MC/ELF/cfi-offset.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,36 +7,41 @@ f: nop .cfi_endproc -// CHECK: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00418602 00000000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00418602 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } - -// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-register.s b/test/MC/ELF/cfi-register.s index 37723097030f..f7a07e45d8b5 100644 --- a/test/MC/ELF/cfi-register.s +++ b/test/MC/ELF/cfi-register.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,36 +7,42 @@ f: nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410906 00000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00410906 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-rel-offset.s b/test/MC/ELF/cfi-rel-offset.s index 82bbd8d6cef5..35a73efb0f4a 100644 --- a/test/MC/ELF/cfi-rel-offset.s +++ b/test/MC/ELF/cfi-rel-offset.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -14,36 +14,43 @@ f: .cfi_rel_offset 6,0 .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000040) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 24000000 1c000000 00000000 05000000 00410e08 410d0641 11067f41 0e104186 02000000 00000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x00000000000003a0) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 64 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 24000000 1C000000 +// CHECK-NEXT: 0020: 00000000 05000000 00410E08 410D0641 +// CHECK-NEXT: 0030: 11067F41 0E104186 02000000 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x3A0 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-rel-offset2.s b/test/MC/ELF/cfi-rel-offset2.s index 7726adbe38f1..5817d1f4af7f 100644 --- a/test/MC/ELF/cfi-rel-offset2.s +++ b/test/MC/ELF/cfi-rel-offset2.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -6,36 +6,42 @@ f: .cfi_rel_offset 6,16 .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01000000 00411106 7f000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 01000000 00411106 7F000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-remember.s b/test/MC/ELF/cfi-remember.s index 1717662c1090..932a1828eb29 100644 --- a/test/MC/ELF/cfi-remember.s +++ b/test/MC/ELF/cfi-remember.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -9,37 +9,42 @@ f: nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 03000000 00410a41 0b000000') -// CHECK-NEXT: ), - -// CHECK: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 03000000 00410A41 0B000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-restore.s b/test/MC/ELF/cfi-restore.s index 0fc3129c713c..6c25d5b47195 100644 --- a/test/MC/ELF/cfi-restore.s +++ b/test/MC/ELF/cfi-restore.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,36 +7,42 @@ f: nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 0041c600 00000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 0041C600 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-same-value.s b/test/MC/ELF/cfi-same-value.s index 4c80a0a06660..075c6b9b8435 100644 --- a/test/MC/ELF/cfi-same-value.s +++ b/test/MC/ELF/cfi-same-value.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -7,36 +7,42 @@ f: nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410806 00000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00410806 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-sections.s b/test/MC/ELF/cfi-sections.s index b256bbf4cd44..15a79e5c055e 100644 --- a/test/MC/ELF/cfi-sections.s +++ b/test/MC/ELF/cfi-sections.s @@ -1,5 +1,5 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s -// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s .cfi_sections .debug_frame @@ -13,26 +13,43 @@ f2: nop .cfi_endproc -// ELF_64: (('sh_name', 0x00000011) # '.debug_frame' -// ELF_64-NEXT: ('sh_type', 0x00000001) -// ELF_64-NEXT: ('sh_flags', 0x0000000000000000) -// ELF_64-NEXT: ('sh_addr', 0x0000000000000000) -// ELF_64-NEXT: ('sh_offset', 0x0000000000000048) -// ELF_64-NEXT: ('sh_size', 0x0000000000000048) -// ELF_64-NEXT: ('sh_link', 0x00000000) -// ELF_64-NEXT: ('sh_info', 0x00000000) -// ELF_64-NEXT: ('sh_addralign', 0x0000000000000008) -// ELF_64-NEXT: ('sh_entsize', 0x0000000000000000) -// ELF_64-NEXT: ('_section_data', '14000000 ffffffff 01000178 100c0708 90010000 00000000 14000000 00000000 00000000 00000000 01000000 00000000 14000000 00000000 00000000 00000000 01000000 00000000') +// ELF_64: Section { +// ELF_64: Name: .debug_frame +// ELF_64-NEXT: Type: SHT_PROGBITS +// ELF_64-NEXT: Flags [ +// ELF_64-NEXT: ] +// ELF_64-NEXT: Address: 0x0 +// ELF_64-NEXT: Offset: 0x48 +// ELF_64-NEXT: Size: 72 +// ELF_64-NEXT: Link: 0 +// ELF_64-NEXT: Info: 0 +// ELF_64-NEXT: AddressAlignment: 8 +// ELF_64-NEXT: EntrySize: 0 +// ELF_64-NEXT: SectionData ( +// ELF_64-NEXT: 0000: 14000000 FFFFFFFF 01000178 100C0708 +// ELF_64-NEXT: 0010: 90010000 00000000 14000000 00000000 +// ELF_64-NEXT: 0020: 00000000 00000000 01000000 00000000 +// ELF_64-NEXT: 0030: 14000000 00000000 00000000 00000000 +// ELF_64-NEXT: 0040: 01000000 00000000 +// ELF_64-NEXT: ) +// ELF_64-NEXT: } -// ELF_32: (('sh_name', 0x00000010) # '.debug_frame' -// ELF_32-NEXT: ('sh_type', 0x00000001) -// ELF_32-NEXT: ('sh_flags', 0x00000000) -// ELF_32-NEXT: ('sh_addr', 0x00000000) -// ELF_32-NEXT: ('sh_offset', 0x00000038) -// ELF_32-NEXT: ('sh_size', 0x00000034) -// ELF_32-NEXT: ('sh_link', 0x00000000) -// ELF_32-NEXT: ('sh_info', 0x00000000) -// ELF_32-NEXT: ('sh_addralign', 0x00000004) -// ELF_32-NEXT: ('sh_entsize', 0x00000000) -// ELF_32-NEXT: ('_section_data', '10000000 ffffffff 0100017c 080c0404 88010000 0c000000 00000000 00000000 01000000 0c000000 00000000 01000000 01000000') +// ELF_32: Section { +// ELF_32: Name: .debug_frame +// ELF_32-NEXT: Type: SHT_PROGBITS +// ELF_32-NEXT: Flags [ +// ELF_32-NEXT: ] +// ELF_32-NEXT: Address: 0x0 +// ELF_32-NEXT: Offset: 0x38 +// ELF_32-NEXT: Size: 52 +// ELF_32-NEXT: Link: 0 +// ELF_32-NEXT: Info: 0 +// ELF_32-NEXT: AddressAlignment: 4 +// ELF_32-NEXT: EntrySize: 0 +// ELF_32-NEXT: SectionData ( +// ELF_32-NEXT: 0000: 10000000 FFFFFFFF 0100017C 080C0404 +// ELF_32-NEXT: 0010: 88010000 0C000000 00000000 00000000 +// ELF_32-NEXT: 0020: 01000000 0C000000 00000000 01000000 +// ELF_32-NEXT: 0030: 01000000 +// ELF_32-NEXT: ) +// ELF_32-NEXT: } diff --git a/test/MC/ELF/cfi-signal-frame.s b/test/MC/ELF/cfi-signal-frame.s index cf6d16073abe..023311962189 100644 --- a/test/MC/ELF/cfi-signal-frame.s +++ b/test/MC/ELF/cfi-signal-frame.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s f: .cfi_startproc @@ -9,15 +9,25 @@ g: .cfi_startproc .cfi_endproc -// CHECK: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000058) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5253 00017810 011b0c07 08900100 10000000 1c000000 00000000 00000000 00000000 14000000 00000000 017a5200 01781001 1b0c0708 90010000 10000000 1c000000 00000000 00000000 00000000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 88 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5253 00017810 +// CHECK-NEXT: 0010: 011B0C07 08900100 10000000 1C000000 +// CHECK-NEXT: 0020: 00000000 00000000 00000000 14000000 +// CHECK-NEXT: 0030: 00000000 017A5200 01781001 1B0C0708 +// CHECK-NEXT: 0040: 90010000 10000000 1C000000 00000000 +// CHECK-NEXT: 0050: 00000000 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/ELF/cfi-undefined.s b/test/MC/ELF/cfi-undefined.s index 28049faec285..c83b47c142b4 100644 --- a/test/MC/ELF/cfi-undefined.s +++ b/test/MC/ELF/cfi-undefined.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -6,36 +6,43 @@ f: .cfi_undefined %rbp nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410706 00000000') -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000390) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), + +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 02000000 00410706 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x390 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/cfi-zero-addr-delta.s b/test/MC/ELF/cfi-zero-addr-delta.s index 9e818e694846..4ac0e34f10c3 100644 --- a/test/MC/ELF/cfi-zero-addr-delta.s +++ b/test/MC/ELF/cfi-zero-addr-delta.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -14,35 +14,41 @@ f: nop .cfi_endproc -// CHECK: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000048) -// CHECK-NEXT: ('sh_size', 0x0000000000000038) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 04000000 00410e10 410a0e08 410b0000 00000000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x48 +// CHECK-NEXT: Size: 56 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001 +// CHECK-NEXT: 0010: 1B0C0708 90010000 1C000000 1C000000 +// CHECK-NEXT: 0020: 00000000 04000000 00410E10 410A0E08 +// CHECK-NEXT: 0030: 410B0000 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } -// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000398) -// CHECK-NEXT: ('sh_size', 0x0000000000000018) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x398 +// CHECK-NEXT: Size: 24 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] diff --git a/test/MC/ELF/cfi.s b/test/MC/ELF/cfi.s index 9320894226fa..98f4fa9c62e6 100644 --- a/test/MC/ELF/cfi.s +++ b/test/MC/ELF/cfi.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | 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 @@ -212,463 +212,220 @@ f36: nop .cfi_endproc -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000068) -// CHECK-NEXT: ('sh_size', 0x00000000000006c8) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '14000000 00000000 017a4c52 00017810 02031b0c 07089001 14000000 1c000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000003 1b0c0708 90010000 14000000 28000000 00000000 01000000 04000000 00000000 14000000 70000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000002 1b0c0708 90010000 10000000 28000000 00000000 01000000 02000000 18000000 00000000 017a5052 00017810 04020000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06030000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a040000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 040a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 060b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a0c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a080000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a100000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04120000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06130000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a140000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 041a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 061b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a1c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a180000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a800000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04820000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06830000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a840000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 048a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 068b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a8c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a880000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a900000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04920000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06930000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a940000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 049a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 069b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a9c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a980000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000') -// CHECK-NEXT: ), - -// CHECK: # Section 5 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000e30) -// CHECK-NEXT: ('sh_size', 0x00000000000006c0) -// CHECK-NEXT: ('sh_link', 0x00000007) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000020) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000029) -// CHECK-NEXT: ('r_sym', 0x00000028) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 2 -// CHECK-NEXT: (('r_offset', 0x0000000000000043) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 3 -// CHECK-NEXT: (('r_offset', 0x000000000000005c) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000001) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 4 -// CHECK-NEXT: (('r_offset', 0x0000000000000065) -// CHECK-NEXT: ('r_sym', 0x00000028) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 5 -// CHECK-NEXT: (('r_offset', 0x0000000000000074) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000002) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 6 -// CHECK-NEXT: (('r_offset', 0x000000000000007d) -// CHECK-NEXT: ('r_sym', 0x00000028) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 7 -// CHECK-NEXT: (('r_offset', 0x0000000000000097) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 8 -// CHECK-NEXT: (('r_offset', 0x00000000000000b0) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000003) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 9 -// CHECK-NEXT: (('r_offset', 0x00000000000000b9) -// CHECK-NEXT: ('r_sym', 0x00000028) -// CHECK-NEXT: ('r_type', 0x0000000c) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 10 -// CHECK-NEXT: (('r_offset', 0x00000000000000ce) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000c) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 11 -// CHECK-NEXT: (('r_offset', 0x00000000000000e0) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000004) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 12 -// CHECK-NEXT: (('r_offset', 0x00000000000000fe) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 13 -// CHECK-NEXT: (('r_offset', 0x0000000000000110) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000005) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 14 -// CHECK-NEXT: (('r_offset', 0x000000000000012e) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 15 -// CHECK-NEXT: (('r_offset', 0x0000000000000144) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000006) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 16 -// CHECK-NEXT: (('r_offset', 0x0000000000000162) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000c) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 17 -// CHECK-NEXT: (('r_offset', 0x0000000000000174) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000007) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 18 -// CHECK-NEXT: (('r_offset', 0x0000000000000192) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 19 -// CHECK-NEXT: (('r_offset', 0x00000000000001a4) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000008) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 20 -// CHECK-NEXT: (('r_offset', 0x00000000000001c2) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 21 -// CHECK-NEXT: (('r_offset', 0x00000000000001d8) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000009) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 22 -// CHECK-NEXT: (('r_offset', 0x00000000000001f6) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 23 -// CHECK-NEXT: (('r_offset', 0x000000000000020c) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000000a) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 24 -// CHECK-NEXT: (('r_offset', 0x000000000000022a) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 25 -// CHECK-NEXT: (('r_offset', 0x0000000000000240) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000000b) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 26 -// CHECK-NEXT: (('r_offset', 0x000000000000025e) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000d) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 27 -// CHECK-NEXT: (('r_offset', 0x0000000000000270) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000000c) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 28 -// CHECK-NEXT: (('r_offset', 0x000000000000028e) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 29 -// CHECK-NEXT: (('r_offset', 0x00000000000002a0) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000000d) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 30 -// CHECK-NEXT: (('r_offset', 0x00000000000002be) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 31 -// CHECK-NEXT: (('r_offset', 0x00000000000002d4) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000000e) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 32 -// CHECK-NEXT: (('r_offset', 0x00000000000002f2) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000d) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 33 -// CHECK-NEXT: (('r_offset', 0x0000000000000304) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000000f) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 34 -// CHECK-NEXT: (('r_offset', 0x0000000000000322) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 35 -// CHECK-NEXT: (('r_offset', 0x0000000000000334) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000010) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 36 -// CHECK-NEXT: (('r_offset', 0x0000000000000352) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 37 -// CHECK-NEXT: (('r_offset', 0x0000000000000368) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000011) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 38 -// CHECK-NEXT: (('r_offset', 0x0000000000000386) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 39 -// CHECK-NEXT: (('r_offset', 0x000000000000039c) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000012) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 40 -// CHECK-NEXT: (('r_offset', 0x00000000000003ba) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 41 -// CHECK-NEXT: (('r_offset', 0x00000000000003d0) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000013) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 42 -// CHECK-NEXT: (('r_offset', 0x00000000000003ee) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000c) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 43 -// CHECK-NEXT: (('r_offset', 0x0000000000000400) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000014) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 44 -// CHECK-NEXT: (('r_offset', 0x000000000000041e) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 45 -// CHECK-NEXT: (('r_offset', 0x0000000000000430) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000015) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 46 -// CHECK-NEXT: (('r_offset', 0x000000000000044e) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 47 -// CHECK-NEXT: (('r_offset', 0x0000000000000464) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000016) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 48 -// CHECK-NEXT: (('r_offset', 0x0000000000000482) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000c) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 49 -// CHECK-NEXT: (('r_offset', 0x0000000000000494) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000017) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 50 -// CHECK-NEXT: (('r_offset', 0x00000000000004b2) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 51 -// CHECK-NEXT: (('r_offset', 0x00000000000004c4) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000018) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 52 -// CHECK-NEXT: (('r_offset', 0x00000000000004e2) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 53 -// CHECK-NEXT: (('r_offset', 0x00000000000004f8) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000019) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 54 -// CHECK-NEXT: (('r_offset', 0x0000000000000516) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000001) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 55 -// CHECK-NEXT: (('r_offset', 0x000000000000052c) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000001a) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 56 -// CHECK-NEXT: (('r_offset', 0x000000000000054a) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 57 -// CHECK-NEXT: (('r_offset', 0x0000000000000560) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000001b) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 58 -// CHECK-NEXT: (('r_offset', 0x000000000000057e) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000d) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 59 -// CHECK-NEXT: (('r_offset', 0x0000000000000590) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000001c) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 60 -// CHECK-NEXT: (('r_offset', 0x00000000000005ae) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 61 -// CHECK-NEXT: (('r_offset', 0x00000000000005c0) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000001d) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 62 -// CHECK-NEXT: (('r_offset', 0x00000000000005de) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 63 -// CHECK-NEXT: (('r_offset', 0x00000000000005f4) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000001e) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 64 -// CHECK-NEXT: (('r_offset', 0x0000000000000612) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x0000000d) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 65 -// CHECK-NEXT: (('r_offset', 0x0000000000000624) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000001f) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 66 -// CHECK-NEXT: (('r_offset', 0x0000000000000642) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 67 -// CHECK-NEXT: (('r_offset', 0x0000000000000654) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000020) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 68 -// CHECK-NEXT: (('r_offset', 0x0000000000000672) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 69 -// CHECK-NEXT: (('r_offset', 0x0000000000000688) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000021) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 70 -// CHECK-NEXT: (('r_offset', 0x00000000000006a6) -// CHECK-NEXT: ('r_sym', 0x00000029) -// CHECK-NEXT: ('r_type', 0x00000018) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 71 -// CHECK-NEXT: (('r_offset', 0x00000000000006bc) -// CHECK-NEXT: ('r_sym', 0x00000024) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000022) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .eh_frame +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x68 +// CHECK-NEXT: Size: 1736 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0 +// CHECK-NEXT: 0x29 R_X86_64_32 bar 0x0 +// CHECK-NEXT: 0x43 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x5C R_X86_64_PC32 .text 0x1 +// CHECK-NEXT: 0x65 R_X86_64_32 bar 0x0 +// CHECK-NEXT: 0x74 R_X86_64_PC32 .text 0x2 +// CHECK-NEXT: 0x7D R_X86_64_32 bar 0x0 +// CHECK-NEXT: 0x97 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0xB0 R_X86_64_PC32 .text 0x3 +// CHECK-NEXT: 0xB9 R_X86_64_16 bar 0x0 +// CHECK-NEXT: 0xCE R_X86_64_16 foo 0x0 +// CHECK-NEXT: 0xE0 R_X86_64_PC32 .text 0x4 +// CHECK-NEXT: 0xFE R_X86_64_32 foo 0x0 +// CHECK-NEXT: 0x110 R_X86_64_PC32 .text 0x5 +// CHECK-NEXT: 0x12E R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x144 R_X86_64_PC32 .text 0x6 +// CHECK-NEXT: 0x162 R_X86_64_16 foo 0x0 +// CHECK-NEXT: 0x174 R_X86_64_PC32 .text 0x7 +// CHECK-NEXT: 0x192 R_X86_64_32 foo 0x0 +// CHECK-NEXT: 0x1A4 R_X86_64_PC32 .text 0x8 +// CHECK-NEXT: 0x1C2 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x1D8 R_X86_64_PC32 .text 0x9 +// CHECK-NEXT: 0x1F6 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x20C R_X86_64_PC32 .text 0xA +// CHECK-NEXT: 0x22A R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x240 R_X86_64_PC32 .text 0xB +// CHECK-NEXT: 0x25E R_X86_64_PC16 foo 0x0 +// CHECK-NEXT: 0x270 R_X86_64_PC32 .text 0xC +// CHECK-NEXT: 0x28E R_X86_64_PC32 foo 0x0 +// CHECK-NEXT: 0x2A0 R_X86_64_PC32 .text 0xD +// CHECK-NEXT: 0x2BE R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x2D4 R_X86_64_PC32 .text 0xE +// CHECK-NEXT: 0x2F2 R_X86_64_PC16 foo 0x0 +// CHECK-NEXT: 0x304 R_X86_64_PC32 .text 0xF +// CHECK-NEXT: 0x322 R_X86_64_PC32 foo 0x0 +// CHECK-NEXT: 0x334 R_X86_64_PC32 .text 0x10 +// CHECK-NEXT: 0x352 R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x368 R_X86_64_PC32 .text 0x11 +// CHECK-NEXT: 0x386 R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x39C R_X86_64_PC32 .text 0x12 +// CHECK-NEXT: 0x3BA R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x3D0 R_X86_64_PC32 .text 0x13 +// CHECK-NEXT: 0x3EE R_X86_64_16 foo 0x0 +// CHECK-NEXT: 0x400 R_X86_64_PC32 .text 0x14 +// CHECK-NEXT: 0x41E R_X86_64_32 foo 0x0 +// CHECK-NEXT: 0x430 R_X86_64_PC32 .text 0x15 +// CHECK-NEXT: 0x44E R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x464 R_X86_64_PC32 .text 0x16 +// CHECK-NEXT: 0x482 R_X86_64_16 foo 0x0 +// CHECK-NEXT: 0x494 R_X86_64_PC32 .text 0x17 +// CHECK-NEXT: 0x4B2 R_X86_64_32 foo 0x0 +// CHECK-NEXT: 0x4C4 R_X86_64_PC32 .text 0x18 +// CHECK-NEXT: 0x4E2 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x4F8 R_X86_64_PC32 .text 0x19 +// CHECK-NEXT: 0x516 R_X86_64_64 foo 0x0 +// CHECK-NEXT: 0x52C R_X86_64_PC32 .text 0x1A +// CHECK-NEXT: 0x54A R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x560 R_X86_64_PC32 .text 0x1B +// CHECK-NEXT: 0x57E R_X86_64_PC16 foo 0x0 +// CHECK-NEXT: 0x590 R_X86_64_PC32 .text 0x1C +// CHECK-NEXT: 0x5AE R_X86_64_PC32 foo 0x0 +// CHECK-NEXT: 0x5C0 R_X86_64_PC32 .text 0x1D +// CHECK-NEXT: 0x5DE R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x5F4 R_X86_64_PC32 .text 0x1E +// CHECK-NEXT: 0x612 R_X86_64_PC16 foo 0x0 +// CHECK-NEXT: 0x624 R_X86_64_PC32 .text 0x1F +// CHECK-NEXT: 0x642 R_X86_64_PC32 foo 0x0 +// CHECK-NEXT: 0x654 R_X86_64_PC32 .text 0x20 +// CHECK-NEXT: 0x672 R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x688 R_X86_64_PC32 .text 0x21 +// CHECK-NEXT: 0x6A6 R_X86_64_PC64 foo 0x0 +// CHECK-NEXT: 0x6BC R_X86_64_PC32 .text 0x22 +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 14000000 00000000 017A4C52 00017810 +// CHECK-NEXT: 0010: 02031B0C 07089001 14000000 1C000000 +// CHECK-NEXT: 0020: 00000000 01000000 04000000 00000000 +// CHECK-NEXT: 0030: 20000000 00000000 017A504C 52000178 +// CHECK-NEXT: 0040: 100B0000 00000000 00000003 1B0C0708 +// CHECK-NEXT: 0050: 90010000 14000000 28000000 00000000 +// CHECK-NEXT: 0060: 01000000 04000000 00000000 14000000 +// CHECK-NEXT: 0070: 70000000 00000000 01000000 04000000 +// CHECK-NEXT: 0080: 00000000 20000000 00000000 017A504C +// CHECK-NEXT: 0090: 52000178 100B0000 00000000 00000002 +// CHECK-NEXT: 00A0: 1B0C0708 90010000 10000000 28000000 +// CHECK-NEXT: 00B0: 00000000 01000000 02000000 18000000 +// CHECK-NEXT: 00C0: 00000000 017A5052 00017810 04020000 +// CHECK-NEXT: 00D0: 1B0C0708 90010000 10000000 20000000 +// CHECK-NEXT: 00E0: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 00F0: 00000000 017A5052 00017810 06030000 +// CHECK-NEXT: 0100: 00001B0C 07089001 10000000 20000000 +// CHECK-NEXT: 0110: 00000000 01000000 00000000 1C000000 +// CHECK-NEXT: 0120: 00000000 017A5052 00017810 0A040000 +// CHECK-NEXT: 0130: 00000000 00001B0C 07089001 10000000 +// CHECK-NEXT: 0140: 24000000 00000000 01000000 00000000 +// CHECK-NEXT: 0150: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0160: 040A0000 1B0C0708 90010000 10000000 +// CHECK-NEXT: 0170: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 0180: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0190: 060B0000 00001B0C 07089001 10000000 +// CHECK-NEXT: 01A0: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 01B0: 1C000000 00000000 017A5052 00017810 +// CHECK-NEXT: 01C0: 0A0C0000 00000000 00001B0C 07089001 +// CHECK-NEXT: 01D0: 10000000 24000000 00000000 01000000 +// CHECK-NEXT: 01E0: 00000000 1C000000 00000000 017A5052 +// CHECK-NEXT: 01F0: 00017810 0A080000 00000000 00001B0C +// CHECK-NEXT: 0200: 07089001 10000000 24000000 00000000 +// CHECK-NEXT: 0210: 01000000 00000000 1C000000 00000000 +// CHECK-NEXT: 0220: 017A5052 00017810 0A100000 00000000 +// CHECK-NEXT: 0230: 00001B0C 07089001 10000000 24000000 +// CHECK-NEXT: 0240: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 0250: 00000000 017A5052 00017810 04120000 +// CHECK-NEXT: 0260: 1B0C0708 90010000 10000000 20000000 +// CHECK-NEXT: 0270: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 0280: 00000000 017A5052 00017810 06130000 +// CHECK-NEXT: 0290: 00001B0C 07089001 10000000 20000000 +// CHECK-NEXT: 02A0: 00000000 01000000 00000000 1C000000 +// CHECK-NEXT: 02B0: 00000000 017A5052 00017810 0A140000 +// CHECK-NEXT: 02C0: 00000000 00001B0C 07089001 10000000 +// CHECK-NEXT: 02D0: 24000000 00000000 01000000 00000000 +// CHECK-NEXT: 02E0: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 02F0: 041A0000 1B0C0708 90010000 10000000 +// CHECK-NEXT: 0300: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 0310: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0320: 061B0000 00001B0C 07089001 10000000 +// CHECK-NEXT: 0330: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 0340: 1C000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0350: 0A1C0000 00000000 00001B0C 07089001 +// CHECK-NEXT: 0360: 10000000 24000000 00000000 01000000 +// CHECK-NEXT: 0370: 00000000 1C000000 00000000 017A5052 +// CHECK-NEXT: 0380: 00017810 0A180000 00000000 00001B0C +// CHECK-NEXT: 0390: 07089001 10000000 24000000 00000000 +// CHECK-NEXT: 03A0: 01000000 00000000 1C000000 00000000 +// CHECK-NEXT: 03B0: 017A5052 00017810 0A800000 00000000 +// CHECK-NEXT: 03C0: 00001B0C 07089001 10000000 24000000 +// CHECK-NEXT: 03D0: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 03E0: 00000000 017A5052 00017810 04820000 +// CHECK-NEXT: 03F0: 1B0C0708 90010000 10000000 20000000 +// CHECK-NEXT: 0400: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 0410: 00000000 017A5052 00017810 06830000 +// CHECK-NEXT: 0420: 00001B0C 07089001 10000000 20000000 +// CHECK-NEXT: 0430: 00000000 01000000 00000000 1C000000 +// CHECK-NEXT: 0440: 00000000 017A5052 00017810 0A840000 +// CHECK-NEXT: 0450: 00000000 00001B0C 07089001 10000000 +// CHECK-NEXT: 0460: 24000000 00000000 01000000 00000000 +// CHECK-NEXT: 0470: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0480: 048A0000 1B0C0708 90010000 10000000 +// CHECK-NEXT: 0490: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 04A0: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 04B0: 068B0000 00001B0C 07089001 10000000 +// CHECK-NEXT: 04C0: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 04D0: 1C000000 00000000 017A5052 00017810 +// CHECK-NEXT: 04E0: 0A8C0000 00000000 00001B0C 07089001 +// CHECK-NEXT: 04F0: 10000000 24000000 00000000 01000000 +// CHECK-NEXT: 0500: 00000000 1C000000 00000000 017A5052 +// CHECK-NEXT: 0510: 00017810 0A880000 00000000 00001B0C +// CHECK-NEXT: 0520: 07089001 10000000 24000000 00000000 +// CHECK-NEXT: 0530: 01000000 00000000 1C000000 00000000 +// CHECK-NEXT: 0540: 017A5052 00017810 0A900000 00000000 +// CHECK-NEXT: 0550: 00001B0C 07089001 10000000 24000000 +// CHECK-NEXT: 0560: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 0570: 00000000 017A5052 00017810 04920000 +// CHECK-NEXT: 0580: 1B0C0708 90010000 10000000 20000000 +// CHECK-NEXT: 0590: 00000000 01000000 00000000 18000000 +// CHECK-NEXT: 05A0: 00000000 017A5052 00017810 06930000 +// CHECK-NEXT: 05B0: 00001B0C 07089001 10000000 20000000 +// CHECK-NEXT: 05C0: 00000000 01000000 00000000 1C000000 +// CHECK-NEXT: 05D0: 00000000 017A5052 00017810 0A940000 +// CHECK-NEXT: 05E0: 00000000 00001B0C 07089001 10000000 +// CHECK-NEXT: 05F0: 24000000 00000000 01000000 00000000 +// CHECK-NEXT: 0600: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0610: 049A0000 1B0C0708 90010000 10000000 +// CHECK-NEXT: 0620: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 0630: 18000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0640: 069B0000 00001B0C 07089001 10000000 +// CHECK-NEXT: 0650: 20000000 00000000 01000000 00000000 +// CHECK-NEXT: 0660: 1C000000 00000000 017A5052 00017810 +// CHECK-NEXT: 0670: 0A9C0000 00000000 00001B0C 07089001 +// CHECK-NEXT: 0680: 10000000 24000000 00000000 01000000 +// CHECK-NEXT: 0690: 00000000 1C000000 00000000 017A5052 +// CHECK-NEXT: 06A0: 00017810 0A980000 00000000 00001B0C +// CHECK-NEXT: 06B0: 07089001 10000000 24000000 00000000 +// CHECK-NEXT: 06C0: 01000000 00000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } + +// CHECK: Section { +// CHECK: Index: 5 +// CHECK-NEXT: Name: .rela.eh_frame +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0xE30 +// CHECK-NEXT: Size: 1728 +// CHECK-NEXT: Link: 7 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK: } diff --git a/test/MC/ELF/comdat.s b/test/MC/ELF/comdat.s index d7acea6778d4..f9469dfae273 100644 --- a/test/MC/ELF/comdat.s +++ b/test/MC/ELF/comdat.s @@ -1,75 +1,81 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s // Test that we produce the group sections and that they are a the beginning // of the file. -// CHECK: # Section 1 -// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group' -// CHECK-NEXT: ('sh_type', 0x00000011) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x000000000000000c) -// CHECK-NEXT: ('sh_link', 0x0000000d) -// CHECK-NEXT: ('sh_info', 0x00000001) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000004) -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 2 -// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group' -// CHECK-NEXT: ('sh_type', 0x00000011) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x000000000000004c) -// CHECK-NEXT: ('sh_size', 0x0000000000000008) -// CHECK-NEXT: ('sh_link', 0x0000000d) -// CHECK-NEXT: ('sh_info', 0x00000002) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000004) -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 3 -// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group' -// CHECK-NEXT: ('sh_type', 0x00000011) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000054) -// CHECK-NEXT: ('sh_size', 0x0000000000000008) -// CHECK-NEXT: ('sh_link', 0x0000000d) -// CHECK-NEXT: ('sh_info', 0x0000000d) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000004) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 1 +// CHECK-NEXT: Name: .group +// CHECK-NEXT: Type: SHT_GROUP +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 12 +// CHECK-NEXT: Link: 13 +// CHECK-NEXT: Info: 1 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 4 +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 2 +// CHECK-NEXT: Name: .group +// CHECK-NEXT: Type: SHT_GROUP +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x4C +// CHECK-NEXT: Size: 8 +// CHECK-NEXT: Link: 13 +// CHECK-NEXT: Info: 2 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 4 +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 3 +// CHECK-NEXT: Name: .group +// CHECK-NEXT: Type: SHT_GROUP +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x54 +// CHECK-NEXT: Size: 8 +// CHECK-NEXT: Link: 13 +// CHECK-NEXT: Info: 13 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 4 +// CHECK-NEXT: } // Test that g1 and g2 are local, but g3 is an undefined global. -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000001) # 'g1' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0007) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000004) # 'g2' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0002) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: g1 (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .foo (0x7) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: g2 (4) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .group (0x2) +// CHECK-NEXT: } -// CHECK: # Symbol 13 -// CHECK-NEXT: (('st_name', 0x00000007) # 'g3' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: g3 (7) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } .section .foo,"axG",@progbits,g1,comdat diff --git a/test/MC/ELF/common.s b/test/MC/ELF/common.s index 046306e3d37d..4fc2154d850c 100644 --- a/test/MC/ELF/common.s +++ b/test/MC/ELF/common.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s .text @@ -8,13 +8,15 @@ .local common1 .comm common1,1,1 -// CHECK: ('st_name', 0x00000001) # 'common1' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000001) +// CHECK: Symbol { +// CHECK: Name: common1 (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 1 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: +// CHECK-NEXT: } // Same as common1, but with directives in a different order. @@ -22,38 +24,44 @@ .type common2,@object .comm common2,1,1 -// CHECK: ('st_name', 0x00000009) # 'common2' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', -// CHECK-NEXT: ('st_value', 0x0000000000000001) -// CHECK-NEXT: ('st_size', 0x0000000000000001) +// CHECK: Symbol { +// CHECK: Name: common2 (9) +// CHECK-NEXT: Value: 0x1 +// CHECK-NEXT: Size: 1 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: +// CHECK-NEXT: } + .local common6 .comm common6,8,16 -// CHECK: # Symbol 3 -// CHECK-NEXT: (('st_name', 0x00000011) # 'common6' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) -// CHECK-NEXT: ('st_value', 0x0000000000000010) -// CHECK-NEXT: ('st_size', 0x0000000000000008) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: common6 (17) +// CHECK-NEXT: Value: 0x10 +// CHECK-NEXT: Size: 8 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: } + // Test that without an explicit .local we produce a global. .type common3,@object .comm common3,4,4 -// CHECK: ('st_name', 0x00000019) # 'common3' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0xfff2) -// CHECK-NEXT: ('st_value', 0x0000000000000004) -// CHECK-NEXT: ('st_size', 0x0000000000000004) +// CHECK: Symbol { +// CHECK: Name: common3 (25) +// CHECK-NEXT: Value: 0x4 +// CHECK-NEXT: Size: 4 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0xFFF2) +// CHECK-NEXT: } // Test that without an explicit .local we produce a global, even if the first @@ -67,22 +75,25 @@ foo: .type common4,@object .comm common4,40,16 -// CHECK: ('st_name', 0x00000025) # 'common4' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0xfff2) -// CHECK-NEXT: ('st_value', 0x0000000000000010) -// CHECK-NEXT: ('st_size', 0x0000000000000028) +// CHECK: Symbol { +// CHECK: Name: common4 (37) +// CHECK-NEXT: Value: 0x10 +// CHECK-NEXT: Size: 40 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0xFFF2) +// CHECK-NEXT: } + .comm common5,4,4 -// CHECK: # Symbol 9 -// CHECK-NEXT: (('st_name', 0x0000002d) # 'common5' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0xfff2) -// CHECK-NEXT: ('st_value', 0x0000000000000004) -// CHECK-NEXT: ('st_size', 0x0000000000000004) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: common5 (45) +// CHECK-NEXT: Value: 0x4 +// CHECK-NEXT: Size: 4 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0xFFF2) +// CHECK-NEXT: } diff --git a/test/MC/ELF/common2.s b/test/MC/ELF/common2.s index b13577d4a004..526ebc2a95ff 100644 --- a/test/MC/ELF/common2.s +++ b/test/MC/ELF/common2.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that the common symbols are placed at the end of .bss. In this example // it causes .bss to have size 9 instead of 8. @@ -9,13 +9,16 @@ .zero 1 .align 8 -// CHECK: (('sh_name', 0x00000007) # '.bss' -// CHECK-NEXT: ('sh_type', -// CHECK-NEXT: ('sh_flags' -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000009) -// CHECK-NEXT: ('sh_link', -// CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', -// CHECK-NEXT: ('sh_entsize', +// CHECK: Section { +// CHECK: Name: .bss (7) +// CHECK-NEXT: Type: +// CHECK-NEXT: Flags [ +// CHECK: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 9 +// CHECK-NEXT: Link: +// CHECK-NEXT: Info: +// CHECK-NEXT: AddressAlignment: +// CHECK-NEXT: EntrySize: +// CHECK-NEXT: } diff --git a/test/MC/ELF/debug-line.s b/test/MC/ELF/debug-line.s index fed816afccef..75e050e9da1c 100644 --- a/test/MC/ELF/debug-line.s +++ b/test/MC/ELF/debug-line.s @@ -1,18 +1,26 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s // Test that .debug_line is populated. -// CHECK: (('sh_name', 0x00000011) # '.debug_line' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000044) -// CHECK-NEXT: ('sh_size', 0x0000000000000037) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '33000000 02001c00 00000101 fb0e0d00 01010101 00000001 00000100 666f6f2e 63000000 00000009 02000000 00000000 00150204 000101') +// CHECK: Section { +// CHECK: Name: .debug_line +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x44 +// CHECK-NEXT: Size: 55 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 33000000 02001C00 00000101 FB0E0D00 +// CHECK-NEXT: 0010: 01010101 00000001 00000100 666F6F2E +// CHECK-NEXT: 0020: 63000000 00000009 02000000 00000000 +// CHECK-NEXT: 0030: 00150204 000101 +// CHECK-NEXT: ) +// CHECK-NEXT: } .section .debug_line,"",@progbits .text diff --git a/test/MC/ELF/debug-loc.s b/test/MC/ELF/debug-loc.s index 3eb3797f443f..b24fa169deb2 100644 --- a/test/MC/ELF/debug-loc.s +++ b/test/MC/ELF/debug-loc.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that we don't regress on the size of the line info section. We used // to handle negative line diffs incorrectly which manifested as very @@ -7,18 +7,20 @@ // FIXME: This size is the same as gnu as, but we can probably do a bit better. // FIXME2: We need a debug_line dumper so that we can test the actual contents. -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x00000011) # '.debug_line' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000044) -// CHECK-NEXT: ('sh_size', 0x000000000000003d) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .debug_line +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x44 +// CHECK-NEXT: Size: 61 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } .section .debug_line,"",@progbits .text diff --git a/test/MC/ELF/diff.s b/test/MC/ELF/diff.s index 4214fc7c0368..543651066969 100644 --- a/test/MC/ELF/diff.s +++ b/test/MC/ELF/diff.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s .global zed foo: @@ -8,8 +8,4 @@ bar: zed: mov zed+(bar-foo), %eax -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000005) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', 0x0000000000000001) +// CHECK: 0x5 R_X86_64_32S zed 0x1 diff --git a/test/MC/ELF/empty-dwarf-lines.s b/test/MC/ELF/empty-dwarf-lines.s index 7baedbcfb826..241580bb3b83 100644 --- a/test/MC/ELF/empty-dwarf-lines.s +++ b/test/MC/ELF/empty-dwarf-lines.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that the dwarf debug_line section contains no line directives. @@ -7,15 +7,17 @@ c: .asciz "hi\n" -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.debug_line' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000044) -// CHECK-NEXT: ('sh_size', 0x0000000000000027) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .debug_line +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x44 +// CHECK-NEXT: Size: 39 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } diff --git a/test/MC/ELF/empty.s b/test/MC/ELF/empty.s index b38a621054b4..c421fe844882 100644 --- a/test/MC/ELF/empty.s +++ b/test/MC/ELF/empty.s @@ -1,70 +1,89 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that like gnu as we create text, data and bss by default. Also test // that shstrtab, symtab and strtab are listed in that order. -// CHECK: ('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) - -// CHECK: ('sh_name', 0x00000026) # '.data' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000003) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) - -// CHECK: ('sh_name', 0x00000007) # '.bss' -// CHECK-NEXT: ('sh_type', 0x00000008) -// CHECK-NEXT: ('sh_flags', 0x0000000000000003) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) - -// CHECK: ('sh_name', 0x0000000c) # '.shstrtab' -// CHECK-NEXT: ('sh_type', 0x00000003) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x000000000000002c) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) - -// CHECK: ('sh_name', 0x0000001e) # '.symtab' -// CHECK-NEXT: ('sh_type', 0x00000002) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000060) -// CHECK-NEXT: ('sh_link', 0x00000006) -// CHECK-NEXT: ('sh_info', 0x00000004) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) - -// CHECK: ('sh_name', 0x00000016) # '.strtab' -// CHECK-NEXT: ('sh_type', 0x00000003) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000001) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .data +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .bss +// CHECK-NEXT: Type: SHT_NOBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_WRITE +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .shstrtab +// CHECK-NEXT: Type: SHT_STRTAB +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 44 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .symtab +// CHECK-NEXT: Type: SHT_SYMTAB +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 96 +// CHECK-NEXT: Link: 6 +// CHECK-NEXT: Info: 4 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Name: .strtab +// CHECK-NEXT: Type: SHT_STRTAB +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 1 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } diff --git a/test/MC/ELF/entsize.ll b/test/MC/ELF/entsize.ll index dce6dbaa2a07..2bf9fa9fb594 100644 --- a/test/MC/ELF/entsize.ll +++ b/test/MC/ELF/entsize.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck -check-prefix=64 %s +; RUN: llc -filetype=obj -mtriple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck -check-prefix=64 %s ; Test that constant mergeable strings have sh_entsize set. @@ -20,25 +20,35 @@ declare void @foo(i64* nocapture) nounwind ;;;;; -; 64: (('sh_name', 0x0000004e) # '.rodata.str1.1' -; 64-NEXT: ('sh_type', 0x00000001) -; 64-NEXT: ('sh_flags', 0x0000000000000032) -; 64-NEXT: ('sh_addr', -; 64-NEXT: ('sh_offset', -; 64-NEXT: ('sh_size', 0x000000000000000d) -; 64-NEXT: ('sh_link', -; 64-NEXT: ('sh_info', -; 64-NEXT: ('sh_addralign', 0x0000000000000001) -; 64-NEXT: ('sh_entsize', 0x0000000000000001) - -; 64: (('sh_name', 0x00000041) # '.rodata.cst8' -; 64-NEXT: ('sh_type', 0x00000001) -; 64-NEXT: ('sh_flags', 0x0000000000000012) -; 64-NEXT: ('sh_addr', -; 64-NEXT: ('sh_offset', -; 64-NEXT: ('sh_size', 0x0000000000000010) -; 64-NEXT: ('sh_link', -; 64-NEXT: ('sh_info', -; 64-NEXT: ('sh_addralign', 0x0000000000000008) -; 64-NEXT: ('sh_entsize', 0x0000000000000008) - +; 64: Section { +; 64: Name: .rodata.str1.1 +; 64-NEXT: Type: SHT_PROGBITS +; 64-NEXT: Flags [ +; 64-NEXT: SHF_ALLOC +; 64-NEXT: SHF_MERGE +; 64-NEXT: SHF_STRINGS +; 64-NEXT: ] +; 64-NEXT: Address: +; 64-NEXT: Offset: +; 64-NEXT: Size: 13 +; 64-NEXT: Link: +; 64-NEXT: Info: +; 64-NEXT: AddressAlignment: 1 +; 64-NEXT: EntrySize: 1 +; 64-NEXT: } + +; 64: Section { +; 64: Name: .rodata.cst8 +; 64-NEXT: Type: SHT_PROGBITS +; 64-NEXT: Flags [ +; 64-NEXT: SHF_ALLOC +; 64-NEXT: SHF_MERGE +; 64-NEXT: ] +; 64-NEXT: Address: +; 64-NEXT: Offset: +; 64-NEXT: Size: 16 +; 64-NEXT: Link: +; 64-NEXT: Info: +; 64-NEXT: AddressAlignment: 8 +; 64-NEXT: EntrySize: 8 +; 64-NEXT: } diff --git a/test/MC/ELF/entsize.s b/test/MC/ELF/entsize.s index 4645686b6d4e..8e084e24b255 100644 --- a/test/MC/ELF/entsize.s +++ b/test/MC/ELF/entsize.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that mergeable constants have sh_entsize set. @@ -32,38 +32,53 @@ .quad 42 .quad 42 -// CHECK: # Section 4 -// CHECK-NEXT: ('sh_name', 0x00000048) # '.rodata.str1.1' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000032) -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x000000000000000d) -// CHECK-NEXT: ('sh_link', -// CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000001) - -// CHECK: # Section 5 -// CHECK-NEXT: ('sh_name', 0x00000039) # '.rodata.str2.1' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000032) -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000010) -// CHECK-NEXT: ('sh_link', -// CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000002) - -// CHECK: # Section 6 -// CHECK-NEXT: ('sh_name', 0x0000002c) # '.rodata.cst8 -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000012) -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x0000000000000010) -// CHECK-NEXT: ('sh_link', -// CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000008) +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .rodata.str1.1 +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_MERGE +// CHECK-NEXT: SHF_STRINGS +// CHECK-NEXT: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 13 +// CHECK-NEXT: Link: +// CHECK-NEXT: Info: +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 1 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Index: 5 +// CHECK-NEXT: Name: .rodata.str2.1 +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_MERGE +// CHECK-NEXT: SHF_STRINGS +// CHECK-NEXT: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 16 +// CHECK-NEXT: Link: +// CHECK-NEXT: Info: +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 2 +// CHECK-NEXT: } +// CHECK: Section { +// CHECK: Index: 6 +// CHECK-NEXT: Name: .rodata.cst8 +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_MERGE +// CHECK-NEXT: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 16 +// CHECK-NEXT: Link: +// CHECK-NEXT: Info: +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 8 +// CHECK-NEXT: } diff --git a/test/MC/ELF/file.s b/test/MC/ELF/file.s index 434fb6e2b3c6..7e287f7e3fa9 100644 --- a/test/MC/ELF/file.s +++ b/test/MC/ELF/file.s @@ -1,23 +1,25 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that the STT_FILE symbol precedes the other local symbols. .file "foo" foa: -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x4) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0xfff1) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000005) # 'foa' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) + +// CHECK: Symbol { +// CHECK: Name: foo (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: File +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0xFFF1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foa (5) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } diff --git a/test/MC/ELF/gen-dwarf.s b/test/MC/ELF/gen-dwarf.s index 85e02428fe3f..907bf424f470 100644 --- a/test/MC/ELF/gen-dwarf.s +++ b/test/MC/ELF/gen-dwarf.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s // Test that on ELF: @@ -14,97 +14,13 @@ foo: ret .size foo, .-foo -// Section 4 is .debug_line -// CHECK: # Section 4 -// CHECK-NEXT: # '.debug_line' - - - -// The two relocations, one to symbol 6 and one to 4 -// CHECK: # '.rel.debug_info' -// CHECK-NEXT: ('sh_type', -// CHECK-NEXT: ('sh_flags' -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', -// CHECK-NEXT: ('sh_link', -// CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', -// CHECK-NEXT: ('sh_entsize', -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x00000006) -// CHECK-NEXT: ('r_sym', 0x000006) -// CHECK-NEXT: ('r_type', 0x01) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000c) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x01) -// CHECK-NEXT: ), - - -// Section 8 is .debug_abbrev -// CHECK: # Section 8 -// CHECK-NEXT: (('sh_name', 0x00000001) # '.debug_abbrev' - -// Section 9 is .debug_aranges -// CHECK: # Section 9 -// CHECK-NEXT: (('sh_name', 0x0000001e) # '.debug_aranges' - -// Two relocations in .debug_aranges, one to text and one to debug_info. -// CHECK: # '.rel.debug_aranges' -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x00000006) -// CHECK-NEXT: ('r_sym', 0x000005) -// CHECK-NEXT: ('r_type', 0x01) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x00000010) -// CHECK-NEXT: ('r_sym', 0x000001) -// CHECK-NEXT: ('r_type', 0x01) -// CHECK-NEXT: ), - -// Symbol 1 is section 1 (.text) -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ), - -// Symbol 4 is section 4 (.debug_line) -// CHECK: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) -// CHECK-NEXT: ), - -// Symbol 5 is section 6 (.debug_info) -// CHECK: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0006) -// CHECK-NEXT: ), - -// Symbol 6 is section 8 (.debug_abbrev) -// CHECK: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0008) -// CHECK-NEXT: ), +// CHECK: Relocations [ +// CHECK: Section ({{[^ ]+}}) .debug_info { +// CHECK-NEXT: 0x6 R_386_32 .debug_abbrev 0x0 +// CHECK-NEXT: 0xC R_386_32 .debug_line 0x0 +// CHECK: } +// CHECK-NEXT: Section ({{[^ ]+}}) .debug_aranges { +// CHECK-NEXT: 0x6 R_386_32 .debug_info 0x0 +// CHECK-NEXT: 0x10 R_386_32 .text 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/global-offset.s b/test/MC/ELF/global-offset.s index 81ae5d785df9..c6886734ca40 100644 --- a/test/MC/ELF/global-offset.s +++ b/test/MC/ELF/global-offset.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s // We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the // start of the addl/leal. @@ -10,14 +10,20 @@ foo: addl _GLOBAL_OFFSET_TABLE_-foo,%ebx -// CHECK: ('sh_name', 0x00000005) # '.text' -// CHECK-NEXT: ('sh_type', -// CHECK-NEXT: ('sh_flags', -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', -// CHECK-NEXT: ('sh_link', -// CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', -// CHECK-NEXT: ('sh_entsize', -// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000 031d0200 0000') +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: +// CHECK-NEXT: Flags [ +// CHECK: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: +// CHECK-NEXT: Link: +// CHECK-NEXT: Info: +// CHECK-NEXT: AddressAlignment: +// CHECK-NEXT: EntrySize: +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 81C30200 00008D9B 02000000 031D0200 +// CHECK-NEXT: 0010: 0000 +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/ELF/got.s b/test/MC/ELF/got.s index a84987281818..60dea6d3b172 100644 --- a/test/MC/ELF/got.s +++ b/test/MC/ELF/got.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s // Test that this produces a R_X86_64_GOT32 and that we have an undefined // reference to _GLOBAL_OFFSET_TABLE_. @@ -6,20 +6,15 @@ movl foo@GOT, %eax movl foo@GOTPCREL(%rip), %eax -// CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x00000003) -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x00000009) -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), -// CHECK-NEXT: ]) +// CHECK: Relocations [ +// CHECK: Section ({{[^ ]+}}) .text { +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOT32 foo 0x{{[^ ]+}} +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOTPCREL foo 0x{{[^ ]+}} +// CHECK-NEXT: } +// CHECK-NEXT: ] -// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_' -// CHECK-NEXT: ('st_bind', 0x1) +// CHECK: Symbol { +// CHECK: Name: _GLOBAL_OFFSET_TABLE_ +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: Global diff --git a/test/MC/ELF/ident.s b/test/MC/ELF/ident.s index 56af19a30752..259220522e3c 100644 --- a/test/MC/ELF/ident.s +++ b/test/MC/ELF/ident.s @@ -1,16 +1,23 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s -// CHECK: (('sh_name', 0x00000007) # '.comment' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000030) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x000000000000000d) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000001) -// CHECK-NEXT: ('_section_data', '00666f6f 00626172 007a6564 00') +// CHECK: Section { +// CHECK: Name: .comment +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_MERGE +// CHECK-NEXT: SHF_STRINGS +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 13 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 1 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 00666F6F 00626172 007A6564 00 +// CHECK-NEXT: ) +// CHECK-NEXT: } .ident "foo" .ident "bar" diff --git a/test/MC/ELF/lcomm.s b/test/MC/ELF/lcomm.s index ae8d0baa3323..430b79b54b0a 100644 --- a/test/MC/ELF/lcomm.s +++ b/test/MC/ELF/lcomm.s @@ -1,21 +1,23 @@ -// RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s .lcomm A, 5 .lcomm B, 32 << 20 -// CHECK: (('st_name', 0x00000001) # 'A' -// CHECK: ('st_value', 0x00000000) -// CHECK: ('st_size', 0x00000005) -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x1) -// CHECK: ('st_other', 0x00) -// CHECK: ('st_shndx', 0x0003) -// CHECK: ), -// CHECK: (('st_name', 0x00000003) # 'B' -// CHECK: ('st_value', 0x00000005) -// CHECK: ('st_size', 0x02000000) -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x1) -// CHECK: ('st_other', 0x00) -// CHECK: ('st_shndx', 0x0003) -// CHECK: ), +// CHECK: Symbol { +// CHECK: Name: A (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 5 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss (0x3) +// CHECK-NEXT: } +// CHECK: Symbol { +// CHECK: Name: B (3) +// CHECK-NEXT: Value: 0x5 +// CHECK-NEXT: Size: 33554432 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss (0x3) +// CHECK-NEXT: } diff --git a/test/MC/ELF/leb128.s b/test/MC/ELF/leb128.s index f6daac8ace5c..84c5b54fa1a5 100644 --- a/test/MC/ELF/leb128.s +++ b/test/MC/ELF/leb128.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s .sleb128 .Lfoo - .Lbar .Lfoo: @@ -6,14 +6,29 @@ .fill 126, 1, 0x90 .Lbar: -// CHECK: (('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000081) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '817f7f90 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90') +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 129 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 817F7F90 90909090 90909090 90909090 +// CHECK-NEXT: 0010: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0020: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0030: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0040: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0050: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0060: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0070: 90909090 90909090 90909090 90909090 +// CHECK-NEXT: 0080: 90 +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/ELF/local-reloc.s b/test/MC/ELF/local-reloc.s index b32a9cc16973..4241ba5af410 100644 --- a/test/MC/ELF/local-reloc.s +++ b/test/MC/ELF/local-reloc.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -r -t | FileCheck %s // Test that relocations with local symbols are represented as relocations // with the section. They should be equivalent, but gas behaves like this. @@ -6,26 +6,8 @@ movl foo, %r14d foo: -// Section number 1 is .text -// CHECK: # Section 1 -// CHECK-next: (('sh_name', 0x00000001) # '.text' - -// Relocation refers to symbol number 2 -// CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), -// CHECK-NEXT: ]) - -// Symbol number 2 is section number 1 -// CHECK: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) +// CHECKT: Relocations [ +// CHECK: Section (1) .text { +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32S .text 0x{{[^ ]+}} +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/merge.s b/test/MC/ELF/merge.s index 11a80ad0350d..d34635a6710a 100644 --- a/test/MC/ELF/merge.s +++ b/test/MC/ELF/merge.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s // Test that PIC relocations with local symbols in a mergeable section are done // with a reference to the symbol. Not sure if this is a linker limitation, @@ -22,76 +22,13 @@ zed: .section bar,"ax",@progbits foo: -// Relocation 0 refers to symbol 1 -// CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x00000001) -// CHECK-NEXT: ('r_type', 0x00000002 -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), - -// Relocation 1 refers to symbol 6 -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), - -// Relocation 2 refers to symbol 1 -// CHECK-NEXT: # Relocation 2 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x00000001) -// CHECK-NEXT: ('r_type', 0x0000000a -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), - -// Relocation 3 refers to symbol 2 -// CHECK-NEXT: # Relocation 3 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000004 -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), - -// Relocation 4 refers to symbol 2 -// CHECK-NEXT: # Relocation 4 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x00000009 -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), - -// Relocation 5 refers to symbol 8 -// CHECK-NEXT: # Relocation 5 -// CHECK-NEXT: (('r_offset', 0x0000000000000023) -// CHECK-NEXT: ('r_sym', 0x00000008) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) - -// Section 5 is "sec1" -// CHECK: # Section 5 -// CHECK-NEXT: (('sh_name', 0x00000035) # '.sec1' - -// Symbol number 1 is .Lfoo -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000001) # '.Lfoo' - -// Symbol number 2 is foo -// CHECK: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000007) # 'foo' - -// Symbol number 6 is section 5 -// CHECK: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0005) - -// Symbol number 8 is zed -// CHECK: # Symbol 8 -// CHECK-NEXT: (('st_name', 0x0000000b) # 'zed' +// CHECK: Relocations [ +// CHECK-NEXT: Section (1) .text { +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PC32 .Lfoo 0x{{[^ ]+}} +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32 .sec1 0x{{[^ ]+}} +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32 .Lfoo 0x{{[^ ]+}} +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PLT32 foo 0x{{[^ ]+}} +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOTPCREL foo 0x{{[^ ]+}} +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32S zed 0x{{[^ ]+}} +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/n_bytes.s b/test/MC/ELF/n_bytes.s index de6632232c06..e658de09a2fa 100644 --- a/test/MC/ELF/n_bytes.s +++ b/test/MC/ELF/n_bytes.s @@ -1,20 +1,30 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s .2byte 42, 1, 2, 3 .4byte 42, 1, 2, 3 .8byte 42, 1, 2, 3 .int 42, 1, 2, 3 -// CHECK: # Section 1 -// CHECK-NEXT: (('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000048) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', '2a000100 02000300 2a000000 01000000 02000000 03000000 2a000000 00000000 01000000 00000000 02000000 00000000 03000000 00000000 2a000000 01000000 02000000 03000000') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 1 +// CHECK-NEXT: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 72 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 2A000100 02000300 2A000000 01000000 +// CHECK-NEXT: 0010: 02000000 03000000 2A000000 00000000 +// CHECK-NEXT: 0020: 01000000 00000000 02000000 00000000 +// CHECK-NEXT: 0030: 03000000 00000000 2A000000 01000000 +// CHECK-NEXT: 0040: 02000000 03000000 +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/ELF/noexec.s b/test/MC/ELF/noexec.s index d8b7b3233864..33cb8ae3452b 100644 --- a/test/MC/ELF/noexec.s +++ b/test/MC/ELF/noexec.s @@ -1,24 +1,26 @@ -// RUN: llvm-mc -mc-no-exec-stack -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -mc-no-exec-stack -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x0000000c) # '.note.GNU-stack' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 4 +// CHECK-NEXT: Name: .note.GNU-stack +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } -// CHECK: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: .note.GNU-stack (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .note.GNU-stack (0x4) +// CHECK-NEXT: } diff --git a/test/MC/ELF/norelocation.s b/test/MC/ELF/norelocation.s index c6394791ad80..137038292802 100644 --- a/test/MC/ELF/norelocation.s +++ b/test/MC/ELF/norelocation.s @@ -1,18 +1,26 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd -sr | FileCheck %s call bar bar: -// CHECK: ('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000005) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', 'e8000000 00') -// CHECK-NOT: .rela.text +// CHECK: Section { +// 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: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 5 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: E8000000 00 +// CHECK-NEXT: ) +// CHECK-NEXT: } // CHECK: shstrtab diff --git a/test/MC/ELF/org.s b/test/MC/ELF/org.s index 3afc364b2102..d878fa1aab45 100644 --- a/test/MC/ELF/org.s +++ b/test/MC/ELF/org.s @@ -1,13 +1,15 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s .zero 4 foo: .zero 4 .org foo+16 -// CHECK: (('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', -// CHECK-NEXT: ('sh_flags', -// CHECK-NEXT: ('sh_addr', -// CHECK-NEXT: ('sh_offset' -// CHECK-NEXT: ('sh_size', 0x0000000000000014) +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: +// CHECK-NEXT: Flags [ +// CHECK: ] +// CHECK-NEXT: Address: +// CHECK-NEXT: Offset: +// CHECK-NEXT: Size: 20 diff --git a/test/MC/ELF/pic-diff.s b/test/MC/ELF/pic-diff.s index 2c68f6cc718a..cffa0dd368eb 100644 --- a/test/MC/ELF/pic-diff.s +++ b/test/MC/ELF/pic-diff.s @@ -1,23 +1,20 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s -// CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x000000000000000c) -// CHECK-NEXT: ('r_sym', 0x00000005) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000008) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) +// CHECK: Relocations [ +// CHECK-NEXT: Section ({{[^ ]+}}) {{[^ ]+}} { +// CHECK-NEXT: 0xC R_X86_64_PC32 baz 0x8 +// CHECK-NEXT: } +// CHECK-NEXT: ] -// CHECK: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000005) # 'baz' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: baz (5) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } .zero 4 .data diff --git a/test/MC/ELF/plt.s b/test/MC/ELF/plt.s index 7d78e23443e7..604a4bf3a38e 100644 --- a/test/MC/ELF/plt.s +++ b/test/MC/ELF/plt.s @@ -1,14 +1,11 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s // Test that this produces a R_X86_64_PLT32. jmp foo@PLT -// CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x00000004) -// CHECK-NEXT: ('r_addend', -// CHECK-NEXT: ), -// CHECK-NEXT: ]) +// CHECK: Relocations [ +// CHECK-NEXT: Section ({{[^ ]+}}) {{[^ ]+}} { +// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PLT32 {{[^ ]+}} 0x{{[^ ]+}} +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/pr9292.s b/test/MC/ELF/pr9292.s index 05f377faa71c..a6e78dc992a8 100644 --- a/test/MC/ELF/pr9292.s +++ b/test/MC/ELF/pr9292.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that both foo and bar are undefined. @@ -7,20 +7,21 @@ mov %eax,bar -// CHECK: (('st_name', 0x00000005) # 'bar' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: bar (5) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } diff --git a/test/MC/ELF/relax-arith.s b/test/MC/ELF/relax-arith.s index 3236b41e532c..b8145564db08 100644 --- a/test/MC/ELF/relax-arith.s +++ b/test/MC/ELF/relax-arith.s @@ -1,11 +1,16 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s // Test that we correctly relax these instructions into versions that use // 16 or 32 bit immediate values. bar: -// CHECK: 'imul' -// CHECK: ('_section_data', '6669db00 0066691c 25000000 00000069 db000000 00691c25 00000000 00000000 4869db00 00000048 691c2500 00000000 000000') +// CHECK: Name: imul +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 6669DB00 0066691C 25000000 00000069 +// CHECK-NEXT: 0010: DB000000 00691C25 00000000 00000000 +// CHECK-NEXT: 0020: 4869DB00 00000048 691C2500 00000000 +// CHECK-NEXT: 0030: 000000 +// CHECK-NEXT: ) .section imul imul $foo, %bx, %bx imul $foo, bar, %bx @@ -14,8 +19,14 @@ bar: imul $foo, %rbx, %rbx imul $foo, bar, %rbx -// CHECK: and' -// CHECK:('_section_data', '6681e300 00668124 25000000 00000081 e3000000 00812425 00000000 00000000 4881e300 00000048 81242500 00000000 000000') + +// CHECK: Name: and +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 6681E300 00668124 25000000 00000081 +// CHECK-NEXT: 0010: E3000000 00812425 00000000 00000000 +// CHECK-NEXT: 0020: 4881E300 00000048 81242500 00000000 +// CHECK-NEXT: 0030: 000000 +// CHECK-NEXT: ) .section and and $foo, %bx andw $foo, bar @@ -24,8 +35,13 @@ bar: and $foo, %rbx andq $foo, bar -// CHECK: 'or' -// CHECK: ('_section_data', '6681cb00 0066810c 25000000 00000081 cb000000 00810c25 00000000 00000000 4881cb00 00000048 810c2500 00000000 000000') +// CHECK: Name: or +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 6681CB00 0066810C 25000000 00000081 +// CHECK-NEXT: 0010: CB000000 00810C25 00000000 00000000 +// CHECK-NEXT: 0020: 4881CB00 00000048 810C2500 00000000 +// CHECK-NEXT: 0030: 000000 +// CHECK-NEXT: ) .section or or $foo, %bx orw $foo, bar @@ -34,8 +50,13 @@ bar: or $foo, %rbx orq $foo, bar -// CHECK: 'xor' -// CHECK: ('_section_data', '6681f300 00668134 25000000 00000081 f3000000 00813425 00000000 00000000 4881f300 00000048 81342500 00000000 000000') +// CHECK: Name: xor +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 6681F300 00668134 25000000 00000081 +// CHECK-NEXT: 0010: F3000000 00813425 00000000 00000000 +// CHECK-NEXT: 0020: 4881F300 00000048 81342500 00000000 +// CHECK-NEXT: 0030: 000000 +// CHECK-NEXT: ) .section xor xor $foo, %bx xorw $foo, bar @@ -44,8 +65,13 @@ bar: xor $foo, %rbx xorq $foo, bar -// CHECK: 'add' -// CHECK: ('_section_data', '6681c300 00668104 25000000 00000081 c3000000 00810425 00000000 00000000 4881c300 00000048 81042500 00000000 000000') +// CHECK: Name: add +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 6681C300 00668104 25000000 00000081 +// CHECK-NEXT: 0010: C3000000 00810425 00000000 00000000 +// CHECK-NEXT: 0020: 4881C300 00000048 81042500 00000000 +// CHECK-NEXT: 0030: 000000 +// CHECK-NEXT: ) .section add add $foo, %bx addw $foo, bar @@ -54,8 +80,13 @@ bar: add $foo, %rbx addq $foo, bar -// CHECK: 'sub' -// CHECK: ('_section_data', '6681eb00 0066812c 25000000 00000081 eb000000 00812c25 00000000 00000000 4881eb00 00000048 812c2500 00000000 000000') +// CHECK: Name: sub +// CHECK: SectionData ( +// CHECK-NEXT: 000: 6681EB00 0066812C 25000000 00000081 +// CHECK-NEXT: 010: EB000000 00812C25 00000000 00000000 +// CHECK-NEXT: 020: 4881EB00 00000048 812C2500 00000000 +// CHECK-NEXT: 030: 000000 +// CHECK-NEXT: ) .section sub sub $foo, %bx subw $foo, bar @@ -64,8 +95,13 @@ bar: sub $foo, %rbx subq $foo, bar -// CHECK: 'cmp' -// CHECK: ('_section_data', '6681fb00 0066813c 25000000 00000081 fb000000 00813c25 00000000 00000000 4881fb00 00000048 813c2500 00000000 000000') +// CHECK: Name: cmp +// CHECK: SectionData ( +// CHECK-NEXT: 0000: 6681FB00 0066813C 25000000 00000081 +// CHECK-NEXT: 0010: FB000000 00813C25 00000000 00000000 +// CHECK-NEXT: 0020: 4881FB00 00000048 813C2500 00000000 +// CHECK-NEXT: 0030: 000000 +// CHECK-NEXT: ) .section cmp cmp $foo, %bx cmpw $foo, bar diff --git a/test/MC/ELF/relax.s b/test/MC/ELF/relax.s index 0b5d24f0f7ff..49ee8e2eefe0 100644 --- a/test/MC/ELF/relax.s +++ b/test/MC/ELF/relax.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd -t | FileCheck %s // Test that we do not relax these. @@ -11,17 +11,23 @@ foo: jmp foo jmp zed -// CHECK: ('sh_name', 0x00000001) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000006) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ('_section_data', 'ebfeebfc ebfa') - -// CHECK: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000005) # 'foo' +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 6 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: EBFEEBFC EBFA +// CHECK-NEXT: ) +// CHECK-NEXT: } +// CHECK: Symbol { +// CHECK: Name: foo (5) diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s index 85da2eb8c949..24d0172e724e 100644 --- a/test/MC/ELF/relocation-386.s +++ b/test/MC/ELF/relocation-386.s @@ -1,205 +1,86 @@ -// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s // Test that we produce the correct relocation types and that the relocations // correctly point to the section or the symbol. -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x00000002) -// CHECK-NEXT: ('r_sym', 0x000001) -// CHECK-NEXT: ('r_type', 0x09) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x04) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 2 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x0a) -// CHECK-NEXT: ), - +// CHECK: Relocations [ +// CHECK-NEXT: Section (1) .text { +// CHECK-NEXT: 0x2 R_386_GOTOFF .Lfoo 0x0 +// CHECK-NEXT: 0x{{[^ ]+}} R_386_PLT32 bar2 0x0 +// CHECK-NEXT: 0x{{[^ ]+}} R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0 // Relocation 3 (bar3@GOTOFF) is done with symbol 7 (bss) -// CHECK-NEXT: # Relocation 3 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x000007 -// CHECK-NEXT: ('r_type', -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x{{[^ ]+}} R_386_GOTOFF .bss 0x0 // Relocation 4 (bar2@GOT) is of type R_386_GOT32 -// CHECK-NEXT: # Relocation 4 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x03 -// CHECK-NEXT: ), +// CHECK-NEXT: 0x{{[^ ]+}} R_386_GOT32 bar2j 0x0 // Relocation 5 (foo@TLSGD) is of type R_386_TLS_GD -// CHECK-NEXT: # Relocation 5 -// CHECK-NEXT: (('r_offset', 0x00000020) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x12) -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x20 R_386_TLS_GD foo 0x0 // Relocation 6 ($foo@TPOFF) is of type R_386_TLS_LE_32 -// CHECK-NEXT: # Relocation 6 -// CHECK-NEXT: (('r_offset', 0x00000025) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x22) -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x25 R_386_TLS_LE_32 foo 0x0 // Relocation 7 (foo@INDNTPOFF) is of type R_386_TLS_IE -// CHECK-NEXT: # Relocation 7 -// CHECK-NEXT: (('r_offset', 0x0000002b) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x0f) -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x2B R_386_TLS_IE foo 0x0 // Relocation 8 (foo@NTPOFF) is of type R_386_TLS_LE -// CHECK-NEXT: # Relocation 8 -// CHECK-NEXT: (('r_offset', 0x00000031) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x11) -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x31 R_386_TLS_LE foo 0x0 // Relocation 9 (foo@GOTNTPOFF) is of type R_386_TLS_GOTIE -// CHECK-NEXT: # Relocation 9 -// CHECK-NEXT: (('r_offset', 0x00000037) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x10) -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x37 R_386_TLS_GOTIE foo 0x0 // Relocation 10 (foo@TLSLDM) is of type R_386_TLS_LDM -// CHECK-NEXT: # Relocation 10 -// CHECK-NEXT: (('r_offset', 0x0000003d) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x13) -// CHECK-NEXT: ), - +// CHECK-NEXT: 0x3D R_386_TLS_LDM foo 0x0 // Relocation 11 (foo@DTPOFF) is of type R_386_TLS_LDO_32 -// CHECK-NEXT: # Relocation 11 -// CHECK-NEXT: (('r_offset', 0x00000043) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x20) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x43 R_386_TLS_LDO_32 foo 0x0 // Relocation 12 (calll 4096) is of type R_386_PC32 -// CHECK-NEXT: # Relocation 12 -// CHECK-NEXT: (('r_offset', 0x00000048) -// CHECK-NEXT: ('r_sym', 0x000000) -// CHECK-NEXT: ('r_type', 0x02) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x48 R_386_PC32 - 0x0 // Relocation 13 (zed@GOT) is of type R_386_GOT32 and uses the symbol -// CHECK-NEXT: # Relocation 13 -// CHECK-NEXT: (('r_offset', 0x0000004e) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x03) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x4E R_386_GOT32 zed 0x0 // Relocation 14 (zed@GOTOFF) is of type R_386_GOTOFF and uses the symbol -// CHECK-NEXT: # Relocation 14 -// CHECK-NEXT: (('r_offset', 0x00000054) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x09) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x54 R_386_GOTOFF zed 0x0 // Relocation 15 (zed@INDNTPOFF) is of type R_386_TLS_IE and uses the symbol -// CHECK-NEXT: # Relocation 15 -// CHECK-NEXT: (('r_offset', 0x0000005a) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x0f) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x5A R_386_TLS_IE zed 0x0 // Relocation 16 (zed@NTPOFF) is of type R_386_TLS_LE and uses the symbol -// CHECK-NEXT: # Relocation 16 -// CHECK-NEXT: (('r_offset', 0x00000060) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x11) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x60 R_386_TLS_LE zed 0x0 // Relocation 17 (zed@GOTNTPOFF) is of type R_386_TLS_GOTIE and uses the symbol -// CHECK-NEXT: # Relocation 17 -// CHECK-NEXT: (('r_offset', 0x00000066) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x10) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x66 R_386_TLS_GOTIE zed 0x0 // Relocation 18 (zed@PLT) is of type R_386_PLT32 and uses the symbol -// CHECK-NEXT: # Relocation 18 -// CHECK-NEXT: (('r_offset', 0x0000006b) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x04) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x6B R_386_PLT32 zed 0x0 // Relocation 19 (zed@TLSGD) is of type R_386_TLS_GD and uses the symbol -// CHECK-NEXT: # Relocation 19 -// CHECK-NEXT: (('r_offset', 0x00000071) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x12) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x71 R_386_TLS_GD zed 0x0 // Relocation 20 (zed@TLSLDM) is of type R_386_TLS_LDM and uses the symbol -// CHECK-NEXT: # Relocation 20 -// CHECK-NEXT: (('r_offset', 0x00000077) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x13) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x77 R_386_TLS_LDM zed 0x0 // Relocation 21 (zed@TPOFF) is of type R_386_TLS_LE_32 and uses the symbol -// CHECK-NEXT:# Relocation 21 -// CHECK-NEXT: (('r_offset', 0x0000007d) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x22) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x7D R_386_TLS_LE_32 zed 0x0 // Relocation 22 (zed@DTPOFF) is of type R_386_TLS_LDO_32 and uses the symbol -// CHECK-NEXT: Relocation 22 -// CHECK-NEXT: (('r_offset', 0x00000083) -// CHECK-NEXT: ('r_sym', 0x000004) -// CHECK-NEXT: ('r_type', 0x20) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x83 R_386_TLS_LDO_32 zed 0x0 // Relocation 23 ($bar) is of type R_386_32 and uses the section -// CHECK-NEXT: Relocation 23 -// CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x01) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x{{[^ ]+}} R_386_32 .text 0x0 // Relocation 24 (foo@GOTTPOFF(%edx)) is of type R_386_TLS_IE_32 and uses the // symbol -// CHECK-NEXT: Relocation 24 -// CHECK-NEXT: (('r_offset', 0x0000008e) -// CHECK-NEXT: ('r_sym', 0x00000d) -// CHECK-NEXT: ('r_type', 0x21) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x8E R_386_TLS_IE_32 foo 0x0 // Relocation 25 (_GLOBAL_OFFSET_TABLE_-bar2) is of type R_386_GOTPC. -// CHECK-NEXT: Relocation 25 -// CHECK-NEXT: (('r_offset', 0x00000094) -// CHECK-NEXT: ('r_sym', 0x00000b) -// CHECK-NEXT: ('r_type', 0x0a) -// CHECK-NEXT: ), +// CHECK-NEXT: 0x94 R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0 // Relocation 26 (und_symbol-bar2) is of type R_386_PC32 -// CHECK-NEXT: Relocation 26 -// CHECK-NEXT: (('r_offset', 0x0000009a) -// CHECK-NEXT: ('r_sym', 0x00000e) -// CHECK-NEXT: ('r_type', 0x02) -// CHECK-NEXT: ), - -// Section 4 is bss -// CHECK: # Section 4 -// CHECK-NEXT: (('sh_name', 0x0000000b) # '.bss' - -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000005) # '.Lfoo' +// CHECK-NEXT: 0x9A R_386_PC32 und_symbol 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: ] // Symbol 4 is zed -// CHECK: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000035) # 'zed' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0005) - +// CHECK: Symbol { +// CHECK: Name: zed (53) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: zedsec (0x5) +// CHECK-NEXT: } // Symbol 7 is section 4 -// CHECK: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) - +// CHECK: Symbol { +// CHECK: Name: .bss (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: } .text bar: diff --git a/test/MC/ELF/relocation-pc.s b/test/MC/ELF/relocation-pc.s index b6279c3e55dd..551f5ff378ef 100644 --- a/test/MC/ELF/relocation-pc.s +++ b/test/MC/ELF/relocation-pc.s @@ -1,33 +1,32 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr | FileCheck %s // Test that we produce the correct relocation. loope 0 # R_X86_64_PC8 jmp -256 # R_X86_64_PC32 -// CHECK: # Section 2 -// CHECK-NEXT: (('sh_name', 0x00000001) # '.rela.text' -// CHECK-NEXT: ('sh_type', 0x00000004) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x00000000000002e8) -// CHECK-NEXT: ('sh_size', 0x0000000000000030) -// CHECK-NEXT: ('sh_link', 0x00000006) -// CHECK-NEXT: ('sh_info', 0x00000001) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000008) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000018) -// CHECK-NEXT: ('_relocations', [ -// CHECK-NEXT: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000001) -// CHECK-NEXT: ('r_sym', 0x00000000) -// CHECK-NEXT: ('r_type', 0x0000000f) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000003) -// CHECK-NEXT: ('r_sym', 0x00000000) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Index: 1 +// CHECK-NEXT: Name: .text +// CHECK: Relocations [ +// CHECK-NEXT: 0x1 R_X86_64_PC8 - 0x0 +// CHECK-NEXT: 0x3 R_X86_64_PC32 - 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: } + +// CHECK: Section { +// CHECK: Index: 2 +// CHECK-NEXT: Name: .rela.text +// CHECK-NEXT: Type: SHT_RELA +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x2E8 +// CHECK-NEXT: Size: 48 +// CHECK-NEXT: Link: 6 +// CHECK-NEXT: Info: 1 +// CHECK-NEXT: AddressAlignment: 8 +// CHECK-NEXT: EntrySize: 24 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: ] +// CHECK-NEXT: } diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s index 5db213bc0497..19bcc18d8f88 100644 --- a/test/MC/ELF/relocation.s +++ b/test/MC/ELF/relocation.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -t | FileCheck %s // Test that we produce the correct relocation. @@ -20,102 +20,33 @@ bar: addq $bar,%rax # R_X86_64_32S -// CHECK: # Section 1 -// CHECK: (('sh_name', 0x00000006) # '.text' - -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000001) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', - -// CHECK: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000008) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', - -// CHECK: # Relocation 2 -// CHECK-NEXT: (('r_offset', 0x0000000000000013) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', - -// CHECK: # Relocation 3 -// CHECK-NEXT: (('r_offset', 0x000000000000001a) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', - -// CHECK: # Relocation 4 -// CHECK-NEXT: (('r_offset', 0x0000000000000022) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', - -// CHECK: # Relocation 5 -// CHECK-NEXT: (('r_offset', 0x0000000000000026) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', - -// CHECK: # Relocation 6 -// CHECK-NEXT: (('r_offset', 0x000000000000002d) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000016) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) - -// CHECK: # Relocation 7 -// CHECK-NEXT: (('r_offset', 0x0000000000000034) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000013) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) - -// CHECK: # Relocation 8 -// CHECK-NEXT: (('r_offset', 0x000000000000003b) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000017) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) - -// CHECK: # Relocation 9 -// CHECK-NEXT: (('r_offset', 0x0000000000000042) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000014) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) - -// CHECK: # Relocation 10 -// CHECK-NEXT: (('r_offset', 0x0000000000000049) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000015) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) - -// CHECK: # Relocation 11 -// CHECK-NEXT: (('r_offset', 0x000000000000004e) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) - -// CHECK: # Relocation 12 -// CHECK-NEXT: (('r_offset', 0x0000000000000055) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) - -// CHECK: # Relocation 13 -// CHECK-NEXT: (('r_offset', 0x000000000000005c) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0x000000000000005c) - -// CHECK: # Relocation 14 -// CHECK-NEXT: (('r_offset', 0x0000000000000063) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) - -// CHECK: # Symbol 2 -// CHECK: (('st_name', 0x00000000) # '' -// CHECK: ('st_bind', 0x0) -// CHECK: ('st_type', 0x3) -// CHECK: ('st_other', 0x00) -// CHECK: ('st_shndx', 0x0001) +// CHECK: Section { +// CHECK: Name: .text +// CHECK: Relocations [ +// CHECK-NEXT: 0x1 R_X86_64_32 .text +// CHECK-NEXT: 0x8 R_X86_64_32S .text +// CHECK-NEXT: 0x13 R_X86_64_32S .text +// CHECK-NEXT: 0x1A R_X86_64_32S .text +// CHECK-NEXT: 0x22 R_X86_64_32S .text +// CHECK-NEXT: 0x26 R_X86_64_32 .text +// CHECK-NEXT: 0x2D R_X86_64_GOTTPOFF foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x34 R_X86_64_TLSGD foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x3B R_X86_64_TPOFF32 foo 0x0 +// CHECK-NEXT: 0x42 R_X86_64_TLSLD foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x49 R_X86_64_DTPOFF32 foo 0x0 +// CHECK-NEXT: 0x4E R_X86_64_32S .text 0x0 +// CHECK-NEXT: 0x55 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x5C R_X86_64_PC32 foo 0x5C +// CHECK-NEXT: 0x63 R_X86_64_32S .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: } + +// CHECK: Symbol { +// CHECK: Name: .text (0) +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } diff --git a/test/MC/ELF/rename.s b/test/MC/ELF/rename.s index 241aa05ecbde..c50910b41ec0 100644 --- a/test/MC/ELF/rename.s +++ b/test/MC/ELF/rename.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -t | FileCheck %s // When doing a rename, all the checks for where the relocation should go // should be performed with the original symbol. Only if we decide to relocate @@ -16,31 +16,33 @@ defined3: .global defined1 // Section 1 is .text -// CHECK: # Section 1 -// CHECK-NEXT: (('sh_name', 0x00000006) # '.text' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000040) -// CHECK-NEXT: ('sh_size', 0x0000000000000004) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000004) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) - -// The relocation uses symbol 2 -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000000) -// CHECK-NEXT: ('r_sym', 0x00000002) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) +// CHECK: Section { +// CHECK: Index: 1 +// CHECK-NEXT: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 4 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: Relocations [ +// CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0 +// CHECK-NEXT: ] +// CHECK-NEXT: } // Symbol 2 is section 1 -// CHECK: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) +// CHECK: Symbol { +// CHECK: Name: .text (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } diff --git a/test/MC/ELF/section.s b/test/MC/ELF/section.s index c71e1a72c471..a6794034c94d 100644 --- a/test/MC/ELF/section.s +++ b/test/MC/ELF/section.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s // Test that these names are accepted. @@ -7,10 +7,10 @@ .section .note.GNU-,"",@progbits .section -.note.GNU,"",@progbits -// CHECK: ('sh_name', 0x00000038) # '.note.GNU-stack' -// CHECK: ('sh_name', 0x0000008f) # '.note.GNU-stack2' -// CHECK: ('sh_name', 0x000000a0) # '.note.GNU-' -// CHECK: ('sh_name', 0x00000084) # '-.note.GNU' +// CHECK: Name: .note.GNU-stack (56) +// CHECK: Name: .note.GNU-stack2 (143) +// CHECK: Name: .note.GNU- (160) +// CHECK: Name: -.note.GNU (132) // Test that the defaults are used @@ -19,66 +19,81 @@ .section .rodata .section zed, "" -// CHECK: (('sh_name', 0x00000012) # '.init' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 11 -// CHECK-NEXT: (('sh_name', 0x00000048) # '.fini' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000006) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 12 -// CHECK-NEXT: (('sh_name', 0x00000076) # '.rodata' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Section 13 -// CHECK-NEXT: (('sh_name', 0x00000058) # 'zed' -// CHECK-NEXT: ('sh_type', 0x00000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .init +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 11 +// CHECK-NEXT: Name: .fini +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 12 +// CHECK-NEXT: Name: .rodata +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Section { +// CHECK-NEXT: Index: 13 +// CHECK-NEXT: Name: zed +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } .section .note.test,"",@note -// CHECK: (('sh_name', 0x00000007) # '.note.test' -// CHECK-NEXT: ('sh_type', 0x00000007) -// CHECK-NEXT: ('sh_flags', 0x0000000000000000) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .note.test +// CHECK-NEXT: Type: SHT_NOTE +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } // Test that we can parse these foo: @@ -90,21 +105,26 @@ bar: .section .eh_frame,"a",@unwind -// CHECK: (('sh_name', 0x0000004e) # '.eh_frame' -// CHECK-NEXT: ('sh_type', 0x70000001) -// CHECK-NEXT: ('sh_flags', 0x0000000000000002) -// CHECK-NEXT: ('sh_addr', 0x0000000000000000) -// CHECK-NEXT: ('sh_offset', 0x0000000000000050) -// CHECK-NEXT: ('sh_size', 0x0000000000000000) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x0000000000000001) -// CHECK-NEXT: ('sh_entsize', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .eh_frame +// CHECK-NEXT: Type: SHT_X86_64_UNWIND +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x50 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 1 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: } // Test that we handle the strings like gas .section bar-"foo" .section "foo" -// CHECK: ('sh_name', 0x000000ab) # 'bar-"foo"' -// CHECK: ('sh_name', 0x00000034) # 'foo' +// CHECK: Section { +// CHECK: Name: bar-"foo" (171) +// CHECK: Section { +// CHECK: Name: foo (52) diff --git a/test/MC/ELF/set.s b/test/MC/ELF/set.s index 2258b1923678..f6965a583a9f 100644 --- a/test/MC/ELF/set.s +++ b/test/MC/ELF/set.s @@ -1,17 +1,18 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that we emit the correct value. .set kernbase,0xffffffff80000000 -// CHECK: (('st_name', 0x00000001) # 'kernbase' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0xfff1) -// CHECK-NEXT: ('st_value', 0xffffffff80000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: kernbase (1) +// CHECK-NEXT: Value: 0xFFFFFFFF80000000 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0xFFF1) +// CHECK-NEXT: } // Test that we accept .set of a symbol after it has been used in a statement. @@ -24,11 +25,12 @@ .set foo2,bar2 // Test that there is an undefined reference to bar -// CHECK: (('st_name', 0x0000000a) # 'bar' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: bar (10) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } diff --git a/test/MC/ELF/sleb.s b/test/MC/ELF/sleb.s index 00e5b4bf2821..5cba5829a12b 100644 --- a/test/MC/ELF/sleb.s +++ b/test/MC/ELF/sleb.s @@ -1,5 +1,5 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s // RUN: llvm-mc -filetype=obj -triple i386-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_32 %s // RUN: llvm-mc -filetype=obj -triple x86_64-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_64 %s @@ -19,10 +19,14 @@ foo: .sleb128 8193 -// ELF_32: ('sh_name', 0x00000001) # '.text' -// ELF_32: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000') -// ELF_64: ('sh_name', 0x00000001) # '.text' -// ELF_64: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000') +// ELF_32: Name: .text +// ELF_32: SectionData ( +// ELF_32: 0000: 00017F3F 40C000BF 7FFF3F80 4081C000 +// ELF_32: ) +// ELF_64: Name: .text +// ELF_64: SectionData ( +// ELF_64: 0000: 00017F3F 40C000BF 7FFF3F80 4081C000 +// ELF_64: ) // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // MACHO_32: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000') // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') diff --git a/test/MC/ELF/subsection.s b/test/MC/ELF/subsection.s new file mode 100644 index 000000000000..d437cacf6347 --- /dev/null +++ b/test/MC/ELF/subsection.s @@ -0,0 +1,37 @@ +// RUN: llvm-mc -filetype=obj %s -o - -triple x86_64-pc-linux | llvm-objdump -s - | FileCheck %s + +// CHECK: Contents of section .text: +// CHECK-NEXT: 0000 03042502 00000003 04250100 0000ebf7 +.text 1 +add 1, %eax +jmp label +.subsection +add 2, %eax +label: + +// CHECK-NOT: Contents of section .rela.text: + +// CHECK: Contents of section .data: +// CHECK-NEXT: 0000 01030402 74657374 +.data +l0: +.byte 1 +.subsection 1+1 +l1: +.byte 2 +l2: +.subsection l2-l1 +.byte l1-l0 +.subsection 3 +.ascii "test" +.previous +.byte 4 + +// CHECK: Contents of section test: +// CHECK-NEXT: 0000 010302 +.section test +.byte 1 +.pushsection test, 1 +.byte 2 +.popsection +.byte 3 diff --git a/test/MC/ELF/symref.s b/test/MC/ELF/symref.s index 2dfa058ab086..9a71a81930ee 100644 --- a/test/MC/ELF/symref.s +++ b/test/MC/ELF/symref.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s defined1: defined2: @@ -21,145 +21,122 @@ defined3: .symver global1, g1@@zed global1: +// CHECK: Relocations [ +// CHECK-NEXT: Section (1) .text { +// CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0 +// CHECK-NEXT: 0x4 R_X86_64_32 bar2@zed 0x0 +// CHECK-NEXT: 0x8 R_X86_64_32 .text 0x0 +// CHECK-NEXT: 0xC R_X86_64_32 .text 0x0 +// CHECK-NEXT: 0x10 R_X86_64_32 bar6@zed 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: ] -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000000) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000004) -// CHECK-NEXT: ('r_sym', 0x0000000b) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 2 -// CHECK-NEXT: (('r_offset', 0x0000000000000008) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 3 -// CHECK-NEXT: (('r_offset', 0x000000000000000c) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 4 -// CHECK-NEXT: (('r_offset', 0x0000000000000010) -// CHECK-NEXT: ('r_sym', 0x0000000c) -// CHECK-NEXT: ('r_type', 0x0000000a) -// CHECK-NEXT: ('r_addend', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT:]) - -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000013) # 'bar1@zed' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000025) # 'bar3@@zed' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 3 -// CHECK-NEXT: (('st_name', 0x0000002f) # 'bar5@@zed' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000001) # 'defined1' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x0000000a) # 'defined2' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0003) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 8 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 9 -// CHECK-NEXT: (('st_name', 0x0000004a) # 'g1@@zed' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000014) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 10 -// CHECK-NEXT: (('st_name', 0x00000042) # 'global1' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000014) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 11 -// CHECK-NEXT: (('st_name', 0x0000001c) # 'bar2@zed' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 12 -// CHECK-NEXT: (('st_name', 0x00000039) # 'bar6@zed' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT:]) +// CHECK: Symbol { +// CHECK: Name: bar1@zed (19) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar3@@zed (37) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar5@@zed (47) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: defined1 (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: defined2 (10) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .text (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .data (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .data (0x3) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .bss (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: g1@@zed (74) +// CHECK-NEXT: Value: 0x14 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: global1 (66) +// CHECK-NEXT: Value: 0x14 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar2@zed (28) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar6@zed (57) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/tls-i386.s b/test/MC/ELF/tls-i386.s index 922d4c6e6c2c..267046ef5bfb 100644 --- a/test/MC/ELF/tls-i386.s +++ b/test/MC/ELF/tls-i386.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that all symbols are of type STT_TLS. @@ -17,129 +17,129 @@ .long fooD@DTPOFF .long fooE@INDNTPOFF -// CHECK: (('st_name', 0x00000001) # 'foo1' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000006) # 'foo2' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x0000000b) # 'foo3' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 8 -// CHECK-NEXT: (('st_name', 0x00000010) # 'foo4' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 9 -// CHECK-NEXT: (('st_name', 0x00000015) # 'foo5' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 10 -// CHECK-NEXT: (('st_name', 0x0000001a) # 'foo6' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 11 -// CHECK-NEXT: (('st_name', 0x0000001f) # 'foo7' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 12 -// CHECK-NEXT: (('st_name', 0x00000024) # 'foo8' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 13 -// CHECK-NEXT: (('st_name', 0x00000029) # 'foo9' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 14 -// CHECK-NEXT: (('st_name', 0x0000002e) # 'fooA' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 15 -// CHECK-NEXT: (('st_name', 0x00000033) # 'fooB' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 16 -// CHECK-NEXT: (('st_name', 0x00000038) # 'fooC' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 17 -// CHECK-NEXT: (('st_name', 0x0000003d) # 'fooD' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 18 -// CHECK-NEXT: (('st_name', 0x00000042) # 'fooE' -// CHECK-NEXT: ('st_value', 0x00000000) -// CHECK-NEXT: ('st_size', 0x00000000) -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ), - +// CHECK: Symbol { +// CHECK: Name: foo1 (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo2 (6) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo3 (11) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo4 (16) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo5 (21) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo6 (26) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo7 (31) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo8 (36) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo9 (41) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: fooA (46) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: fooB (51) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: fooC (56) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: fooD (61) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: fooE (66) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } diff --git a/test/MC/ELF/tls.s b/test/MC/ELF/tls.s index fe2bb4e73307..c71e3962bb49 100644 --- a/test/MC/ELF/tls.s +++ b/test/MC/ELF/tls.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that all symbols are of type STT_TLS. @@ -12,66 +12,67 @@ foobar: .long 43 -// CHECK: (('st_name', 0x0000001f) # 'foobar' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0005) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: foobar (31) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .zed (0x5) +// CHECK-NEXT: } -// CHECK: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo1' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 8 -// CHECK-NEXT: (('st_name', 0x00000006) # 'foo2' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 9 -// CHECK-NEXT: (('st_name', 0x0000000b) # 'foo3' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 10 -// CHECK-NEXT: (('st_name', 0x00000010) # 'foo4' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 11 -// CHECK-NEXT: (('st_name', 0x00000015) # 'foo5' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 12 -// CHECK-NEXT: (('st_name', 0x0000001a) # 'foo6' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x6) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbol { +// CHECK: Name: foo1 (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo2 (6) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo3 (11) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo4 (16) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo5 (21) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo6 (26) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } diff --git a/test/MC/ELF/type.s b/test/MC/ELF/type.s index ec53e4ffa524..a5b98129c94a 100644 --- a/test/MC/ELF/type.s +++ b/test/MC/ELF/type.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that both % and @ are accepted. .global foo @@ -12,35 +12,76 @@ bar: // Test that gnu_unique_object is accepted. .type zed,@gnu_unique_object +obj: + .global obj + .type obj,@object + .type obj,@notype + +func: + .global func + .type func,@function + .type func,@object + ifunc: .global ifunc .type ifunc,@gnu_indirect_function -// CHECK: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000005) # 'bar' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x2) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000009) # 'ifunc' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0xa) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +tls: + .global tls + .type tls,@tls_object + .type tls,@gnu_indirect_function +// CHECK: Symbol { +// CHECK: Name: bar +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Function +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: func +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Function +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: ifunc +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: GNU_IFunc +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: obj +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: tls +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: TLS +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } diff --git a/test/MC/ELF/uleb.s b/test/MC/ELF/uleb.s index 1e4734bcafc6..d755cc23e392 100644 --- a/test/MC/ELF/uleb.s +++ b/test/MC/ELF/uleb.s @@ -1,5 +1,5 @@ -// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s +// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s // RUN: llvm-mc -filetype=obj -triple i386-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_32 %s // RUN: llvm-mc -filetype=obj -triple x86_64-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_64 %s @@ -12,10 +12,14 @@ foo: .uleb128 16383 .uleb128 16384 -// ELF_32: ('sh_name', 0x00000001) # '.text' -// ELF_32: ('_section_data', '00017f80 01ff7f80 8001') -// ELF_64: ('sh_name', 0x00000001) # '.text' -// ELF_64: ('_section_data', '00017f80 01ff7f80 8001') +// ELF_32: Name: .text +// ELF_32: SectionData ( +// ELF_32: 0000: 00017F80 01FF7F80 8001 +// ELF_32: ) +// ELF_64: Name: .text +// ELF_64: SectionData ( +// ELF_64: 0000: 00017F80 01FF7F80 8001 +// ELF_64: ) // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') diff --git a/test/MC/ELF/undef.s b/test/MC/ELF/undef.s index e377c6331747..0d89fb129361 100644 --- a/test/MC/ELF/undef.s +++ b/test/MC/ELF/undef.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test which symbols should be in the symbol table @@ -19,28 +19,21 @@ .text movsd .Lsym8(%rip), %xmm1 -// CHECK: ('_symbols', [ -// CHECK-NEXT: # Symbol 0 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x0000000d) # '.Lsym8' -// CHECK: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 3 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000001) # '.Lsym1' -// CHECK: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x00000008) # 'sym6' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) +// CHECK: Symbols [ + +// CHECK: Symbol { +// CHECK: Name: .Lsym8 + +// CHECK: Symbol { +// CHECK: Name: .Lsym1 + +// CHECK: Symbol { +// CHECK: Name: sym6 +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: Object +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/undef2.s b/test/MC/ELF/undef2.s index 6f971c55bf6c..6aa66c05c4bb 100644 --- a/test/MC/ELF/undef2.s +++ b/test/MC/ELF/undef2.s @@ -1,10 +1,18 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s // Test that this produces an undefined reference to .Lfoo je .Lfoo -// CHECK: ('_symbols', [ -// CHECK: (('st_name', 0x00000001) # '.Lfoo' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK: (('sh_name', 0x0000001b) # '.strtab' +// CHECK: Section { +// CHECK: Name: .strtab + +// CHECK: Symbol { +// CHECK: Name: .Lfoo +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: +// CHECK-NEXT: Other: +// CHECK-NEXT: Section: +// CHECK-NEXT: } diff --git a/test/MC/ELF/version.s b/test/MC/ELF/version.s index 31e952afeb40..0bc9c8b7a782 100644 --- a/test/MC/ELF/version.s +++ b/test/MC/ELF/version.s @@ -1,17 +1,23 @@ -// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s .version "1234" .version "123" -// CHECK: (('sh_name', 0x0000000c) # '.note' -// CHECK-NEXT: ('sh_type', 0x00000007) -// CHECK-NEXT: ('sh_flags', 0x00000000) -// CHECK-NEXT: ('sh_addr', 0x00000000) -// CHECK-NEXT: ('sh_offset', 0x00000034) -// CHECK-NEXT: ('sh_size', 0x00000024) -// CHECK-NEXT: ('sh_link', 0x00000000) -// CHECK-NEXT: ('sh_info', 0x00000000) -// CHECK-NEXT: ('sh_addralign', 0x00000004) -// CHECK-NEXT: ('sh_entsize', 0x00000000) -// CHECK-NEXT: ('_section_data', '05000000 00000000 01000000 31323334 00000000 04000000 00000000 01000000 31323300') -// CHECK-NEXT: ), +// CHECK: Section { +// CHECK: Name: .note +// CHECK-NEXT: Type: SHT_NOTE +// CHECK-NEXT: Flags [ +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x34 +// CHECK-NEXT: Size: 36 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 05000000 00000000 01000000 31323334 +// CHECK-NEXT: 0010: 00000000 04000000 00000000 01000000 +// CHECK-NEXT: 0020: 31323300 +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/ELF/weak-relocation.s b/test/MC/ELF/weak-relocation.s index 88e841e65bf5..0f5bba2383d7 100644 --- a/test/MC/ELF/weak-relocation.s +++ b/test/MC/ELF/weak-relocation.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s // Test that weak symbols always produce relocations @@ -7,9 +7,8 @@ foo: bar: call foo -//CHECK: # Relocation 0 -//CHECK-NEXT: (('r_offset', 0x0000000000000001) -//CHECK-NEXT: ('r_sym', 0x00000005) -//CHECK-NEXT: ('r_type', 0x00000002) -//CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) -//CHECK-NEXT: ), +// CHECK: Relocations [ +// CHECK-NEXT: Section ({{[0-9]+}}) .text { +// CHECK-NEXT: 0x1 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/weak.s b/test/MC/ELF/weak.s index 07a83913631a..2ed3eb7b2bd4 100644 --- a/test/MC/ELF/weak.s +++ b/test/MC/ELF/weak.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // Test that this produces a weak undefined symbol. @@ -9,22 +9,22 @@ .weak bar bar: -//CHECK: # Symbol 4 -//CHECK-NEXT: (('st_name', 0x00000005) # 'bar' -//CHECK-NEXT: ('st_bind', 0x2) -//CHECK-NEXT: ('st_type', 0x0) -//CHECK-NEXT: ('st_other', 0x00) -//CHECK-NEXT: ('st_shndx', 0x0001) -//CHECK-NEXT: ('st_value', 0x0000000000000004) -//CHECK-NEXT: ('st_size', 0x0000000000000000) -//CHECK-NEXT: ), -//CHECK-NEXT: # Symbol 5 -//CHECK: (('st_name', 0x00000001) # 'foo' -//CHECK-NEXT: ('st_bind', 0x2) -//CHECK-NEXT: ('st_type', 0x0) -//CHECK-NEXT: ('st_other', 0x00) -//CHECK-NEXT: ('st_shndx', 0x0000) -//CHECK-NEXT: ('st_value', 0x0000000000000000) -//CHECK-NEXT: ('st_size', 0x0000000000000000) -//CHECK-NEXT: ), -//CHECK-NEXT: ]) +// CHECK: Symbol { +// CHECK: Name: bar +// CHECK-NEXT: Value: 0x4 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text +// CHECK-NEXT: } +// CHECK: Symbol { +// CHECK: Name: foo +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/weakref-plt.s b/test/MC/ELF/weakref-plt.s index 2e500935b6db..d6486dcd5283 100644 --- a/test/MC/ELF/weakref-plt.s +++ b/test/MC/ELF/weakref-plt.s @@ -1,8 +1,14 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s .weakref bar,foo call bar@PLT -// CHECK: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo' -// CHECK-NEXT: ('st_bind', 0x2) +// CHECK: Symbol { +// CHECK: Name: foo +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: +// CHECK-NEXT: Other: +// CHECK-NEXT: Section: +// CHECK-NEXT: } diff --git a/test/MC/ELF/weakref-reloc.s b/test/MC/ELF/weakref-reloc.s index 4bbf2645a8cd..48bda8748fde 100644 --- a/test/MC/ELF/weakref-reloc.s +++ b/test/MC/ELF/weakref-reloc.s @@ -1,49 +1,44 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s // Test that the relocations point to the correct symbols. We used to get the // symbol index wrong for weakrefs when creating _GLOBAL_OFFSET_TABLE_. - .weakref bar,foo + .weakref bar,foo call zed@PLT - call bar + call bar -// CHECK: # Relocation 0 -// CHECK-NEXT: (('r_offset', 0x0000000000000001) -// CHECK-NEXT: ('r_sym', 0x00000006) -// CHECK-NEXT: ('r_type', 0x00000004) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) -// CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 1 -// CHECK-NEXT: (('r_offset', 0x0000000000000006) -// CHECK-NEXT: ('r_sym', 0x00000005) -// CHECK-NEXT: ('r_type', 0x00000002) -// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc) -// CHECK-NEXT: ), +// CHECK: Relocations [ +// CHECK-NEXT: Section ({{[0-9]+}}) {{[^ ]+}} { +// CHECK-NEXT: 0x1 R_X86_64_PLT32 zed 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: 0x6 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC +// CHECK-NEXT: } +// CHECK-NEXT: ] -// CHECK: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000009) # '_GLOBAL_OFFSET_TABLE_' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000001) # 'foo' -// CHECK-NEXT: ('st_bind', 0x2) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000005) # 'zed' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Name: _GLOBAL_OFFSET_TABLE_ (9) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: foo (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: zed (5) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } diff --git a/test/MC/ELF/weakref.s b/test/MC/ELF/weakref.s index e12d2c74eb8a..87173641b56f 100644 --- a/test/MC/ELF/weakref.s +++ b/test/MC/ELF/weakref.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s // This is a long test that checks that the aliases created by weakref are // never in the symbol table and that the only case it causes a symbol to @@ -69,166 +69,158 @@ bar15: .long bar15 .long foo15 -// CHECK: # Symbol 0 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 1 -// CHECK-NEXT: (('st_name', 0x00000015) # 'bar6' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000018) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 2 -// CHECK-NEXT: (('st_name', 0x0000001a) # 'bar7' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000018) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 3 -// CHECK-NEXT: (('st_name', 0x0000001f) # 'bar8' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x000000000000001c) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 4 -// CHECK-NEXT: (('st_name', 0x00000024) # 'bar9' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000020) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 5 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 6 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0003) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 7 -// CHECK-NEXT: (('st_name', 0x00000000) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0004) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 8 -// CHECK-NEXT: (('st_name', 0x00000029) # 'bar10' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000028) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 9 -// CHECK-NEXT: (('st_name', 0x0000002f) # 'bar11' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000030) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 10 -// CHECK-NEXT: (('st_name', 0x00000035) # 'bar12' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000030) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 11 -// CHECK-NEXT: (('st_name', 0x0000003b) # 'bar13' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000034) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 12 -// CHECK-NEXT: (('st_name', 0x00000041) # 'bar14' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000038) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 13 -// CHECK-NEXT: (('st_name', 0x00000047) # 'bar15' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0001) -// CHECK-NEXT: ('st_value', 0x0000000000000040) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 14 -// CHECK-NEXT: (('st_name', 0x00000001) # 'bar2' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 15 -// CHECK-NEXT: (('st_name', 0x00000006) # 'bar3' -// CHECK-NEXT: ('st_bind', 0x2) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 16 -// CHECK-NEXT: (('st_name', 0x0000000b) # 'bar4' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 17 -// CHECK-NEXT: (('st_name', 0x00000010) # 'bar5' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x00) -// CHECK-NEXT: ('st_shndx', 0x0000) -// CHECK-NEXT: ('st_value', 0x0000000000000000) -// CHECK-NEXT: ('st_size', 0x0000000000000000) -// CHECK-NEXT: ), -// CHECK-NEXT: ]) +// CHECK: Symbols [ +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar6 (21) +// CHECK-NEXT: Value: 0x18 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar7 (26) +// CHECK-NEXT: Value: 0x18 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar8 (31) +// CHECK-NEXT: Value: 0x1C +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar9 (36) +// CHECK-NEXT: Value: 0x20 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .text (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .data (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .data (0x3) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: .bss (0) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Local +// CHECK-NEXT: Type: Section +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .bss (0x4) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar10 (41) +// CHECK-NEXT: Value: 0x28 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar11 (47) +// CHECK-NEXT: Value: 0x30 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar12 (53) +// CHECK-NEXT: Value: 0x30 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar13 (59) +// CHECK-NEXT: Value: 0x34 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar14 (65) +// CHECK-NEXT: Value: 0x38 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar15 (71) +// CHECK-NEXT: Value: 0x40 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: .text (0x1) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar2 (1) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar3 (6) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Weak +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar4 (11) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: bar5 (16) +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: Size: 0 +// CHECK-NEXT: Binding: Global +// CHECK-NEXT: Type: None +// CHECK-NEXT: Other: 0 +// CHECK-NEXT: Section: (0x0) +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/x86_64-reloc-sizetest.s b/test/MC/ELF/x86_64-reloc-sizetest.s index acca2f5076a5..bd67ee0f9de8 100644 --- a/test/MC/ELF/x86_64-reloc-sizetest.s +++ b/test/MC/ELF/x86_64-reloc-sizetest.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-linux-gnu -filetype=obj %s | elf-dump | FileCheck %s +// RUN: llvm-mc -triple x86_64-linux-gnu -filetype=obj %s | llvm-readobj -r | FileCheck %s // Tests that relocation value fits in the provided size // Original bug http://llvm.org/bugs/show_bug.cgi?id=10568 @@ -6,8 +6,8 @@ L: movq $(L + 2147483648),%rax -// CHECK: Relocation 0 -// CHECK-NEXT: ('r_offset', 0x0000000000000003) -// CHECK-NEXT: ('r_sym' -// CHECK-NEXT: ('r_type', 0x0000000b) -// CHECK-NEXT: ('r_addend', 0x0000000080000000 +// CHECK: Relocations [ +// CHECK-NEXT: Section ({{[0-9]+}}) .text { +// CHECK-NEXT: 0x3 R_X86_64_32S {{[^ ]+}} 0x80000000 +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/ELF/zero.s b/test/MC/ELF/zero.s index 46ffe17cfbf7..be92eb839e1c 100644 --- a/test/MC/ELF/zero.s +++ b/test/MC/ELF/zero.s @@ -1,16 +1,23 @@ -// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s .zero 4 .zero 1,42 -// CHECK: ('sh_name', 0x00000001) # '.text' -// CHECK: ('sh_type', 0x00000001) -// CHECK: ('sh_flags', 0x0000000000000006) -// CHECK: ('sh_addr', 0x0000000000000000) -// CHECK: ('sh_offset', 0x0000000000000040) -// CHECK: ('sh_size', 0x0000000000000005) -// CHECK: ('sh_link', 0x00000000) -// CHECK: ('sh_info', 0x00000000) -// CHECK: ('sh_addralign', 0x0000000000000004) -// CHECK: ('sh_entsize', 0x0000000000000000) -// CHECK: ('_section_data', '00000000 2a') +// CHECK: Section { +// CHECK: Name: .text +// CHECK-NEXT: Type: SHT_PROGBITS +// CHECK-NEXT: Flags [ +// CHECK-NEXT: SHF_ALLOC +// CHECK-NEXT: SHF_EXECINSTR +// CHECK-NEXT: ] +// CHECK-NEXT: Address: 0x0 +// CHECK-NEXT: Offset: 0x40 +// CHECK-NEXT: Size: 5 +// CHECK-NEXT: Link: 0 +// CHECK-NEXT: Info: 0 +// CHECK-NEXT: AddressAlignment: 4 +// CHECK-NEXT: EntrySize: 0 +// CHECK-NEXT: SectionData ( +// CHECK-NEXT: 0000: 00000000 2A +// CHECK-NEXT: ) +// CHECK-NEXT: } diff --git a/test/MC/Mips/elf-N64.ll b/test/MC/Mips/elf-N64.ll index ae6de78d6552..a1ea34a80a71 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 7111debd11b1..a92fe339f88b 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 b94682214df7..47003fa1e752 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 1d7a18866c50..a255af931d83 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 0f74437ec5d4..6da926273ab7 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 b4183b835779..9f604e00a0a8 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 ffc3b112e502..6c1e7690126d 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 315cb812bf77..6d16a42aca2f 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 f188ce7ba387..bc56c0033e58 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 000000000000..67664c1a2ae4 --- /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 0c665220335b..6c3d71f6a4b1 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 000000000000..c541e1ace554 --- /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 000000000000..623e2acdcbf6 --- /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 000000000000..3b5060f5280e --- /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 7384d19e440f..586e88bc4814 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 3385fe19309f..1622965a4139 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 a126c6f7188c..e515872f260a 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 1dcb287738ce..597f6872d60f 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 b5f1267ef386..c8b055906ebb 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 ff71c7559cd0..6f095d1ecdff 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 1b4ebdfbbd49..db6c972b3b49 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 df7e64563371..45247cd162b5 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 9371208a2a9e..050fb8134880 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 73396ac5139d..7e78a46649d8 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 98a3a35b5428..828175a223a7 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 5162c913ad06..c7450f74ae41 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 bfe9b9ad6604..e2a500ffdeea 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 diff --git a/test/MC/PowerPC/ppc64-encoding-bookII.s b/test/MC/PowerPC/ppc64-encoding-bookII.s new file mode 100644 index 000000000000..e74c971323fb --- /dev/null +++ b/test/MC/PowerPC/ppc64-encoding-bookII.s @@ -0,0 +1,58 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# Cache management instruction + +# FIXME: icbi 2, 3 +# FIXME: icbt 1, 2, 3 + +# FIXME: dcbt 2, 3, 10 +# FIXME: dcbtst 2, 3, 10 +# CHECK: dcbz 2, 3 # encoding: [0x7c,0x02,0x1f,0xec] + dcbz 2, 3 +# CHECK: dcbst 2, 3 # encoding: [0x7c,0x02,0x18,0x6c] + dcbst 2, 3 +# FIXME: dcbf 2, 3, 1 + +# Synchronization instructions + +# FIXME: isync + +# FIXME: lbarx 2, 3, 4, 1 +# FIXME: lharx 2, 3, 4, 1 +# FIXME: lwarx 2, 3, 4, 1 +# FIXME: ldarx 2, 3, 4, 1 + +# FIXME: stbcx. 2, 3, 4 +# FIXME: sthcx. 2, 3, 4 +# CHECK: stwcx. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2d] + stwcx. 2, 3, 4 +# CHECK: stdcx. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xad] + stdcx. 2, 3, 4 + +# FIXME: sync 2 +# FIXME: eieio +# FIXME: wait 2 + +# Extended mnemonics + +# CHECK: dcbf 2, 3 # encoding: [0x7c,0x02,0x18,0xac] + dcbf 2, 3 +# FIXME: dcbfl 2, 3 + +# FIXME: lbarx 2, 3, 4 +# FIXME: lharx 2, 3, 4 +# CHECK: lwarx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x28] + lwarx 2, 3, 4 +# CHECK: ldarx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xa8] + ldarx 2, 3, 4 + +# CHECK: sync # encoding: [0x7c,0x00,0x04,0xac] + sync +# FIXME: lwsync +# FIXME: ptesync + +# FIXME: wait +# FIXME: waitrsv +# FIXME: waitimpl + diff --git a/test/MC/PowerPC/ppc64-encoding-ext.s b/test/MC/PowerPC/ppc64-encoding-ext.s new file mode 100644 index 000000000000..4395b1980aba --- /dev/null +++ b/test/MC/PowerPC/ppc64-encoding-ext.s @@ -0,0 +1,331 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# FIXME: Condition register bit symbols + +# Branch mnemonics + +# CHECK: blr # encoding: [0x4e,0x80,0x00,0x20] + blr +# CHECK: bctr # encoding: [0x4e,0x80,0x04,0x20] + bctr +# FIXME: blrl +# CHECK: bctrl # encoding: [0x4e,0x80,0x04,0x21] + bctrl + +# FIXME: bt 2, target +# FIXME: bta 2, target +# FIXME: btlr 2 +# FIXME: btctr 2 +# FIXME: btl 2, target +# FIXME: btla 2, target +# FIXME: btlrl 2 +# FIXME: btctrl 2 + +# FIXME: bf 2, target +# FIXME: bfa 2, target +# FIXME: bflr 2 +# FIXME: bfctr 2 +# FIXME: bfl 2, target +# FIXME: bfla 2, target +# FIXME: bflrl 2 +# FIXME: bfctrl 2 + +# CHECK: bdnz target # encoding: [0x42,0x00,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdnz target +# FIXME: bdnza target +# CHECK: bdnzlr # encoding: [0x4e,0x00,0x00,0x20] + bdnzlr +# FIXME: bdnzl target +# FIXME: bdnzla target +# FIXME: bdnzlrl + +# FIXME: bdnzt 2, target +# FIXME: bdnzta 2, target +# FIXME: bdnztlr 2 +# FIXME: bdnztl 2, target +# FIXME: bdnztla 2, target +# FIXME: bdnztlrl 2 +# FIXME: bdnzf 2, target +# FIXME: bdnzfa 2, target +# FIXME: bdnzflr 2 +# FIXME: bdnzfl 2, target +# FIXME: bdnzfla 2, target +# FIXME: bdnzflrl 2 + +# CHECK: bdz target # encoding: [0x42,0x40,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdz target +# FIXME: bdza target +# CHECK: bdzlr # encoding: [0x4e,0x40,0x00,0x20] + bdzlr +# FIXME: bdzl target +# FIXME: bdzla target + +# FIXME: bdzlrl +# FIXME: bdzt 2, target +# FIXME: bdzta 2, target +# FIXME: bdztlr 2 +# FIXME: bdztl 2, target +# FIXME: bdztla 2, target +# FIXME: bdztlrl 2 +# FIXME: bdzf 2, target +# FIXME: bdzfa 2, target +# FIXME: bdzflr 2 +# FIXME: bdzfl 2, target +# FIXME: bdzfla 2, target +# FIXME: bdzflrl 2 + +# CHECK: blt 2, target # encoding: [0x41,0x88,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blt 2, target +# FIXME: blta 2, target +# CHECK: bltlr 2 # encoding: [0x4d,0x88,0x00,0x20] + bltlr 2 +# CHECK: bltctr 2 # encoding: [0x4d,0x88,0x04,0x20] + bltctr 2 +# FIXME: bltl 2, target +# FIXME: bltla 2, target +# FIXME: bltlrl 2 +# CHECK: bltctrl 2 # encoding: [0x4d,0x88,0x04,0x21] + bltctrl 2 + +# CHECK: ble 2, target # encoding: [0x40,0x89,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + ble 2, target +# FIXME: blea 2, target +# CHECK: blelr 2 # encoding: [0x4c,0x89,0x00,0x20] + blelr 2 +# CHECK: blectr 2 # encoding: [0x4c,0x89,0x04,0x20] + blectr 2 +# FIXME: blel 2, target +# FIXME: blela 2, target +# FIXME: blelrl 2 +# CHECK: blectrl 2 # encoding: [0x4c,0x89,0x04,0x21] + blectrl 2 + +# CHECK: beq 2, target # encoding: [0x41,0x8a,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beq 2, target +# FIXME: beqa 2, target +# CHECK: beqlr 2 # encoding: [0x4d,0x8a,0x00,0x20] + beqlr 2 +# CHECK: beqctr 2 # encoding: [0x4d,0x8a,0x04,0x20] + beqctr 2 +# FIXME: beql 2, target +# FIXME: beqla 2, target +# FIXME: beqlrl 2 +# CHECK: beqctrl 2 # encoding: [0x4d,0x8a,0x04,0x21] + beqctrl 2 + +# CHECK: bge 2, target # encoding: [0x40,0x88,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bge 2, target +# FIXME: bgea 2, target +# CHECK: bgelr 2 # encoding: [0x4c,0x88,0x00,0x20] + bgelr 2 +# CHECK: bgectr 2 # encoding: [0x4c,0x88,0x04,0x20] + bgectr 2 +# FIXME: bgel 2, target +# FIXME: bgela 2, target +# FIXME: bgelrl 2 +# CHECK: bgectrl 2 # encoding: [0x4c,0x88,0x04,0x21] + bgectrl 2 + +# CHECK: bgt 2, target # encoding: [0x41,0x89,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgt 2, target +# FIXME: bgta 2, target +# CHECK: bgtlr 2 # encoding: [0x4d,0x89,0x00,0x20] + bgtlr 2 +# CHECK: bgtctr 2 # encoding: [0x4d,0x89,0x04,0x20] + bgtctr 2 +# FIXME: bgtl 2, target +# FIXME: bgtla 2, target +# FIXME: bgtlrl 2 +# CHECK: bgtctrl 2 # encoding: [0x4d,0x89,0x04,0x21] + bgtctrl 2 + +# CHECK: bge 2, target # encoding: [0x40,0x88,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnl 2, target +# FIXME: bnla 2, target +# CHECK: bgelr 2 # encoding: [0x4c,0x88,0x00,0x20] + bnllr 2 +# CHECK: bgectr 2 # encoding: [0x4c,0x88,0x04,0x20] + bnlctr 2 +# FIXME: bnll 2, target +# FIXME: bnlla 2, target +# FIXME: bnllrl 2 +# CHECK: bgectrl 2 # encoding: [0x4c,0x88,0x04,0x21] + bnlctrl 2 + +# CHECK: bne 2, target # encoding: [0x40,0x8a,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bne 2, target +# FIXME: bnea 2, target +# CHECK: bnelr 2 # encoding: [0x4c,0x8a,0x00,0x20] + bnelr 2 +# CHECK: bnectr 2 # encoding: [0x4c,0x8a,0x04,0x20] + bnectr 2 +# FIXME: bnel 2, target +# FIXME: bnela 2, target +# FIXME: bnelrl 2 +# CHECK: bnectrl 2 # encoding: [0x4c,0x8a,0x04,0x21] + bnectrl 2 + +# CHECK: ble 2, target # encoding: [0x40,0x89,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bng 2, target +# FIXME: bnga 2, target +# CHECK: blelr 2 # encoding: [0x4c,0x89,0x00,0x20] + bnglr 2 +# CHECK: blectr 2 # encoding: [0x4c,0x89,0x04,0x20] + bngctr 2 +# FIXME: bngl 2, target +# FIXME: bngla 2, target +# FIXME: bnglrl 2 +# CHECK: blectrl 2 # encoding: [0x4c,0x89,0x04,0x21] + bngctrl 2 + +# CHECK: bun 2, target # encoding: [0x41,0x8b,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bso 2, target +# FIXME: bsoa 2, target +# CHECK: bunlr 2 # encoding: [0x4d,0x8b,0x00,0x20] + bsolr 2 +# CHECK: bunctr 2 # encoding: [0x4d,0x8b,0x04,0x20] + bsoctr 2 +# FIXME: bsol 2, target +# FIXME: bsola 2, target +# FIXME: bsolrl 2 +# CHECK: bunctrl 2 # encoding: [0x4d,0x8b,0x04,0x21] + bsoctrl 2 + +# CHECK: bnu 2, target # encoding: [0x40,0x8b,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bns 2, target +# FIXME: bnsa 2, target +# CHECK: bnulr 2 # encoding: [0x4c,0x8b,0x00,0x20] + bnslr 2 +# CHECK: bnuctr 2 # encoding: [0x4c,0x8b,0x04,0x20] + bnsctr 2 +# FIXME: bnsl 2, target +# FIXME: bnsla 2, target +# FIXME: bnslrl 2 +# CHECK: bnuctrl 2 # encoding: [0x4c,0x8b,0x04,0x21] + bnsctrl 2 + +# CHECK: bun 2, target # encoding: [0x41,0x8b,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bun 2, target +# FIXME: buna 2, target +# CHECK: bunlr 2 # encoding: [0x4d,0x8b,0x00,0x20] + bunlr 2 +# CHECK: bunctr 2 # encoding: [0x4d,0x8b,0x04,0x20] + bunctr 2 +# FIXME: bunl 2, target +# FIXME: bunla 2, target +# FIXME: bunlrl 2 +# CHECK: bunctrl 2 # encoding: [0x4d,0x8b,0x04,0x21] + bunctrl 2 + +# CHECK: bnu 2, target # encoding: [0x40,0x8b,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnu 2, target +# FIXME: bnua 2, target +# CHECK: bnulr 2 # encoding: [0x4c,0x8b,0x00,0x20] + bnulr 2 +# CHECK: bnuctr 2 # encoding: [0x4c,0x8b,0x04,0x20] + bnuctr 2 +# FIXME: bnul 2, target +# FIXME: bnula 2, target +# FIXME: bnulrl 2 +# CHECK: bnuctrl 2 # encoding: [0x4c,0x8b,0x04,0x21] + bnuctrl 2 + +# FIXME: Condition register logical mnemonics + +# FIXME: Subtract mnemonics + +# Compare mnemonics + +# CHECK: cmpdi 2, 3, 128 # encoding: [0x2d,0x23,0x00,0x80] + cmpdi 2, 3, 128 +# CHECK: cmpd 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x00] + cmpd 2, 3, 4 +# CHECK: cmpldi 2, 3, 128 # encoding: [0x29,0x23,0x00,0x80] + cmpldi 2, 3, 128 +# CHECK: cmpld 2, 3, 4 # encoding: [0x7d,0x23,0x20,0x40] + cmpld 2, 3, 4 + +# CHECK: cmpwi 2, 3, 128 # encoding: [0x2d,0x03,0x00,0x80] + cmpwi 2, 3, 128 +# CHECK: cmpw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x00] + cmpw 2, 3, 4 +# CHECK: cmplwi 2, 3, 128 # encoding: [0x29,0x03,0x00,0x80] + cmplwi 2, 3, 128 +# CHECK: cmplw 2, 3, 4 # encoding: [0x7d,0x03,0x20,0x40] + cmplw 2, 3, 4 + +# FIXME: Trap mnemonics + +# Rotate and shift mnemonics + +# FIXME: extldi 2, 3, 4, 5 +# FIXME: extrdi 2, 3, 4, 5 +# FIXME: insrdi 2, 3, 4, 5 +# FIXME: rotldi 2, 3, 4 +# FIXME: rotrdi 2, 3, 4 +# FIXME: rotld 2, 3, 4 +# CHECK: sldi 2, 3, 4 # encoding: [0x78,0x62,0x26,0xe4] + sldi 2, 3, 4 +# CHECK: rldicl 2, 3, 60, 4 # encoding: [0x78,0x62,0xe1,0x02] + srdi 2, 3, 4 +# FIXME: clrldi 2, 3, 4 +# FIXME: clrrdi 2, 3, 4 +# FIXME: clrlsldi 2, 3, 4, 5 + +# FIXME: extlwi 2, 3, 4, 5 +# FIXME: extrwi 2, 3, 4, 5 +# FIXME: inslwi 2, 3, 4, 5 +# FIXME: insrwi 2, 3, 4, 5 +# FIXME: rotlwi 2, 3, 4 +# FIXME: rotrwi 2, 3, 4 +# FIXME: rotlw 2, 3, 4 +# CHECK: slwi 2, 3, 4 # encoding: [0x54,0x62,0x20,0x36] + slwi 2, 3, 4 +# CHECK: srwi 2, 3, 4 # encoding: [0x54,0x62,0xe1,0x3e] + srwi 2, 3, 4 +# FIXME: clrlwi 2, 3, 4 +# FIXME: clrrwi 2, 3, 4 +# FIXME: clrlslwi 2, 3, 4, 5 + +# Move to/from special purpose register mnemonics + +# FIXME: mtxer 2 +# FIXME: mfxer 2 +# CHECK: mtlr 2 # encoding: [0x7c,0x48,0x03,0xa6] + mtlr 2 +# CHECK: mflr 2 # encoding: [0x7c,0x48,0x02,0xa6] + mflr 2 +# CHECK: mtctr 2 # encoding: [0x7c,0x49,0x03,0xa6] + mtctr 2 +# CHECK: mfctr 2 # encoding: [0x7c,0x49,0x02,0xa6] + mfctr 2 + +# Miscellaneous mnemonics + +# CHECK: nop # encoding: [0x60,0x00,0x00,0x00] + nop +# FIXME: xnop +# CHECK: li 2, 128 # encoding: [0x38,0x40,0x00,0x80] + li 2, 128 +# CHECK: lis 2, 128 # encoding: [0x3c,0x40,0x00,0x80] + lis 2, 128 +# FIXME: la 2, 128(4) +# CHECK: mr 2, 3 # encoding: [0x7c,0x62,0x1b,0x78] + mr 2, 3 +# FIXME: not 2, 3 + diff --git a/test/MC/PowerPC/ppc64-encoding-fp.s b/test/MC/PowerPC/ppc64-encoding-fp.s new file mode 100644 index 000000000000..ae0e2866a261 --- /dev/null +++ b/test/MC/PowerPC/ppc64-encoding-fp.s @@ -0,0 +1,263 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# Floating-point facility + +# Floating-point load instructions + +# CHECK: lfs 2, 128(4) # encoding: [0xc0,0x44,0x00,0x80] + lfs 2, 128(4) +# CHECK: lfsx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x2e] + lfsx 2, 3, 4 +# CHECK: lfsu 2, 128(4) # encoding: [0xc4,0x44,0x00,0x80] + lfsu 2, 128(4) +# CHECK: lfsux 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x6e] + lfsux 2, 3, 4 +# CHECK: lfd 2, 128(4) # encoding: [0xc8,0x44,0x00,0x80] + lfd 2, 128(4) +# CHECK: lfdx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0xae] + lfdx 2, 3, 4 +# CHECK: lfdu 2, 128(4) # encoding: [0xcc,0x44,0x00,0x80] + lfdu 2, 128(4) +# CHECK: lfdux 2, 3, 4 # encoding: [0x7c,0x43,0x24,0xee] + lfdux 2, 3, 4 +# CHECK: lfiwax 2, 3, 4 # encoding: [0x7c,0x43,0x26,0xae] + lfiwax 2, 3, 4 +# CHECK: lfiwzx 2, 3, 4 # encoding: [0x7c,0x43,0x26,0xee] + lfiwzx 2, 3, 4 + +# Floating-point store instructions + +# CHECK: stfs 2, 128(4) # encoding: [0xd0,0x44,0x00,0x80] + stfs 2, 128(4) +# CHECK: stfsx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x2e] + stfsx 2, 3, 4 +# CHECK: stfsu 2, 128(4) # encoding: [0xd4,0x44,0x00,0x80] + stfsu 2, 128(4) +# CHECK: stfsux 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x6e] + stfsux 2, 3, 4 +# CHECK: stfd 2, 128(4) # encoding: [0xd8,0x44,0x00,0x80] + stfd 2, 128(4) +# CHECK: stfdx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0xae] + stfdx 2, 3, 4 +# CHECK: stfdu 2, 128(4) # encoding: [0xdc,0x44,0x00,0x80] + stfdu 2, 128(4) +# CHECK: stfdux 2, 3, 4 # encoding: [0x7c,0x43,0x25,0xee] + stfdux 2, 3, 4 +# CHECK: stfiwx 2, 3, 4 # encoding: [0x7c,0x43,0x27,0xae] + stfiwx 2, 3, 4 + +# Floating-point move instructions + +# CHECK: fmr 2, 3 # encoding: [0xfc,0x40,0x18,0x90] + fmr 2, 3 +# CHECK: fmr. 2, 3 # encoding: [0xfc,0x40,0x18,0x91] + fmr. 2, 3 +# CHECK: fneg 2, 3 # encoding: [0xfc,0x40,0x18,0x50] + fneg 2, 3 +# CHECK: fneg. 2, 3 # encoding: [0xfc,0x40,0x18,0x51] + fneg. 2, 3 +# CHECK: fabs 2, 3 # encoding: [0xfc,0x40,0x1a,0x10] + fabs 2, 3 +# CHECK: fabs. 2, 3 # encoding: [0xfc,0x40,0x1a,0x11] + fabs. 2, 3 +# CHECK: fnabs 2, 3 # encoding: [0xfc,0x40,0x19,0x10] + fnabs 2, 3 +# CHECK: fnabs. 2, 3 # encoding: [0xfc,0x40,0x19,0x11] + fnabs. 2, 3 +# FIXME: fcpsgn 2, 3 +# FIXME: fcpsgn. 2, 3 + +# Floating-point arithmetic instructions + +# CHECK: fadd 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x2a] + fadd 2, 3, 4 +# CHECK: fadd. 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x2b] + fadd. 2, 3, 4 +# CHECK: fadds 2, 3, 4 # encoding: [0xec,0x43,0x20,0x2a] + fadds 2, 3, 4 +# CHECK: fadds. 2, 3, 4 # encoding: [0xec,0x43,0x20,0x2b] + fadds. 2, 3, 4 +# CHECK: fsub 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x28] + fsub 2, 3, 4 +# CHECK: fsub. 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x29] + fsub. 2, 3, 4 +# CHECK: fsubs 2, 3, 4 # encoding: [0xec,0x43,0x20,0x28] + fsubs 2, 3, 4 +# CHECK: fsubs. 2, 3, 4 # encoding: [0xec,0x43,0x20,0x29] + fsubs. 2, 3, 4 + +# CHECK: fmul 2, 3, 4 # encoding: [0xfc,0x43,0x01,0x32] + fmul 2, 3, 4 +# CHECK: fmul. 2, 3, 4 # encoding: [0xfc,0x43,0x01,0x33] + fmul. 2, 3, 4 +# CHECK: fmuls 2, 3, 4 # encoding: [0xec,0x43,0x01,0x32] + fmuls 2, 3, 4 +# CHECK: fmuls. 2, 3, 4 # encoding: [0xec,0x43,0x01,0x33] + fmuls. 2, 3, 4 +# CHECK: fdiv 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x24] + fdiv 2, 3, 4 +# CHECK: fdiv. 2, 3, 4 # encoding: [0xfc,0x43,0x20,0x25] + fdiv. 2, 3, 4 +# CHECK: fdivs 2, 3, 4 # encoding: [0xec,0x43,0x20,0x24] + fdivs 2, 3, 4 +# CHECK: fdivs. 2, 3, 4 # encoding: [0xec,0x43,0x20,0x25] + fdivs. 2, 3, 4 +# CHECK: fsqrt 2, 3 # encoding: [0xfc,0x40,0x18,0x2c] + fsqrt 2, 3 +# CHECK: fsqrt. 2, 3 # encoding: [0xfc,0x40,0x18,0x2d] + fsqrt. 2, 3 +# CHECK: fsqrts 2, 3 # encoding: [0xec,0x40,0x18,0x2c] + fsqrts 2, 3 +# CHECK: fsqrts. 2, 3 # encoding: [0xec,0x40,0x18,0x2d] + fsqrts. 2, 3 + +# CHECK: fre 2, 3 # encoding: [0xfc,0x40,0x18,0x30] + fre 2, 3 +# CHECK: fre. 2, 3 # encoding: [0xfc,0x40,0x18,0x31] + fre. 2, 3 +# CHECK: fres 2, 3 # encoding: [0xec,0x40,0x18,0x30] + fres 2, 3 +# CHECK: fres. 2, 3 # encoding: [0xec,0x40,0x18,0x31] + fres. 2, 3 +# CHECK: frsqrte 2, 3 # encoding: [0xfc,0x40,0x18,0x34] + frsqrte 2, 3 +# CHECK: frsqrte. 2, 3 # encoding: [0xfc,0x40,0x18,0x35] + frsqrte. 2, 3 +# CHECK: frsqrtes 2, 3 # encoding: [0xec,0x40,0x18,0x34] + frsqrtes 2, 3 +# CHECK: frsqrtes. 2, 3 # encoding: [0xec,0x40,0x18,0x35] + frsqrtes. 2, 3 +# FIXME: ftdiv 2, 3, 4 +# FIXME: ftsqrt 2, 3, 4 + +# CHECK: fmadd 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3a] + fmadd 2, 3, 4, 5 +# CHECK: fmadd. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3b] + fmadd. 2, 3, 4, 5 +# CHECK: fmadds 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3a] + fmadds 2, 3, 4, 5 +# CHECK: fmadds. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3b] + fmadds. 2, 3, 4, 5 +# CHECK: fmsub 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x38] + fmsub 2, 3, 4, 5 +# CHECK: fmsub. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x39] + fmsub. 2, 3, 4, 5 +# CHECK: fmsubs 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x38] + fmsubs 2, 3, 4, 5 +# CHECK: fmsubs. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x39] + fmsubs. 2, 3, 4, 5 +# CHECK: fnmadd 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3e] + fnmadd 2, 3, 4, 5 +# CHECK: fnmadd. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3f] + fnmadd. 2, 3, 4, 5 +# CHECK: fnmadds 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3e] + fnmadds 2, 3, 4, 5 +# CHECK: fnmadds. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3f] + fnmadds. 2, 3, 4, 5 +# CHECK: fnmsub 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3c] + fnmsub 2, 3, 4, 5 +# CHECK: fnmsub. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x3d] + fnmsub. 2, 3, 4, 5 +# CHECK: fnmsubs 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3c] + fnmsubs 2, 3, 4, 5 +# CHECK: fnmsubs. 2, 3, 4, 5 # encoding: [0xec,0x43,0x29,0x3d] + fnmsubs. 2, 3, 4, 5 + +# Floating-point rounding and conversion instructions + +# CHECK: frsp 2, 3 # encoding: [0xfc,0x40,0x18,0x18] + frsp 2, 3 +# CHECK: frsp. 2, 3 # encoding: [0xfc,0x40,0x18,0x19] + frsp. 2, 3 + +# FIXME: fctid 2, 3 +# FIXME: fctid. 2, 3 +# CHECK: fctidz 2, 3 # encoding: [0xfc,0x40,0x1e,0x5e] + fctidz 2, 3 +# CHECK: fctidz. 2, 3 # encoding: [0xfc,0x40,0x1e,0x5f] + fctidz. 2, 3 +# FIXME: fctidu 2, 3 +# FIXME: fctidu. 2, 3 +# CHECK: fctiduz 2, 3 # encoding: [0xfc,0x40,0x1f,0x5e] + fctiduz 2, 3 +# CHECK: fctiduz. 2, 3 # encoding: [0xfc,0x40,0x1f,0x5f] + fctiduz. 2, 3 +# FIXME: fctiw 2, 3 +# FIXME: fctiw. 2, 3 +# CHECK: fctiwz 2, 3 # encoding: [0xfc,0x40,0x18,0x1e] + fctiwz 2, 3 +# CHECK: fctiwz. 2, 3 # encoding: [0xfc,0x40,0x18,0x1f] + fctiwz. 2, 3 +# FIXME: fctiwu 2, 3 +# FIXME: fctiwu. 2, 3 +# CHECK: fctiwuz 2, 3 # encoding: [0xfc,0x40,0x19,0x1e] + fctiwuz 2, 3 +# CHECK: fctiwuz. 2, 3 # encoding: [0xfc,0x40,0x19,0x1f] + fctiwuz. 2, 3 +# CHECK: fcfid 2, 3 # encoding: [0xfc,0x40,0x1e,0x9c] + fcfid 2, 3 +# CHECK: fcfid. 2, 3 # encoding: [0xfc,0x40,0x1e,0x9d] + fcfid. 2, 3 +# CHECK: fcfidu 2, 3 # encoding: [0xfc,0x40,0x1f,0x9c] + fcfidu 2, 3 +# CHECK: fcfidu. 2, 3 # encoding: [0xfc,0x40,0x1f,0x9d] + fcfidu. 2, 3 +# CHECK: fcfids 2, 3 # encoding: [0xec,0x40,0x1e,0x9c] + fcfids 2, 3 +# CHECK: fcfids. 2, 3 # encoding: [0xec,0x40,0x1e,0x9d] + fcfids. 2, 3 +# CHECK: fcfidus 2, 3 # encoding: [0xec,0x40,0x1f,0x9c] + fcfidus 2, 3 +# CHECK: fcfidus. 2, 3 # encoding: [0xec,0x40,0x1f,0x9d] + fcfidus. 2, 3 +# CHECK: frin 2, 3 # encoding: [0xfc,0x40,0x1b,0x10] + frin 2, 3 +# CHECK: frin. 2, 3 # encoding: [0xfc,0x40,0x1b,0x11] + frin. 2, 3 +# CHECK: frip 2, 3 # encoding: [0xfc,0x40,0x1b,0x90] + frip 2, 3 +# CHECK: frip. 2, 3 # encoding: [0xfc,0x40,0x1b,0x91] + frip. 2, 3 +# CHECK: friz 2, 3 # encoding: [0xfc,0x40,0x1b,0x50] + friz 2, 3 +# CHECK: friz. 2, 3 # encoding: [0xfc,0x40,0x1b,0x51] + friz. 2, 3 +# CHECK: frim 2, 3 # encoding: [0xfc,0x40,0x1b,0xd0] + frim 2, 3 +# CHECK: frim. 2, 3 # encoding: [0xfc,0x40,0x1b,0xd1] + frim. 2, 3 + +# Floating-point compare instructions + +# CHECK: fcmpu 2, 3, 4 # encoding: [0xfd,0x03,0x20,0x00] + fcmpu 2, 3, 4 +# FIXME: fcmpo 2, 3, 4 + +# Floating-point select instruction + +# CHECK: fsel 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x2e] + fsel 2, 3, 4, 5 +# CHECK: fsel. 2, 3, 4, 5 # encoding: [0xfc,0x43,0x29,0x2f] + fsel. 2, 3, 4, 5 + +# Floating-point status and control register instructions + +# CHECK: mffs 2 # encoding: [0xfc,0x40,0x04,0x8e] + mffs 2 +# FIXME: mffs. 2 + +# FIXME: mcrfs 2, 3 + +# FIXME: mtfsfi 2, 3, 1 +# FIXME: mtfsfi. 2, 3, 1 +# FIXME: mtfsf 2, 3, 1, 1 +# FIXME: mtfsf. 2, 3, 1, 1 + +# CHECK: mtfsb0 31 # encoding: [0xff,0xe0,0x00,0x8c] + mtfsb0 31 +# FIXME: mtfsb0. 31 +# CHECK: mtfsb1 31 # encoding: [0xff,0xe0,0x00,0x4c] + mtfsb1 31 +# FIXME: mtfsb1. 31 + diff --git a/test/MC/PowerPC/ppc64-encoding-vmx.s b/test/MC/PowerPC/ppc64-encoding-vmx.s new file mode 100644 index 000000000000..0154076390bc --- /dev/null +++ b/test/MC/PowerPC/ppc64-encoding-vmx.s @@ -0,0 +1,384 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# Vector facility + +# Vector storage access instructions + +# CHECK: lvebx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x0e] + lvebx 2, 3, 4 +# CHECK: lvehx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x4e] + lvehx 2, 3, 4 +# CHECK: lvewx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x8e] + lvewx 2, 3, 4 +# CHECK: lvx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xce] + lvx 2, 3, 4 +# CHECK: lvxl 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xce] + lvxl 2, 3, 4 +# CHECK: stvebx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x0e] + stvebx 2, 3, 4 +# CHECK: stvehx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x4e] + stvehx 2, 3, 4 +# CHECK: stvewx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x8e] + stvewx 2, 3, 4 +# CHECK: stvx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xce] + stvx 2, 3, 4 +# CHECK: stvxl 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xce] + stvxl 2, 3, 4 +# CHECK: lvsl 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x0c] + lvsl 2, 3, 4 +# CHECK: lvsr 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x4c] + lvsr 2, 3, 4 + +# Vector permute and formatting instructions + +# CHECK: vpkpx 2, 3, 4 # encoding: [0x10,0x43,0x23,0x0e] + vpkpx 2, 3, 4 +# CHECK: vpkshss 2, 3, 4 # encoding: [0x10,0x43,0x21,0x8e] + vpkshss 2, 3, 4 +# CHECK: vpkshus 2, 3, 4 # encoding: [0x10,0x43,0x21,0x0e] + vpkshus 2, 3, 4 +# CHECK: vpkswss 2, 3, 4 # encoding: [0x10,0x43,0x21,0xce] + vpkswss 2, 3, 4 +# CHECK: vpkswus 2, 3, 4 # encoding: [0x10,0x43,0x21,0x4e] + vpkswus 2, 3, 4 +# CHECK: vpkuhum 2, 3, 4 # encoding: [0x10,0x43,0x20,0x0e] + vpkuhum 2, 3, 4 +# CHECK: vpkuhus 2, 3, 4 # encoding: [0x10,0x43,0x20,0x8e] + vpkuhus 2, 3, 4 +# CHECK: vpkuwum 2, 3, 4 # encoding: [0x10,0x43,0x20,0x4e] + vpkuwum 2, 3, 4 +# CHECK: vpkuwus 2, 3, 4 # encoding: [0x10,0x43,0x20,0xce] + vpkuwus 2, 3, 4 + +# CHECK: vupkhpx 2, 3 # encoding: [0x10,0x40,0x1b,0x4e] + vupkhpx 2, 3 +# CHECK: vupkhsb 2, 3 # encoding: [0x10,0x40,0x1a,0x0e] + vupkhsb 2, 3 +# CHECK: vupkhsh 2, 3 # encoding: [0x10,0x40,0x1a,0x4e] + vupkhsh 2, 3 +# CHECK: vupklpx 2, 3 # encoding: [0x10,0x40,0x1b,0xce] + vupklpx 2, 3 +# CHECK: vupklsb 2, 3 # encoding: [0x10,0x40,0x1a,0x8e] + vupklsb 2, 3 +# CHECK: vupklsh 2, 3 # encoding: [0x10,0x40,0x1a,0xce] + vupklsh 2, 3 + +# CHECK: vmrghb 2, 3, 4 # encoding: [0x10,0x43,0x20,0x0c] + vmrghb 2, 3, 4 +# CHECK: vmrghh 2, 3, 4 # encoding: [0x10,0x43,0x20,0x4c] + vmrghh 2, 3, 4 +# CHECK: vmrghw 2, 3, 4 # encoding: [0x10,0x43,0x20,0x8c] + vmrghw 2, 3, 4 +# CHECK: vmrglb 2, 3, 4 # encoding: [0x10,0x43,0x21,0x0c] + vmrglb 2, 3, 4 +# CHECK: vmrglh 2, 3, 4 # encoding: [0x10,0x43,0x21,0x4c] + vmrglh 2, 3, 4 +# CHECK: vmrglw 2, 3, 4 # encoding: [0x10,0x43,0x21,0x8c] + vmrglw 2, 3, 4 + +# CHECK: vspltb 2, 3, 1 # encoding: [0x10,0x41,0x1a,0x0c] + vspltb 2, 3, 1 +# CHECK: vsplth 2, 3, 1 # encoding: [0x10,0x41,0x1a,0x4c] + vsplth 2, 3, 1 +# CHECK: vspltw 2, 3, 1 # encoding: [0x10,0x41,0x1a,0x8c] + vspltw 2, 3, 1 +# CHECK: vspltisb 2, 3 # encoding: [0x10,0x43,0x03,0x0c] + vspltisb 2, 3 +# CHECK: vspltish 2, 3 # encoding: [0x10,0x43,0x03,0x4c] + vspltish 2, 3 +# CHECK: vspltisw 2, 3 # encoding: [0x10,0x43,0x03,0x8c] + vspltisw 2, 3 + +# CHECK: vperm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x6b] + vperm 2, 3, 4, 5 +# CHECK: vsel 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x6a] + vsel 2, 3, 4, 5 + +# CHECK: vsl 2, 3, 4 # encoding: [0x10,0x43,0x21,0xc4] + vsl 2, 3, 4 +# CHECK: vsldoi 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x6c] + vsldoi 2, 3, 4, 5 +# CHECK: vslo 2, 3, 4 # encoding: [0x10,0x43,0x24,0x0c] + vslo 2, 3, 4 +# CHECK: vsr 2, 3, 4 # encoding: [0x10,0x43,0x22,0xc4] + vsr 2, 3, 4 +# CHECK: vsro 2, 3, 4 # encoding: [0x10,0x43,0x24,0x4c] + vsro 2, 3, 4 + +# Vector integer arithmetic instructions + +# CHECK: vaddcuw 2, 3, 4 # encoding: [0x10,0x43,0x21,0x80] + vaddcuw 2, 3, 4 +# CHECK: vaddsbs 2, 3, 4 # encoding: [0x10,0x43,0x23,0x00] + vaddsbs 2, 3, 4 +# CHECK: vaddshs 2, 3, 4 # encoding: [0x10,0x43,0x23,0x40] + vaddshs 2, 3, 4 +# CHECK: vaddsws 2, 3, 4 # encoding: [0x10,0x43,0x23,0x80] + vaddsws 2, 3, 4 +# CHECK: vaddubm 2, 3, 4 # encoding: [0x10,0x43,0x20,0x00] + vaddubm 2, 3, 4 +# CHECK: vadduhm 2, 3, 4 # encoding: [0x10,0x43,0x20,0x40] + vadduhm 2, 3, 4 +# CHECK: vadduwm 2, 3, 4 # encoding: [0x10,0x43,0x20,0x80] + vadduwm 2, 3, 4 +# CHECK: vaddubs 2, 3, 4 # encoding: [0x10,0x43,0x22,0x00] + vaddubs 2, 3, 4 +# CHECK: vadduhs 2, 3, 4 # encoding: [0x10,0x43,0x22,0x40] + vadduhs 2, 3, 4 +# CHECK: vadduws 2, 3, 4 # encoding: [0x10,0x43,0x22,0x80] + vadduws 2, 3, 4 + +# CHECK: vsubcuw 2, 3, 4 # encoding: [0x10,0x43,0x25,0x80] + vsubcuw 2, 3, 4 +# CHECK: vsubsbs 2, 3, 4 # encoding: [0x10,0x43,0x27,0x00] + vsubsbs 2, 3, 4 +# CHECK: vsubshs 2, 3, 4 # encoding: [0x10,0x43,0x27,0x40] + vsubshs 2, 3, 4 +# CHECK: vsubsws 2, 3, 4 # encoding: [0x10,0x43,0x27,0x80] + vsubsws 2, 3, 4 +# CHECK: vsububm 2, 3, 4 # encoding: [0x10,0x43,0x24,0x00] + vsububm 2, 3, 4 +# CHECK: vsubuhm 2, 3, 4 # encoding: [0x10,0x43,0x24,0x40] + vsubuhm 2, 3, 4 +# CHECK: vsubuwm 2, 3, 4 # encoding: [0x10,0x43,0x24,0x80] + vsubuwm 2, 3, 4 +# CHECK: vsububs 2, 3, 4 # encoding: [0x10,0x43,0x26,0x00] + vsububs 2, 3, 4 +# CHECK: vsubuhs 2, 3, 4 # encoding: [0x10,0x43,0x26,0x40] + vsubuhs 2, 3, 4 +# CHECK: vsubuws 2, 3, 4 # encoding: [0x10,0x43,0x26,0x80] + vsubuws 2, 3, 4 + +# CHECK: vmulesb 2, 3, 4 # encoding: [0x10,0x43,0x23,0x08] + vmulesb 2, 3, 4 +# CHECK: vmulesh 2, 3, 4 # encoding: [0x10,0x43,0x23,0x48] + vmulesh 2, 3, 4 +# CHECK: vmuleub 2, 3, 4 # encoding: [0x10,0x43,0x22,0x08] + vmuleub 2, 3, 4 +# CHECK: vmuleuh 2, 3, 4 # encoding: [0x10,0x43,0x22,0x48] + vmuleuh 2, 3, 4 +# CHECK: vmulosb 2, 3, 4 # encoding: [0x10,0x43,0x21,0x08] + vmulosb 2, 3, 4 +# CHECK: vmulosh 2, 3, 4 # encoding: [0x10,0x43,0x21,0x48] + vmulosh 2, 3, 4 +# CHECK: vmuloub 2, 3, 4 # encoding: [0x10,0x43,0x20,0x08] + vmuloub 2, 3, 4 +# CHECK: vmulouh 2, 3, 4 # encoding: [0x10,0x43,0x20,0x48] + vmulouh 2, 3, 4 + +# CHECK: vmhaddshs 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x60] + vmhaddshs 2, 3, 4, 5 +# CHECK: vmhraddshs 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x61] + vmhraddshs 2, 3, 4, 5 +# CHECK: vmladduhm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x62] + vmladduhm 2, 3, 4, 5 +# CHECK: vmsumubm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x64] + vmsumubm 2, 3, 4, 5 +# CHECK: vmsummbm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x65] + vmsummbm 2, 3, 4, 5 +# CHECK: vmsumshm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x68] + vmsumshm 2, 3, 4, 5 +# CHECK: vmsumshs 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x69] + vmsumshs 2, 3, 4, 5 +# CHECK: vmsumuhm 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x66] + vmsumuhm 2, 3, 4, 5 +# CHECK: vmsumuhs 2, 3, 4, 5 # encoding: [0x10,0x43,0x21,0x67] + vmsumuhs 2, 3, 4, 5 + +# CHECK: vsumsws 2, 3, 4 # encoding: [0x10,0x43,0x27,0x88] + vsumsws 2, 3, 4 +# CHECK: vsum2sws 2, 3, 4 # encoding: [0x10,0x43,0x26,0x88] + vsum2sws 2, 3, 4 +# CHECK: vsum4sbs 2, 3, 4 # encoding: [0x10,0x43,0x27,0x08] + vsum4sbs 2, 3, 4 +# CHECK: vsum4shs 2, 3, 4 # encoding: [0x10,0x43,0x26,0x48] + vsum4shs 2, 3, 4 +# CHECK: vsum4ubs 2, 3, 4 # encoding: [0x10,0x43,0x26,0x08] + vsum4ubs 2, 3, 4 + +# CHECK: vavgsb 2, 3, 4 # encoding: [0x10,0x43,0x25,0x02] + vavgsb 2, 3, 4 +# CHECK: vavgsh 2, 3, 4 # encoding: [0x10,0x43,0x25,0x42] + vavgsh 2, 3, 4 +# CHECK: vavgsw 2, 3, 4 # encoding: [0x10,0x43,0x25,0x82] + vavgsw 2, 3, 4 +# CHECK: vavgub 2, 3, 4 # encoding: [0x10,0x43,0x24,0x02] + vavgub 2, 3, 4 +# CHECK: vavguh 2, 3, 4 # encoding: [0x10,0x43,0x24,0x42] + vavguh 2, 3, 4 +# CHECK: vavguw 2, 3, 4 # encoding: [0x10,0x43,0x24,0x82] + vavguw 2, 3, 4 + +# CHECK: vmaxsb 2, 3, 4 # encoding: [0x10,0x43,0x21,0x02] + vmaxsb 2, 3, 4 +# CHECK: vmaxsh 2, 3, 4 # encoding: [0x10,0x43,0x21,0x42] + vmaxsh 2, 3, 4 +# CHECK: vmaxsw 2, 3, 4 # encoding: [0x10,0x43,0x21,0x82] + vmaxsw 2, 3, 4 +# CHECK: vmaxub 2, 3, 4 # encoding: [0x10,0x43,0x20,0x02] + vmaxub 2, 3, 4 +# CHECK: vmaxuh 2, 3, 4 # encoding: [0x10,0x43,0x20,0x42] + vmaxuh 2, 3, 4 +# CHECK: vmaxuw 2, 3, 4 # encoding: [0x10,0x43,0x20,0x82] + vmaxuw 2, 3, 4 + +# CHECK: vminsb 2, 3, 4 # encoding: [0x10,0x43,0x23,0x02] + vminsb 2, 3, 4 +# CHECK: vminsh 2, 3, 4 # encoding: [0x10,0x43,0x23,0x42] + vminsh 2, 3, 4 +# CHECK: vminsw 2, 3, 4 # encoding: [0x10,0x43,0x23,0x82] + vminsw 2, 3, 4 +# CHECK: vminub 2, 3, 4 # encoding: [0x10,0x43,0x22,0x02] + vminub 2, 3, 4 +# CHECK: vminuh 2, 3, 4 # encoding: [0x10,0x43,0x22,0x42] + vminuh 2, 3, 4 +# CHECK: vminuw 2, 3, 4 # encoding: [0x10,0x43,0x22,0x82] + vminuw 2, 3, 4 + +# Vector integer compare instructions + +# CHECK: vcmpequb 2, 3, 4 # encoding: [0x10,0x43,0x20,0x06] + vcmpequb 2, 3, 4 +# CHECK: vcmpequb. 2, 3, 4 # encoding: [0x10,0x43,0x24,0x06] + vcmpequb. 2, 3, 4 +# CHECK: vcmpequh 2, 3, 4 # encoding: [0x10,0x43,0x20,0x46] + vcmpequh 2, 3, 4 +# CHECK: vcmpequh. 2, 3, 4 # encoding: [0x10,0x43,0x24,0x46] + vcmpequh. 2, 3, 4 +# CHECK: vcmpequw 2, 3, 4 # encoding: [0x10,0x43,0x20,0x86] + vcmpequw 2, 3, 4 +# CHECK: vcmpequw. 2, 3, 4 # encoding: [0x10,0x43,0x24,0x86] + vcmpequw. 2, 3, 4 +# CHECK: vcmpgtsb 2, 3, 4 # encoding: [0x10,0x43,0x23,0x06] + vcmpgtsb 2, 3, 4 +# CHECK: vcmpgtsb. 2, 3, 4 # encoding: [0x10,0x43,0x27,0x06] + vcmpgtsb. 2, 3, 4 +# CHECK: vcmpgtsh 2, 3, 4 # encoding: [0x10,0x43,0x23,0x46] + vcmpgtsh 2, 3, 4 +# CHECK: vcmpgtsh. 2, 3, 4 # encoding: [0x10,0x43,0x27,0x46] + vcmpgtsh. 2, 3, 4 +# CHECK: vcmpgtsw 2, 3, 4 # encoding: [0x10,0x43,0x23,0x86] + vcmpgtsw 2, 3, 4 +# CHECK: vcmpgtsw. 2, 3, 4 # encoding: [0x10,0x43,0x27,0x86] + vcmpgtsw. 2, 3, 4 +# CHECK: vcmpgtub 2, 3, 4 # encoding: [0x10,0x43,0x22,0x06] + vcmpgtub 2, 3, 4 +# CHECK: vcmpgtub. 2, 3, 4 # encoding: [0x10,0x43,0x26,0x06] + vcmpgtub. 2, 3, 4 +# CHECK: vcmpgtuh 2, 3, 4 # encoding: [0x10,0x43,0x22,0x46] + vcmpgtuh 2, 3, 4 +# CHECK: vcmpgtuh. 2, 3, 4 # encoding: [0x10,0x43,0x26,0x46] + vcmpgtuh. 2, 3, 4 +# CHECK: vcmpgtuw 2, 3, 4 # encoding: [0x10,0x43,0x22,0x86] + vcmpgtuw 2, 3, 4 +# CHECK: vcmpgtuw. 2, 3, 4 # encoding: [0x10,0x43,0x26,0x86] + vcmpgtuw. 2, 3, 4 + +# Vector integer logical instructions + +# CHECK: vand 2, 3, 4 # encoding: [0x10,0x43,0x24,0x04] + vand 2, 3, 4 +# CHECK: vandc 2, 3, 4 # encoding: [0x10,0x43,0x24,0x44] + vandc 2, 3, 4 +# CHECK: vnor 2, 3, 4 # encoding: [0x10,0x43,0x25,0x04] + vnor 2, 3, 4 +# CHECK: vor 2, 3, 4 # encoding: [0x10,0x43,0x24,0x84] + vor 2, 3, 4 +# CHECK: vxor 2, 3, 4 # encoding: [0x10,0x43,0x24,0xc4] + vxor 2, 3, 4 + +# Vector integer rotate and shift instructions + +# CHECK: vrlb 2, 3, 4 # encoding: [0x10,0x43,0x20,0x04] + vrlb 2, 3, 4 +# CHECK: vrlh 2, 3, 4 # encoding: [0x10,0x43,0x20,0x44] + vrlh 2, 3, 4 +# CHECK: vrlw 2, 3, 4 # encoding: [0x10,0x43,0x20,0x84] + vrlw 2, 3, 4 + +# CHECK: vslb 2, 3, 4 # encoding: [0x10,0x43,0x21,0x04] + vslb 2, 3, 4 +# CHECK: vslh 2, 3, 4 # encoding: [0x10,0x43,0x21,0x44] + vslh 2, 3, 4 +# CHECK: vslw 2, 3, 4 # encoding: [0x10,0x43,0x21,0x84] + vslw 2, 3, 4 +# CHECK: vsrb 2, 3, 4 # encoding: [0x10,0x43,0x22,0x04] + vsrb 2, 3, 4 +# CHECK: vsrh 2, 3, 4 # encoding: [0x10,0x43,0x22,0x44] + vsrh 2, 3, 4 +# CHECK: vsrw 2, 3, 4 # encoding: [0x10,0x43,0x22,0x84] + vsrw 2, 3, 4 +# CHECK: vsrab 2, 3, 4 # encoding: [0x10,0x43,0x23,0x04] + vsrab 2, 3, 4 +# CHECK: vsrah 2, 3, 4 # encoding: [0x10,0x43,0x23,0x44] + vsrah 2, 3, 4 +# CHECK: vsraw 2, 3, 4 # encoding: [0x10,0x43,0x23,0x84] + vsraw 2, 3, 4 + +# Vector floating-point instructions + +# CHECK: vaddfp 2, 3, 4 # encoding: [0x10,0x43,0x20,0x0a] + vaddfp 2, 3, 4 +# CHECK: vsubfp 2, 3, 4 # encoding: [0x10,0x43,0x20,0x4a] + vsubfp 2, 3, 4 +# CHECK: vmaddfp 2, 3, 4, 5 # encoding: [0x10,0x43,0x29,0x2e] + vmaddfp 2, 3, 4, 5 +# CHECK: vnmsubfp 2, 3, 4, 5 # encoding: [0x10,0x43,0x29,0x2f] + vnmsubfp 2, 3, 4, 5 + +# CHECK: vmaxfp 2, 3, 4 # encoding: [0x10,0x43,0x24,0x0a] + vmaxfp 2, 3, 4 +# CHECK: vminfp 2, 3, 4 # encoding: [0x10,0x43,0x24,0x4a] + vminfp 2, 3, 4 + +# CHECK: vctsxs 2, 3, 4 # encoding: [0x10,0x44,0x1b,0xca] + vctsxs 2, 3, 4 +# CHECK: vctuxs 2, 3, 4 # encoding: [0x10,0x44,0x1b,0x8a] + vctuxs 2, 3, 4 +# CHECK: vcfsx 2, 3, 4 # encoding: [0x10,0x44,0x1b,0x4a] + vcfsx 2, 3, 4 +# CHECK: vcfux 2, 3, 4 # encoding: [0x10,0x44,0x1b,0x0a] + vcfux 2, 3, 4 +# CHECK: vrfim 2, 3 # encoding: [0x10,0x40,0x1a,0xca] + vrfim 2, 3 +# CHECK: vrfin 2, 3 # encoding: [0x10,0x40,0x1a,0x0a] + vrfin 2, 3 +# CHECK: vrfip 2, 3 # encoding: [0x10,0x40,0x1a,0x8a] + vrfip 2, 3 +# CHECK: vrfiz 2, 3 # encoding: [0x10,0x40,0x1a,0x4a] + vrfiz 2, 3 + +# CHECK: vcmpbfp 2, 3, 4 # encoding: [0x10,0x43,0x23,0xc6] + vcmpbfp 2, 3, 4 +# CHECK: vcmpbfp. 2, 3, 4 # encoding: [0x10,0x43,0x27,0xc6] + vcmpbfp. 2, 3, 4 +# CHECK: vcmpeqfp 2, 3, 4 # encoding: [0x10,0x43,0x20,0xc6] + vcmpeqfp 2, 3, 4 +# CHECK: vcmpeqfp. 2, 3, 4 # encoding: [0x10,0x43,0x24,0xc6] + vcmpeqfp. 2, 3, 4 +# CHECK: vcmpgefp 2, 3, 4 # encoding: [0x10,0x43,0x21,0xc6] + vcmpgefp 2, 3, 4 +# CHECK: vcmpgefp. 2, 3, 4 # encoding: [0x10,0x43,0x25,0xc6] + vcmpgefp. 2, 3, 4 +# CHECK: vcmpgtfp 2, 3, 4 # encoding: [0x10,0x43,0x22,0xc6] + vcmpgtfp 2, 3, 4 +# CHECK: vcmpgtfp. 2, 3, 4 # encoding: [0x10,0x43,0x26,0xc6] + vcmpgtfp. 2, 3, 4 + +# CHECK: vexptefp 2, 3 # encoding: [0x10,0x40,0x19,0x8a] + vexptefp 2, 3 +# CHECK: vlogefp 2, 3 # encoding: [0x10,0x40,0x19,0xca] + vlogefp 2, 3 +# CHECK: vrefp 2, 3 # encoding: [0x10,0x40,0x19,0x0a] + vrefp 2, 3 +# CHECK: vrsqrtefp 2, 3 # encoding: [0x10,0x40,0x19,0x4a] + vrsqrtefp 2, 3 + +# Vector status and control register instructions + +# CHECK: mtvscr 2 # encoding: [0x10,0x00,0x16,0x44] + mtvscr 2 +# CHECK: mfvscr 2 # encoding: [0x10,0x40,0x06,0x04] + mfvscr 2 + diff --git a/test/MC/PowerPC/ppc64-encoding.s b/test/MC/PowerPC/ppc64-encoding.s new file mode 100644 index 000000000000..dda796063849 --- /dev/null +++ b/test/MC/PowerPC/ppc64-encoding.s @@ -0,0 +1,480 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# Branch facility + +# Branch instructions + +# CHECK: b target # encoding: [0b010010AA,A,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24 + b target +# FIXME: ba target +# CHECK: bl target # encoding: [0b010010AA,A,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24 + bl target +# FIXME: bla target + +# FIXME: bc 4, 10, target +# FIXME: bca 4, 10, target +# FIXME: bcl 4, 10, target +# FIXME: bcla 4, 10, target + +# FIXME: bclr 4, 10, 3 +# FIXME: bclrl 4, 10, 3 +# FIXME: bcctr 4, 10, 3 +# FIXME: bcctrl 4, 10, 3 + +# Condition register instructions + +# FIXME: crand 2, 3, 4 +# FIXME: crnand 2, 3, 4 +# CHECK: cror 2, 3, 4 # encoding: [0x4c,0x43,0x23,0x82] + cror 2, 3, 4 +# FIXME: crxor 2, 3, 4 +# FIXME: crnor 2, 3, 4 +# CHECK: creqv 2, 3, 4 # encoding: [0x4c,0x43,0x22,0x42] + creqv 2, 3, 4 +# FIXME: crandc 2, 3, 4 +# FIXME: crorc 2, 3, 4 +# CHECK: mcrf 2, 3 # encoding: [0x4d,0x0c,0x00,0x00] + mcrf 2, 3 + +# System call instruction + +# FIXME: sc 1 + +# Fixed-point facility + +# Fixed-point load instructions + +# CHECK: lbz 2, 128(4) # encoding: [0x88,0x44,0x00,0x80] + lbz 2, 128(4) +# CHECK: lbzx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xae] + lbzx 2, 3, 4 +# CHECK: lbzu 2, 128(4) # encoding: [0x8c,0x44,0x00,0x80] + lbzu 2, 128(4) +# CHECK: lbzux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0xee] + lbzux 2, 3, 4 +# CHECK: lhz 2, 128(4) # encoding: [0xa0,0x44,0x00,0x80] + lhz 2, 128(4) +# CHECK: lhzx 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x2e] + lhzx 2, 3, 4 +# CHECK: lhzu 2, 128(4) # encoding: [0xa4,0x44,0x00,0x80] + lhzu 2, 128(4) +# CHECK: lhzux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x6e] + lhzux 2, 3, 4 +# CHECK: lha 2, 128(4) # encoding: [0xa8,0x44,0x00,0x80] + lha 2, 128(4) +# CHECK: lhax 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xae] + lhax 2, 3, 4 +# CHECK: lhau 2, 128(4) # encoding: [0xac,0x44,0x00,0x80] + lhau 2, 128(4) +# CHECK: lhaux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xee] + lhaux 2, 3, 4 +# CHECK: lwz 2, 128(4) # encoding: [0x80,0x44,0x00,0x80] + lwz 2, 128(4) +# CHECK: lwzx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x2e] + lwzx 2, 3, 4 +# CHECK: lwzu 2, 128(4) # encoding: [0x84,0x44,0x00,0x80] + lwzu 2, 128(4) +# CHECK: lwzux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x6e] + lwzux 2, 3, 4 +# CHECK: lwa 2, 128(4) # encoding: [0xe8,0x44,0x00,0x82] + lwa 2, 128(4) +# CHECK: lwax 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xaa] + lwax 2, 3, 4 +# CHECK: lwaux 2, 3, 4 # encoding: [0x7c,0x43,0x22,0xea] + lwaux 2, 3, 4 +# CHECK: ld 2, 128(4) # encoding: [0xe8,0x44,0x00,0x80] + ld 2, 128(4) +# CHECK: ldx 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x2a] + ldx 2, 3, 4 +# CHECK: ldu 2, 128(4) # encoding: [0xe8,0x44,0x00,0x81] + ldu 2, 128(4) +# CHECK: ldux 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x6a] + ldux 2, 3, 4 + +# Fixed-point store instructions + +# CHECK: stb 2, 128(4) # encoding: [0x98,0x44,0x00,0x80] + stb 2, 128(4) +# CHECK: stbx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xae] + stbx 2, 3, 4 +# CHECK: stbu 2, 128(4) # encoding: [0x9c,0x44,0x00,0x80] + stbu 2, 128(4) +# CHECK: stbux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xee] + stbux 2, 3, 4 +# CHECK: sth 2, 128(4) # encoding: [0xb0,0x44,0x00,0x80] + sth 2, 128(4) +# CHECK: sthx 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x2e] + sthx 2, 3, 4 +# CHECK: sthu 2, 128(4) # encoding: [0xb4,0x44,0x00,0x80] + sthu 2, 128(4) +# CHECK: sthux 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x6e] + sthux 2, 3, 4 +# CHECK: stw 2, 128(4) # encoding: [0x90,0x44,0x00,0x80] + stw 2, 128(4) +# CHECK: stwx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2e] + stwx 2, 3, 4 +# CHECK: stwu 2, 128(4) # encoding: [0x94,0x44,0x00,0x80] + stwu 2, 128(4) +# CHECK: stwux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x6e] + stwux 2, 3, 4 +# CHECK: std 2, 128(4) # encoding: [0xf8,0x44,0x00,0x80] + std 2, 128(4) +# CHECK: stdx 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x2a] + stdx 2, 3, 4 +# CHECK: stdu 2, 128(4) # encoding: [0xf8,0x44,0x00,0x81] + stdu 2, 128(4) +# CHECK: stdux 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x6a] + stdux 2, 3, 4 + +# Fixed-point load and store with byte reversal instructions + +# CHECK: lhbrx 2, 3, 4 # encoding: [0x7c,0x43,0x26,0x2c] + lhbrx 2, 3, 4 +# CHECK: sthbrx 2, 3, 4 # encoding: [0x7c,0x43,0x27,0x2c] + sthbrx 2, 3, 4 +# CHECK: lwbrx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x2c] + lwbrx 2, 3, 4 +# CHECK: stwbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x2c] + stwbrx 2, 3, 4 +# CHECK: ldbrx 2, 3, 4 # encoding: [0x7c,0x43,0x24,0x28] + ldbrx 2, 3, 4 +# CHECK: stdbrx 2, 3, 4 # encoding: [0x7c,0x43,0x25,0x28] + stdbrx 2, 3, 4 + +# FIXME: Fixed-point load and store multiple instructions + +# FIXME: Fixed-point move assist instructions + +# Fixed-point arithmetic instructions + +# CHECK: addi 2, 3, 128 # encoding: [0x38,0x43,0x00,0x80] + addi 2, 3, 128 +# CHECK: addis 2, 3, 128 # encoding: [0x3c,0x43,0x00,0x80] + addis 2, 3, 128 +# CHECK: add 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x14] + add 2, 3, 4 +# CHECK: add. 2, 3, 4 # encoding: [0x7c,0x43,0x22,0x15] + add. 2, 3, 4 +# FIXME: addo 2, 3, 4 +# FIXME: addo. 2, 3, 4 +# CHECK: subf 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x50] + subf 2, 3, 4 +# CHECK: subf. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x51] + subf. 2, 3, 4 +# FIXME: subfo 2, 3, 4 +# FIXME: subfo. 2, 3, 4 +# CHECK: addic 2, 3, 128 # encoding: [0x30,0x43,0x00,0x80] + addic 2, 3, 128 +# CHECK: addic. 2, 3, 128 # encoding: [0x34,0x43,0x00,0x80] + addic. 2, 3, 128 +# CHECK: subfic 2, 3, 4 # encoding: [0x20,0x43,0x00,0x04] + subfic 2, 3, 4 + +# CHECK: addc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x14] + addc 2, 3, 4 +# CHECK: addc. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x15] + addc. 2, 3, 4 +# FIXME: addco 2, 3, 4 +# FIXME: addco. 2, 3, 4 +# CHECK: subfc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x10] + subfc 2, 3, 4 +# CHECK: subfc 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x10] + subfc 2, 3, 4 +# FIXME: subfco 2, 3, 4 +# FIXME: subfco. 2, 3, 4 + +# CHECK: adde 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x14] + adde 2, 3, 4 +# CHECK: adde. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x15] + adde. 2, 3, 4 +# FIXME: addeo 2, 3, 4 +# FIXME: addeo. 2, 3, 4 +# CHECK: subfe 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x10] + subfe 2, 3, 4 +# CHECK: subfe. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0x11] + subfe. 2, 3, 4 +# FIXME: subfeo 2, 3, 4 +# FIXME: subfeo. 2, 3, 4 + +# CHECK: addme 2, 3 # encoding: [0x7c,0x43,0x01,0xd4] + addme 2, 3 +# CHECK: addme. 2, 3 # encoding: [0x7c,0x43,0x01,0xd5] + addme. 2, 3 +# FIXME: addmeo 2, 3 +# FIXME: addmeo. 2, 3 +# CHECK: subfme 2, 3 # encoding: [0x7c,0x43,0x01,0xd0] + subfme 2, 3 +# CHECK: subfme. 2, 3 # encoding: [0x7c,0x43,0x01,0xd1] + subfme. 2, 3 +# FIXME: subfmeo 2, 3 +# FIXME: subfmeo. 2, 3 + +# CHECK: addze 2, 3 # encoding: [0x7c,0x43,0x01,0x94] + addze 2, 3 +# CHECK: addze. 2, 3 # encoding: [0x7c,0x43,0x01,0x95] + addze. 2, 3 +# FIXME: addzeo 2, 3 +# FIXME: addzeo. 2, 3 +# CHECK: subfze 2, 3 # encoding: [0x7c,0x43,0x01,0x90] + subfze 2, 3 +# CHECK: subfze. 2, 3 # encoding: [0x7c,0x43,0x01,0x91] + subfze. 2, 3 +# FIXME: subfzeo 2, 3 +# FIXME: subfzeo. 2, 3 + +# CHECK: neg 2, 3 # encoding: [0x7c,0x43,0x00,0xd0] + neg 2, 3 +# CHECK: neg. 2, 3 # encoding: [0x7c,0x43,0x00,0xd1] + neg. 2, 3 +# FIXME: nego 2, 3 +# FIXME: nego. 2, 3 + +# CHECK: mulli 2, 3, 128 # encoding: [0x1c,0x43,0x00,0x80] + mulli 2, 3, 128 +# CHECK: mulhw 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x96] + mulhw 2, 3, 4 +# CHECK: mulhw. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x97] + mulhw. 2, 3, 4 +# CHECK: mullw 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd6] + mullw 2, 3, 4 +# CHECK: mullw. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd7] + mullw. 2, 3, 4 +# FIXME: mullwo 2, 3, 4 +# FIXME: mullwo. 2, 3, 4 +# CHECK: mulhwu 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x16] + mulhwu 2, 3, 4 +# CHECK: mulhwu. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x17] + mulhwu. 2, 3, 4 + +# CHECK: divw 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd6] + divw 2, 3, 4 +# CHECK: divw. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd7] + divw. 2, 3, 4 +# FIXME: divwo 2, 3, 4 +# FIXME: divwo. 2, 3, 4 +# CHECK: divwu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x96] + divwu 2, 3, 4 +# CHECK: divwu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x97] + divwu. 2, 3, 4 +# FIXME: divwuo 2, 3, 4 +# FIXME: divwuo. 2, 3, 4 +# FIXME: divwe 2, 3, 4 +# FIXME: divwe. 2, 3, 4 +# FIXME: divweo 2, 3, 4 +# FIXME: divweo. 2, 3, 4 +# FIXME: divweu 2, 3, 4 +# FIXME: divweu. 2, 3, 4 +# FIXME: divweuo 2, 3, 4 +# FIXME: divweuo. 2, 3, 4 + +# CHECK: mulld 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd2] + mulld 2, 3, 4 +# CHECK: mulld. 2, 3, 4 # encoding: [0x7c,0x43,0x21,0xd3] + mulld. 2, 3, 4 +# FIXME: mulldo 2, 3, 4 +# FIXME: mulldo. 2, 3, 4 +# CHECK: mulhd 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x92] + mulhd 2, 3, 4 +# CHECK: mulhd. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x93] + mulhd. 2, 3, 4 +# CHECK: mulhdu 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x12] + mulhdu 2, 3, 4 +# CHECK: mulhdu. 2, 3, 4 # encoding: [0x7c,0x43,0x20,0x13] + mulhdu. 2, 3, 4 + +# CHECK: divd 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd2] + divd 2, 3, 4 +# CHECK: divd. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0xd3] + divd. 2, 3, 4 +# FIXME: divdo 2, 3, 4 +# FIXME: divdo. 2, 3, 4 +# CHECK: divdu 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x92] + divdu 2, 3, 4 +# CHECK: divdu. 2, 3, 4 # encoding: [0x7c,0x43,0x23,0x93] + divdu. 2, 3, 4 +# FIXME: divduo 2, 3, 4 +# FIXME: divduo. 2, 3, 4 +# FIXME: divde 2, 3, 4 +# FIXME: divde. 2, 3, 4 +# FIXME: divdeo 2, 3, 4 +# FIXME: divdeo. 2, 3, 4 +# FIXME: divdeu 2, 3, 4 +# FIXME: divdeu. 2, 3, 4 +# FIXME: divdeuo 2, 3, 4 +# FIXME: divdeuo. 2, 3, 4 + +# FIXME: Fixed-point compare instructions + +# FIXME: Fixed-point trap instructions + +# Fixed-point select + +# CHECK: isel 2, 3, 4, 5 # encoding: [0x7c,0x43,0x21,0x5e] + isel 2, 3, 4, 5 + +# Fixed-point logical instructions + +# CHECK: andi. 2, 3, 128 # encoding: [0x70,0x62,0x00,0x80] + andi. 2, 3, 128 +# CHECK: andis. 2, 3, 128 # encoding: [0x74,0x62,0x00,0x80] + andis. 2, 3, 128 +# CHECK: ori 2, 3, 128 # encoding: [0x60,0x62,0x00,0x80] + ori 2, 3, 128 +# CHECK: oris 2, 3, 128 # encoding: [0x64,0x62,0x00,0x80] + oris 2, 3, 128 +# CHECK: xori 2, 3, 128 # encoding: [0x68,0x62,0x00,0x80] + xori 2, 3, 128 +# CHECK: xoris 2, 3, 128 # encoding: [0x6c,0x62,0x00,0x80] + xoris 2, 3, 128 +# CHECK: and 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x38] + and 2, 3, 4 +# CHECK: and. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x39] + and. 2, 3, 4 +# CHECK: xor 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x78] + xor 2, 3, 4 +# CHECK: xor. 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x79] + xor. 2, 3, 4 +# CHECK: nand 2, 3, 4 # encoding: [0x7c,0x62,0x23,0xb8] + nand 2, 3, 4 +# CHECK: nand. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0xb9] + nand. 2, 3, 4 +# CHECK: or 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x78] + or 2, 3, 4 +# CHECK: or. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x79] + or. 2, 3, 4 +# CHECK: nor 2, 3, 4 # encoding: [0x7c,0x62,0x20,0xf8] + nor 2, 3, 4 +# CHECK: nor. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0xf9] + nor. 2, 3, 4 +# CHECK: eqv 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x38] + eqv 2, 3, 4 +# CHECK: eqv. 2, 3, 4 # encoding: [0x7c,0x62,0x22,0x39] + eqv. 2, 3, 4 +# CHECK: andc 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x78] + andc 2, 3, 4 +# CHECK: andc. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x79] + andc. 2, 3, 4 +# CHECK: orc 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x38] + orc 2, 3, 4 +# CHECK: orc. 2, 3, 4 # encoding: [0x7c,0x62,0x23,0x39] + orc. 2, 3, 4 + +# CHECK: extsb 2, 3 # encoding: [0x7c,0x62,0x07,0x74] + extsb 2, 3 +# CHECK: extsb. 2, 3 # encoding: [0x7c,0x62,0x07,0x75] + extsb. 2, 3 +# CHECK: extsh 2, 3 # encoding: [0x7c,0x62,0x07,0x34] + extsh 2, 3 +# CHECK: extsh. 2, 3 # encoding: [0x7c,0x62,0x07,0x35] + extsh. 2, 3 + +# CHECK: cntlzw 2, 3 # encoding: [0x7c,0x62,0x00,0x34] + cntlzw 2, 3 +# CHECK: cntlzw. 2, 3 # encoding: [0x7c,0x62,0x00,0x35] + cntlzw. 2, 3 +# FIXME: cmpb 2, 3, 4 +# FIXME: popcntb 2, 3 +# CHECK: popcntw 2, 3 # encoding: [0x7c,0x62,0x02,0xf4] + popcntw 2, 3 +# FIXME: prtyd 2, 3 +# FIXME: prtyw 2, 3 + +# CHECK: extsw 2, 3 # encoding: [0x7c,0x62,0x07,0xb4] + extsw 2, 3 +# CHECK: extsw. 2, 3 # encoding: [0x7c,0x62,0x07,0xb5] + extsw. 2, 3 + +# CHECK: cntlzd 2, 3 # encoding: [0x7c,0x62,0x00,0x74] + cntlzd 2, 3 +# CHECK: cntlzd. 2, 3 # encoding: [0x7c,0x62,0x00,0x75] + cntlzd. 2, 3 +# CHECK: popcntd 2, 3 # encoding: [0x7c,0x62,0x03,0xf4] + popcntd 2, 3 +# FIXME: bpermd 2, 3, 4 + +# Fixed-point rotate and shift instructions + +# CHECK: rlwinm 2, 3, 4, 5, 6 # encoding: [0x54,0x62,0x21,0x4c] + rlwinm 2, 3, 4, 5, 6 +# CHECK: rlwinm. 2, 3, 4, 5, 6 # encoding: [0x54,0x62,0x21,0x4d] + rlwinm. 2, 3, 4, 5, 6 +# CHECK: rlwnm 2, 3, 4, 5, 6 # encoding: [0x5c,0x62,0x21,0x4c] + rlwnm 2, 3, 4, 5, 6 +# CHECK: rlwnm. 2, 3, 4, 5, 6 # encoding: [0x5c,0x62,0x21,0x4d] + rlwnm. 2, 3, 4, 5, 6 +# CHECK: rlwimi 2, 3, 4, 5, 6 # encoding: [0x50,0x62,0x21,0x4c] + rlwimi 2, 3, 4, 5, 6 +# CHECK: rlwimi. 2, 3, 4, 5, 6 # encoding: [0x50,0x62,0x21,0x4d] + rlwimi. 2, 3, 4, 5, 6 +# CHECK: rldicl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x40] + rldicl 2, 3, 4, 5 +# CHECK: rldicl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x41] + rldicl. 2, 3, 4, 5 +# CHECK: rldicr 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x44] + rldicr 2, 3, 4, 5 +# CHECK: rldicr. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x45] + rldicr. 2, 3, 4, 5 +# FIXME: rldic 2, 3, 4, 5 +# FIXME: rldic. 2, 3, 4, 5 +# CHECK: rldcl 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x50] + rldcl 2, 3, 4, 5 +# CHECK: rldcl. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x51] + rldcl. 2, 3, 4, 5 +# FIXME: rldcr 2, 3, 4, 5 +# FIXME: rldcr. 2, 3, 4, 5 +# CHECK: rldimi 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4c] + rldimi 2, 3, 4, 5 +# CHECK: rldimi. 2, 3, 4, 5 # encoding: [0x78,0x62,0x21,0x4d] + rldimi. 2, 3, 4, 5 + +# CHECK: slw 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x30] + slw 2, 3, 4 +# CHECK: slw. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x31] + slw. 2, 3, 4 +# CHECK: srw 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x30] + srw 2, 3, 4 +# CHECK: srw. 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x31] + srw. 2, 3, 4 +# CHECK: srawi 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x70] + srawi 2, 3, 4 +# CHECK: srawi. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x71] + srawi. 2, 3, 4 +# CHECK: sraw 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x30] + sraw 2, 3, 4 +# CHECK: sraw. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x31] + sraw. 2, 3, 4 +# CHECK: sld 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x36] + sld 2, 3, 4 +# CHECK: sld. 2, 3, 4 # encoding: [0x7c,0x62,0x20,0x37] + sld. 2, 3, 4 +# CHECK: srd 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x36] + srd 2, 3, 4 +# CHECK: srd. 2, 3, 4 # encoding: [0x7c,0x62,0x24,0x37] + srd. 2, 3, 4 +# CHECK: sradi 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x74] + sradi 2, 3, 4 +# CHECK: sradi. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x75] + sradi. 2, 3, 4 +# CHECK: srad 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x34] + srad 2, 3, 4 +# CHECK: srad. 2, 3, 4 # encoding: [0x7c,0x62,0x26,0x35] + srad. 2, 3, 4 + +# FIXME: BCD assist instructions + +# Move to/from system register instructions + +# FIXME: mtspr 256, 2 +# FIXME: mfspr 2, 256 +# CHECK: mtcrf 16, 2 # encoding: [0x7c,0x41,0x01,0x20] + mtcrf 16, 2 +# CHECK: mfcr 2 # encoding: [0x7c,0x40,0x00,0x26] + mfcr 2 +# FIXME: mtocrf 16, 2 +# CHECK: mfocrf 16, 8 # encoding: [0x7e,0x10,0x80,0x26] + mfocrf 16, 8 +# FIXME: mcrxr 2 + diff --git a/test/MC/PowerPC/ppc64-errors.s b/test/MC/PowerPC/ppc64-errors.s new file mode 100644 index 000000000000..1da575304609 --- /dev/null +++ b/test/MC/PowerPC/ppc64-errors.s @@ -0,0 +1,80 @@ + +# RUN: not llvm-mc -triple powerpc64-unknown-unknown < %s 2> %t +# RUN: FileCheck < %t %s + +# Register operands + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: add 32, 32, 32 + add 32, 32, 32 + +# CHECK: error: invalid register name +# CHECK-NEXT: add %r32, %r32, %r32 + add %r32, %r32, %r32 + +# Signed 16-bit immediate operands + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: addi 1, 0, -32769 + addi 1, 0, -32769 + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: addi 1, 0, 32768 + addi 1, 0, 32768 + +# Unsigned 16-bit immediate operands + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ori 1, 2, -1 + ori 1, 2, -1 + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ori 1, 2, 65536 + ori 1, 2, 65536 + +# D-Form memory operands + +# CHECK: error: invalid register number +# CHECK-NEXT: lwz 1, 0(32) + lwz 1, 0(32) + +# CHECK: error: invalid register name +# CHECK-NEXT: lwz 1, 0(%r32) + lwz 1, 0(%r32) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: lwz 1, -32769(2) + lwz 1, -32769(2) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: lwz 1, 32768(2) + lwz 1, 32768(2) + +# CHECK: error: invalid register number +# CHECK-NEXT: ld 1, 0(32) + ld 1, 0(32) + +# CHECK: error: invalid register name +# CHECK-NEXT: ld 1, 0(%r32) + ld 1, 0(%r32) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ld 1, 1(2) + ld 1, 1(2) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ld 1, 2(2) + ld 1, 2(2) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ld 1, 3(2) + ld 1, 3(2) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ld 1, -32772(2) + ld 1, -32772(2) + +# CHECK: error: invalid operand for instruction +# CHECK-NEXT: ld 1, 32768(2) + ld 1, 32768(2) + diff --git a/test/MC/PowerPC/ppc64-fixups.s b/test/MC/PowerPC/ppc64-fixups.s new file mode 100644 index 000000000000..1dcbca8f8189 --- /dev/null +++ b/test/MC/PowerPC/ppc64-fixups.s @@ -0,0 +1,95 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# FIXME: .TOC.@tocbase + +# CHECK: li 3, target@l # encoding: [0x38,0x60,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_lo16 + li 3, target@l + +# CHECK: addis 3, 3, target@ha # encoding: [0x3c,0x63,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@ha, kind: fixup_ppc_ha16 + addis 3, 3, target@ha + +# CHECK: lis 3, target@ha # encoding: [0x3c,0x60,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@ha, kind: fixup_ppc_ha16 + lis 3, target@ha + +# CHECK: addi 4, 3, target@l # encoding: [0x38,0x83,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_lo16 + addi 4, 3, target@l + +# CHECK: lwz 1, target@l(3) # encoding: [0x80,0x23,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_lo16 + lwz 1, target@l(3) + +# CHECK: ld 1, target@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_lo16_ds + ld 1, target@l(3) + +# CHECK: ld 1, target@toc(2) # encoding: [0xe8,0x22,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target@toc, kind: fixup_ppc_lo16_ds + ld 1, target@toc(2) + +# CHECK: addis 3, 2, target@toc@ha # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@toc@ha, kind: fixup_ppc_ha16 + addis 3, 2, target@toc@ha + +# CHECK: addi 4, 3, target@toc@l # encoding: [0x38,0x83,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@toc@l, kind: fixup_ppc_lo16 + addi 4, 3, target@toc@l + +# CHECK: lwz 1, target@toc@l(3) # encoding: [0x80,0x23,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@toc@l, kind: fixup_ppc_lo16 + lwz 1, target@toc@l(3) + +# CHECK: ld 1, target@toc@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target@toc@l, kind: fixup_ppc_lo16_ds + ld 1, target@toc@l(3) + +# FIXME: @tls + + +# CHECK: addis 3, 2, target@tprel@ha # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@tprel@ha, kind: fixup_ppc_ha16 + addis 3, 2, target@tprel@ha + +# CHECK: addi 3, 3, target@tprel@l # encoding: [0x38,0x63,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@tprel@l, kind: fixup_ppc_lo16 + addi 3, 3, target@tprel@l + +# CHECK: addis 3, 2, target@dtprel@ha # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@dtprel@ha, kind: fixup_ppc_ha16 + addis 3, 2, target@dtprel@ha + +# CHECK: addi 3, 3, target@dtprel@l # encoding: [0x38,0x63,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@dtprel@l, kind: fixup_ppc_lo16 + addi 3, 3, target@dtprel@l + + +# CHECK: addis 3, 2, target@got@tprel@ha # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@got@tprel@ha, kind: fixup_ppc_ha16 + addis 3, 2, target@got@tprel@ha + +# CHECK: ld 1, target@got@tprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target@got@tprel@l, kind: fixup_ppc_lo16_ds + ld 1, target@got@tprel@l(3) + + +# CHECK: addis 3, 2, target@got@tlsgd@ha # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@got@tlsgd@ha, kind: fixup_ppc_ha16 + addis 3, 2, target@got@tlsgd@ha + +# CHECK: addi 3, 3, target@got@tlsgd@l # encoding: [0x38,0x63,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@got@tlsgd@l, kind: fixup_ppc_lo16 + addi 3, 3, target@got@tlsgd@l + + +# CHECK: addis 3, 2, target@got@tlsld@ha # encoding: [0x3c,0x62,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@got@tlsld@ha, kind: fixup_ppc_ha16 + addis 3, 2, target@got@tlsld@ha + +# CHECK: addi 3, 3, target@got@tlsld@l # encoding: [0x38,0x63,A,A] +# CHECK-NEXT: # fixup A - offset: 0, value: target@got@tlsld@l, kind: fixup_ppc_lo16 + addi 3, 3, target@got@tlsld@l + diff --git a/test/MC/PowerPC/ppc64-initial-cfa.ll b/test/MC/PowerPC/ppc64-initial-cfa.ll index 16236c9c650d..23a77384ecd0 100644 --- a/test/MC/PowerPC/ppc64-initial-cfa.ll +++ b/test/MC/PowerPC/ppc64-initial-cfa.ll @@ -1,7 +1,7 @@ ; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj -relocation-model=static %s -o - | \ -; RUN: elf-dump --dump-section-data | FileCheck %s -check-prefix=STATIC +; RUN: llvm-readobj -s -sr -sd | FileCheck %s -check-prefix=STATIC ; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj -relocation-model=pic %s -o - | \ -; RUN: elf-dump --dump-section-data | FileCheck %s -check-prefix=PIC +; RUN: llvm-readobj -s -sr -sd | FileCheck %s -check-prefix=PIC ; FIXME: this file should be in .s form, change when asm parser is available. @@ -10,69 +10,75 @@ entry: ret void } -; STATIC: ('sh_name', 0x{{.*}}) # '.eh_frame' -; STATIC-NEXT: ('sh_type', 0x00000001) -; STATIC-NEXT: ('sh_flags', 0x0000000000000002) -; STATIC-NEXT: ('sh_addr', 0x{{.*}}) -; STATIC-NEXT: ('sh_offset', 0x{{.*}}) -; STATIC-NEXT: ('sh_size', 0x0000000000000028) -; STATIC-NEXT: ('sh_link', 0x00000000) -; STATIC-NEXT: ('sh_info', 0x00000000) -; STATIC-NEXT: ('sh_addralign', 0x0000000000000008) -; STATIC-NEXT: ('sh_entsize', 0x0000000000000000) -; STATIC-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 1b0c0100 00000010 00000018 00000000 00000010 00000000') +; STATIC: Section { +; STATIC: Name: .eh_frame +; STATIC-NEXT: Type: SHT_PROGBITS +; STATIC-NEXT: Flags [ (0x2) +; STATIC-NEXT: SHF_ALLOC +; STATIC-NEXT: ] +; STATIC-NEXT: Address: +; STATIC-NEXT: Offset: +; STATIC-NEXT: Size: 40 +; STATIC-NEXT: Link: 0 +; STATIC-NEXT: Info: 0 +; STATIC-NEXT: AddressAlignment: 8 +; STATIC-NEXT: EntrySize: +; STATIC-NEXT: Relocations [ +; STATIC-NEXT: 0x1C R_PPC64_REL32 .text 0x0 +; STATIC-NEXT: ] +; STATIC-NEXT: SectionData ( +; STATIC-NEXT: 0000: 00000010 00000000 017A5200 01784101 +; STATIC-NEXT: 0010: 1B0C0100 00000010 00000018 00000000 +; STATIC-NEXT: 0020: 00000010 00000000 +; STATIC-NEXT: ) +; STATIC-NEXT: } -; STATIC: ('sh_name', 0x{{.*}}) # '.rela.eh_frame' -; STATIC-NEXT: ('sh_type', 0x00000004) -; STATIC-NEXT: ('sh_flags', 0x0000000000000000) -; STATIC-NEXT: ('sh_addr', 0x{{.*}}) -; STATIC-NEXT: ('sh_offset', 0x{{.*}}) -; STATIC-NEXT: ('sh_size', 0x0000000000000018) -; STATIC-NEXT: ('sh_link', 0x{{.*}}) -; STATIC-NEXT: ('sh_info', 0x{{.*}}) -; STATIC-NEXT: ('sh_addralign', 0x0000000000000008) -; STATIC-NEXT: ('sh_entsize', 0x0000000000000018) -; STATIC-NEXT: ('_relocations', [ +; STATIC: Section { +; STATIC: Name: .rela.eh_frame +; STATIC-NEXT: Type: SHT_RELA +; STATIC-NEXT: Flags [ (0x0) +; STATIC-NEXT: ] +; STATIC-NEXT: Address: +; STATIC-NEXT: Offset: +; STATIC-NEXT: Size: 24 +; STATIC-NEXT: Link: +; STATIC-NEXT: Info: +; STATIC-NEXT: AddressAlignment: 8 +; STATIC-NEXT: EntrySize: 24 -; Static build should create R_PPC64_REL32 relocations -; STATIC-NEXT: # Relocation 0 -; STATIC-NEXT: (('r_offset', 0x000000000000001c) -; STATIC-NEXT: ('r_sym', 0x{{.*}}) -; STATIC-NEXT: ('r_type', 0x0000001a) -; STATIC-NEXT: ('r_addend', 0x0000000000000000) -; STATIC-NEXT: ), -; STATIC-NEXT: ]) +; PIC: Section { +; PIC: Name: .eh_frame +; PIC-NEXT: Type: SHT_PROGBITS +; PIC-NEXT: Flags [ (0x2) +; PIC-NEXT: SHF_ALLOC +; PIC-NEXT: ] +; PIC-NEXT: Address: +; PIC-NEXT: Offset: +; PIC-NEXT: Size: 40 +; PIC-NEXT: Link: 0 +; PIC-NEXT: Info: 0 +; PIC-NEXT: AddressAlignment: 8 +; PIC-NEXT: EntrySize: 0 +; PIC-NEXT: Relocations [ +; PIC-NEXT: 0x1C R_PPC64_REL32 .text 0x0 +; PIC-NEXT: ] +; PIC-NEXT: SectionData ( +; PIC-NEXT: 0000: 00000010 00000000 017A5200 01784101 +; PIC-NEXT: 0010: 1B0C0100 00000010 00000018 00000000 +; PIC-NEXT: 0020: 00000010 00000000 +; PIC-NEXT: ) +; PIC-NEXT: } -; PIC: ('sh_name', 0x{{.*}}) # '.eh_frame' -; PIC-NEXT: ('sh_type', 0x00000001) -; PIC-NEXT: ('sh_flags', 0x0000000000000002) -; PIC-NEXT: ('sh_addr', 0x{{.*}}) -; PIC-NEXT: ('sh_offset', 0x{{.*}}) -; PIC-NEXT: ('sh_size', 0x0000000000000028) -; PIC-NEXT: ('sh_link', 0x00000000) -; PIC-NEXT: ('sh_info', 0x00000000) -; PIC-NEXT: ('sh_addralign', 0x0000000000000008) -; PIC-NEXT: ('sh_entsize', 0x0000000000000000) -; PIC-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 1b0c0100 00000010 00000018 00000000 00000010 00000000') - -; PIC: ('sh_name', 0x{{.*}}) # '.rela.eh_frame' -; PIC-NEXT: ('sh_type', 0x00000004) -; PIC-NEXT: ('sh_flags', 0x0000000000000000) -; PIC-NEXT: ('sh_addr', 0x{{.*}}) -; PIC-NEXT: ('sh_offset', 0x{{.*}}) -; PIC-NEXT: ('sh_size', 0x0000000000000018) -; PIC-NEXT: ('sh_link', 0x{{.*}}) -; PIC-NEXT: ('sh_info', 0x{{.*}}) -; PIC-NEXT: ('sh_addralign', 0x0000000000000008) -; PIC-NEXT: ('sh_entsize', 0x0000000000000018) -; PIC-NEXT: ('_relocations', [ - -; PIC build should create R_PPC64_REL32 relocations -; PIC-NEXT: # Relocation 0 -; PIC-NEXT: (('r_offset', 0x000000000000001c) -; PIC-NEXT: ('r_sym', 0x{{.*}}) -; PIC-NEXT: ('r_type', 0x0000001a) -; PIC-NEXT: ('r_addend', 0x0000000000000000) -; PIC-NEXT: ), -; PIC-NEXT: ]) +; PIC: Section { +; PIC: Name: .rela.eh_frame +; PIC-NEXT: Type: SHT_RELA +; PIC-NEXT: Flags [ (0x0) +; PIC-NEXT: ] +; PIC-NEXT: Address: +; PIC-NEXT: Offset: +; PIC-NEXT: Size: 24 +; PIC-NEXT: Link: +; PIC-NEXT: Info: +; PIC-NEXT: AddressAlignment: 8 +; PIC-NEXT: EntrySize: 24 diff --git a/test/MC/PowerPC/ppc64-operands.s b/test/MC/PowerPC/ppc64-operands.s new file mode 100644 index 000000000000..de5fcb0e8d2e --- /dev/null +++ b/test/MC/PowerPC/ppc64-operands.s @@ -0,0 +1,87 @@ + +# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck %s + +# Register operands + +# CHECK: add 1, 2, 3 # encoding: [0x7c,0x22,0x1a,0x14] + add 1, 2, 3 + +# CHECK: add 1, 2, 3 # encoding: [0x7c,0x22,0x1a,0x14] + add %r1, %r2, %r3 + +# CHECK: add 0, 0, 0 # encoding: [0x7c,0x00,0x02,0x14] + add 0, 0, 0 + +# CHECK: add 31, 31, 31 # encoding: [0x7f,0xff,0xfa,0x14] + add 31, 31, 31 + +# CHECK: addi 1, 0, 0 # encoding: [0x38,0x20,0x00,0x00] + addi 1, 0, 0 + +# CHECK: addi 1, 0, 0 # encoding: [0x38,0x20,0x00,0x00] + addi 1, %r0, 0 + +# Signed 16-bit immediate operands + +# CHECK: addi 1, 2, 0 # encoding: [0x38,0x22,0x00,0x00] + addi 1, 2, 0 + +# CHECK: addi 1, 0, -32768 # encoding: [0x38,0x20,0x80,0x00] + addi 1, 0, -32768 + +# CHECK: addi 1, 0, 32767 # encoding: [0x38,0x20,0x7f,0xff] + addi 1, 0, 32767 + +# Unsigned 16-bit immediate operands + +# CHECK: ori 1, 2, 0 # encoding: [0x60,0x41,0x00,0x00] + ori 1, 2, 0 + +# CHECK: ori 1, 2, 65535 # encoding: [0x60,0x41,0xff,0xff] + ori 1, 2, 65535 + +# D-Form memory operands + +# CHECK: lwz 1, 0(0) # encoding: [0x80,0x20,0x00,0x00] + lwz 1, 0(0) + +# CHECK: lwz 1, 0(0) # encoding: [0x80,0x20,0x00,0x00] + lwz 1, 0(%r0) + +# CHECK: lwz 1, 0(31) # encoding: [0x80,0x3f,0x00,0x00] + lwz 1, 0(31) + +# CHECK: lwz 1, 0(31) # encoding: [0x80,0x3f,0x00,0x00] + lwz 1, 0(%r31) + +# CHECK: lwz 1, -32768(2) # encoding: [0x80,0x22,0x80,0x00] + lwz 1, -32768(2) + +# CHECK: lwz 1, 32767(2) # encoding: [0x80,0x22,0x7f,0xff] + lwz 1, 32767(2) + + +# CHECK: ld 1, 0(0) # encoding: [0xe8,0x20,0x00,0x00] + ld 1, 0(0) + +# CHECK: ld 1, 0(0) # encoding: [0xe8,0x20,0x00,0x00] + ld 1, 0(%r0) + +# CHECK: ld 1, 0(31) # encoding: [0xe8,0x3f,0x00,0x00] + ld 1, 0(31) + +# CHECK: ld 1, 0(31) # encoding: [0xe8,0x3f,0x00,0x00] + ld 1, 0(%r31) + +# CHECK: ld 1, -32768(2) # encoding: [0xe8,0x22,0x80,0x00] + ld 1, -32768(2) + +# CHECK: ld 1, 32764(2) # encoding: [0xe8,0x22,0x7f,0xfc] + ld 1, 32764(2) + +# CHECK: ld 1, 4(2) # encoding: [0xe8,0x22,0x00,0x04] + ld 1, 4(2) + +# CHECK: ld 1, -4(2) # encoding: [0xe8,0x22,0xff,0xfc] + ld 1, -4(2) + diff --git a/test/MC/PowerPC/ppc64-relocs-01.ll b/test/MC/PowerPC/ppc64-relocs-01.ll index 4919e91400ba..ac8d303dd4cf 100644 --- a/test/MC/PowerPC/ppc64-relocs-01.ll +++ b/test/MC/PowerPC/ppc64-relocs-01.ll @@ -1,6 +1,6 @@ ;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -O3 -code-model=small \ ;; RUN: -filetype=obj %s -o - | \ -;; RUN: elf-dump --dump-section-data | FileCheck %s +;; RUN: llvm-readobj -r | FileCheck %s ;; FIXME: this file need to be in .s form, change when asm parse is done. @@ -22,45 +22,28 @@ entry: ret double %add } +;; CHECK: Relocations [ + ;; The relocations in .rela.text are the 'number64' load using a ;; R_PPC64_TOC16_DS against the .toc and the 'sin' external function ;; address using a R_PPC64_REL24 -;; CHECK: '.rela.text' -;; CHECK: Relocation 0 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x00000006 -;; CHECK-NEXT: 'r_type', 0x0000003f -;; CHECK: Relocation 1 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x0000000a -;; CHECK-NEXT: 'r_type', 0x0000000a +;; CHECK: Section ({{[0-9]+}}) .text { +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_DS .toc +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_REL24 sin +;; CHECK-NEXT: } ;; The .opd entry for the 'access_int64' function creates 2 relocations: ;; 1. A R_PPC64_ADDR64 against the .text segment plus addend (the function ; address itself); ;; 2. And a R_PPC64_TOC against no symbol (the linker will replace for the ;; module's TOC base). -;; CHECK: '.rela.opd' -;; CHECK: Relocation 0 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x00000002 -;; CHECK-NEXT: 'r_type', 0x00000026 -;; CHECK: Relocation 1 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x00000000 -;; CHECK-NEXT: 'r_type', 0x00000033 +;; CHECK: Section ({{[0-9]+}}) .opd { +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_ADDR64 .text 0x0 +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC - 0x0 ;; Finally the TOC creates the relocation for the 'number64'. -;; CHECK: '.rela.toc' -;; CHECK: Relocation 0 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x00000008 -;; CHECK-NEXT: 'r_type', 0x00000026 +;; CHECK: Section ({{[0-9]+}}) .toc { +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_ADDR64 number64 0x0 +;; CHECK-NEXT: } -;; Check if the relocation references are for correct symbols. -;; CHECK: Symbol 7 -;; CHECK-NEXT: 'access_int64' -;; CHECK: Symbol 8 -;; CHECK-NEXT: 'number64' -;; CHECK: Symbol 10 -;; CHECK-NEXT: 'sin' +;; CHECK-NEXT: ] diff --git a/test/MC/PowerPC/ppc64-tls-relocs-01.ll b/test/MC/PowerPC/ppc64-tls-relocs-01.ll index 5e3731107522..4e901e816a68 100644 --- a/test/MC/PowerPC/ppc64-tls-relocs-01.ll +++ b/test/MC/PowerPC/ppc64-tls-relocs-01.ll @@ -1,5 +1,5 @@ ;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj %s -o - | \ -;; RUN: elf-dump --dump-section-data | FileCheck %s +;; RUN: llvm-readobj -r | FileCheck %s ;; FIXME: this file should be in .s form, change when asm parser is available. @@ -12,17 +12,8 @@ entry: ;; Check for a pair of R_PPC64_TPREL16_HA / R_PPC64_TPREL16_LO relocs ;; against the thread-local symbol 't'. -;; CHECK: '.rela.text' -;; CHECK: Relocation 0 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x00000008 -;; CHECK-NEXT: 'r_type', 0x00000048 -;; CHECK: Relocation 1 -;; CHECK-NEXT: 'r_offset', -;; CHECK-NEXT: 'r_sym', 0x00000008 -;; CHECK-NEXT: 'r_type', 0x00000046 - -;; Check that we got the correct symbol. -;; CHECK: Symbol 8 -;; CHECK-NEXT: 't' - +;; CHECK: Relocations [ +;; CHECK: Section ({{[0-9]+}}) .text { +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TPREL16_HA t +;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TPREL16_LO t +;; CHECK-NEXT: } diff --git a/test/MC/SystemZ/insn-a-01.s b/test/MC/SystemZ/insn-a-01.s new file mode 100644 index 000000000000..7bb94b31ebe8 --- /dev/null +++ b/test/MC/SystemZ/insn-a-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: a %r0, 0 # encoding: [0x5a,0x00,0x00,0x00] +#CHECK: a %r0, 4095 # encoding: [0x5a,0x00,0x0f,0xff] +#CHECK: a %r0, 0(%r1) # encoding: [0x5a,0x00,0x10,0x00] +#CHECK: a %r0, 0(%r15) # encoding: [0x5a,0x00,0xf0,0x00] +#CHECK: a %r0, 4095(%r1,%r15) # encoding: [0x5a,0x01,0xff,0xff] +#CHECK: a %r0, 4095(%r15,%r1) # encoding: [0x5a,0x0f,0x1f,0xff] +#CHECK: a %r15, 0 # encoding: [0x5a,0xf0,0x00,0x00] + + a %r0, 0 + a %r0, 4095 + a %r0, 0(%r1) + a %r0, 0(%r15) + a %r0, 4095(%r1,%r15) + a %r0, 4095(%r15,%r1) + a %r15, 0 diff --git a/test/MC/SystemZ/insn-a-02.s b/test/MC/SystemZ/insn-a-02.s new file mode 100644 index 000000000000..9cc967e0cefb --- /dev/null +++ b/test/MC/SystemZ/insn-a-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: a %r0, -1 +#CHECK: error: invalid operand +#CHECK: a %r0, 4096 + + a %r0, -1 + a %r0, 4096 diff --git a/test/MC/SystemZ/insn-adb-01.s b/test/MC/SystemZ/insn-adb-01.s new file mode 100644 index 000000000000..b54be60c6b53 --- /dev/null +++ b/test/MC/SystemZ/insn-adb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: adb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x1a] +#CHECK: adb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x1a] +#CHECK: adb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x1a] +#CHECK: adb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x1a] +#CHECK: adb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x1a] +#CHECK: adb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x1a] +#CHECK: adb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x1a] + + adb %f0, 0 + adb %f0, 4095 + adb %f0, 0(%r1) + adb %f0, 0(%r15) + adb %f0, 4095(%r1,%r15) + adb %f0, 4095(%r15,%r1) + adb %f15, 0 diff --git a/test/MC/SystemZ/insn-adb-02.s b/test/MC/SystemZ/insn-adb-02.s new file mode 100644 index 000000000000..ff97a51affa8 --- /dev/null +++ b/test/MC/SystemZ/insn-adb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: adb %f0, -1 +#CHECK: error: invalid operand +#CHECK: adb %f0, 4096 + + adb %f0, -1 + adb %f0, 4096 diff --git a/test/MC/SystemZ/insn-adbr-01.s b/test/MC/SystemZ/insn-adbr-01.s new file mode 100644 index 000000000000..05724d2a6a89 --- /dev/null +++ b/test/MC/SystemZ/insn-adbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: adbr %f0, %f0 # encoding: [0xb3,0x1a,0x00,0x00] +#CHECK: adbr %f0, %f15 # encoding: [0xb3,0x1a,0x00,0x0f] +#CHECK: adbr %f7, %f8 # encoding: [0xb3,0x1a,0x00,0x78] +#CHECK: adbr %f15, %f0 # encoding: [0xb3,0x1a,0x00,0xf0] + + adbr %f0, %f0 + adbr %f0, %f15 + adbr %f7, %f8 + adbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-aeb-01.s b/test/MC/SystemZ/insn-aeb-01.s new file mode 100644 index 000000000000..b4268e5c72b6 --- /dev/null +++ b/test/MC/SystemZ/insn-aeb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: aeb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x0a] +#CHECK: aeb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x0a] +#CHECK: aeb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x0a] +#CHECK: aeb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x0a] +#CHECK: aeb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x0a] +#CHECK: aeb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x0a] +#CHECK: aeb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x0a] + + aeb %f0, 0 + aeb %f0, 4095 + aeb %f0, 0(%r1) + aeb %f0, 0(%r15) + aeb %f0, 4095(%r1,%r15) + aeb %f0, 4095(%r15,%r1) + aeb %f15, 0 diff --git a/test/MC/SystemZ/insn-aeb-02.s b/test/MC/SystemZ/insn-aeb-02.s new file mode 100644 index 000000000000..4fade8ecebce --- /dev/null +++ b/test/MC/SystemZ/insn-aeb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: aeb %f0, -1 +#CHECK: error: invalid operand +#CHECK: aeb %f0, 4096 + + aeb %f0, -1 + aeb %f0, 4096 diff --git a/test/MC/SystemZ/insn-aebr-01.s b/test/MC/SystemZ/insn-aebr-01.s new file mode 100644 index 000000000000..2147627e3896 --- /dev/null +++ b/test/MC/SystemZ/insn-aebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: aebr %f0, %f0 # encoding: [0xb3,0x0a,0x00,0x00] +#CHECK: aebr %f0, %f15 # encoding: [0xb3,0x0a,0x00,0x0f] +#CHECK: aebr %f7, %f8 # encoding: [0xb3,0x0a,0x00,0x78] +#CHECK: aebr %f15, %f0 # encoding: [0xb3,0x0a,0x00,0xf0] + + aebr %f0, %f0 + aebr %f0, %f15 + aebr %f7, %f8 + aebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-afi-01.s b/test/MC/SystemZ/insn-afi-01.s new file mode 100644 index 000000000000..f9a911810ca9 --- /dev/null +++ b/test/MC/SystemZ/insn-afi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: afi %r0, -2147483648 # encoding: [0xc2,0x09,0x80,0x00,0x00,0x00] +#CHECK: afi %r0, -1 # encoding: [0xc2,0x09,0xff,0xff,0xff,0xff] +#CHECK: afi %r0, 0 # encoding: [0xc2,0x09,0x00,0x00,0x00,0x00] +#CHECK: afi %r0, 1 # encoding: [0xc2,0x09,0x00,0x00,0x00,0x01] +#CHECK: afi %r0, 2147483647 # encoding: [0xc2,0x09,0x7f,0xff,0xff,0xff] +#CHECK: afi %r15, 0 # encoding: [0xc2,0xf9,0x00,0x00,0x00,0x00] + + afi %r0, -1 << 31 + afi %r0, -1 + afi %r0, 0 + afi %r0, 1 + afi %r0, (1 << 31) - 1 + afi %r15, 0 diff --git a/test/MC/SystemZ/insn-afi-02.s b/test/MC/SystemZ/insn-afi-02.s new file mode 100644 index 000000000000..f848e196a9a7 --- /dev/null +++ b/test/MC/SystemZ/insn-afi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: afi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: afi %r0, (1 << 31) + + afi %r0, (-1 << 31) - 1 + afi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-ag-01.s b/test/MC/SystemZ/insn-ag-01.s new file mode 100644 index 000000000000..63029d75e452 --- /dev/null +++ b/test/MC/SystemZ/insn-ag-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ag %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x08] +#CHECK: ag %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x08] +#CHECK: ag %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x08] +#CHECK: ag %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x08] +#CHECK: ag %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x08] +#CHECK: ag %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x08] +#CHECK: ag %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x08] +#CHECK: ag %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x08] +#CHECK: ag %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x08] +#CHECK: ag %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x08] + + ag %r0, -524288 + ag %r0, -1 + ag %r0, 0 + ag %r0, 1 + ag %r0, 524287 + ag %r0, 0(%r1) + ag %r0, 0(%r15) + ag %r0, 524287(%r1,%r15) + ag %r0, 524287(%r15,%r1) + ag %r15, 0 diff --git a/test/MC/SystemZ/insn-ag-02.s b/test/MC/SystemZ/insn-ag-02.s new file mode 100644 index 000000000000..59694cd7d5a7 --- /dev/null +++ b/test/MC/SystemZ/insn-ag-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ag %r0, -524289 +#CHECK: error: invalid operand +#CHECK: ag %r0, 524288 + + ag %r0, -524289 + ag %r0, 524288 diff --git a/test/MC/SystemZ/insn-agf-01.s b/test/MC/SystemZ/insn-agf-01.s new file mode 100644 index 000000000000..40a985834200 --- /dev/null +++ b/test/MC/SystemZ/insn-agf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: agf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x18] +#CHECK: agf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x18] +#CHECK: agf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x18] +#CHECK: agf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x18] +#CHECK: agf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x18] +#CHECK: agf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x18] +#CHECK: agf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x18] +#CHECK: agf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x18] +#CHECK: agf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x18] +#CHECK: agf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x18] + + agf %r0, -524288 + agf %r0, -1 + agf %r0, 0 + agf %r0, 1 + agf %r0, 524287 + agf %r0, 0(%r1) + agf %r0, 0(%r15) + agf %r0, 524287(%r1,%r15) + agf %r0, 524287(%r15,%r1) + agf %r15, 0 diff --git a/test/MC/SystemZ/insn-agf-02.s b/test/MC/SystemZ/insn-agf-02.s new file mode 100644 index 000000000000..dee31dc1d547 --- /dev/null +++ b/test/MC/SystemZ/insn-agf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: agf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: agf %r0, 524288 + + agf %r0, -524289 + agf %r0, 524288 diff --git a/test/MC/SystemZ/insn-agfi-01.s b/test/MC/SystemZ/insn-agfi-01.s new file mode 100644 index 000000000000..a64721ddd1d8 --- /dev/null +++ b/test/MC/SystemZ/insn-agfi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: agfi %r0, -2147483648 # encoding: [0xc2,0x08,0x80,0x00,0x00,0x00] +#CHECK: agfi %r0, -1 # encoding: [0xc2,0x08,0xff,0xff,0xff,0xff] +#CHECK: agfi %r0, 0 # encoding: [0xc2,0x08,0x00,0x00,0x00,0x00] +#CHECK: agfi %r0, 1 # encoding: [0xc2,0x08,0x00,0x00,0x00,0x01] +#CHECK: agfi %r0, 2147483647 # encoding: [0xc2,0x08,0x7f,0xff,0xff,0xff] +#CHECK: agfi %r15, 0 # encoding: [0xc2,0xf8,0x00,0x00,0x00,0x00] + + agfi %r0, -1 << 31 + agfi %r0, -1 + agfi %r0, 0 + agfi %r0, 1 + agfi %r0, (1 << 31) - 1 + agfi %r15, 0 diff --git a/test/MC/SystemZ/insn-agfi-02.s b/test/MC/SystemZ/insn-agfi-02.s new file mode 100644 index 000000000000..1db3eaae0b6f --- /dev/null +++ b/test/MC/SystemZ/insn-agfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: agfi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: agfi %r0, (1 << 31) + + agfi %r0, (-1 << 31) - 1 + agfi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-agfr-01.s b/test/MC/SystemZ/insn-agfr-01.s new file mode 100644 index 000000000000..cd17db95f91e --- /dev/null +++ b/test/MC/SystemZ/insn-agfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: agfr %r0, %r0 # encoding: [0xb9,0x18,0x00,0x00] +#CHECK: agfr %r0, %r15 # encoding: [0xb9,0x18,0x00,0x0f] +#CHECK: agfr %r15, %r0 # encoding: [0xb9,0x18,0x00,0xf0] +#CHECK: agfr %r7, %r8 # encoding: [0xb9,0x18,0x00,0x78] + + agfr %r0,%r0 + agfr %r0,%r15 + agfr %r15,%r0 + agfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-aghi-01.s b/test/MC/SystemZ/insn-aghi-01.s new file mode 100644 index 000000000000..cd77c355d241 --- /dev/null +++ b/test/MC/SystemZ/insn-aghi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: aghi %r0, -32768 # encoding: [0xa7,0x0b,0x80,0x00] +#CHECK: aghi %r0, -1 # encoding: [0xa7,0x0b,0xff,0xff] +#CHECK: aghi %r0, 0 # encoding: [0xa7,0x0b,0x00,0x00] +#CHECK: aghi %r0, 1 # encoding: [0xa7,0x0b,0x00,0x01] +#CHECK: aghi %r0, 32767 # encoding: [0xa7,0x0b,0x7f,0xff] +#CHECK: aghi %r15, 0 # encoding: [0xa7,0xfb,0x00,0x00] + + aghi %r0, -32768 + aghi %r0, -1 + aghi %r0, 0 + aghi %r0, 1 + aghi %r0, 32767 + aghi %r15, 0 diff --git a/test/MC/SystemZ/insn-aghi-02.s b/test/MC/SystemZ/insn-aghi-02.s new file mode 100644 index 000000000000..e2657c6869e4 --- /dev/null +++ b/test/MC/SystemZ/insn-aghi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: aghi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: aghi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: aghi %r0, foo + + aghi %r0, -32769 + aghi %r0, 32768 + aghi %r0, foo diff --git a/test/MC/SystemZ/insn-agr-01.s b/test/MC/SystemZ/insn-agr-01.s new file mode 100644 index 000000000000..a84ff3d22620 --- /dev/null +++ b/test/MC/SystemZ/insn-agr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: agr %r0, %r0 # encoding: [0xb9,0x08,0x00,0x00] +#CHECK: agr %r0, %r15 # encoding: [0xb9,0x08,0x00,0x0f] +#CHECK: agr %r15, %r0 # encoding: [0xb9,0x08,0x00,0xf0] +#CHECK: agr %r7, %r8 # encoding: [0xb9,0x08,0x00,0x78] + + agr %r0,%r0 + agr %r0,%r15 + agr %r15,%r0 + agr %r7,%r8 diff --git a/test/MC/SystemZ/insn-agsi-01.s b/test/MC/SystemZ/insn-agsi-01.s new file mode 100644 index 000000000000..9b2fe4b80e81 --- /dev/null +++ b/test/MC/SystemZ/insn-agsi-01.s @@ -0,0 +1,29 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: agsi -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x7a] +#CHECK: agsi -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x7a] +#CHECK: agsi 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x7a] +#CHECK: agsi 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x7a] +#CHECK: agsi 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x7a] +#CHECK: agsi 0, -128 # encoding: [0xeb,0x80,0x00,0x00,0x00,0x7a] +#CHECK: agsi 0, -1 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x7a] +#CHECK: agsi 0, 1 # encoding: [0xeb,0x01,0x00,0x00,0x00,0x7a] +#CHECK: agsi 0, 127 # encoding: [0xeb,0x7f,0x00,0x00,0x00,0x7a] +#CHECK: agsi 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x7a] +#CHECK: agsi 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x7a] +#CHECK: agsi 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x7a] +#CHECK: agsi 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x7a] + + agsi -524288, 0 + agsi -1, 0 + agsi 0, 0 + agsi 1, 0 + agsi 524287, 0 + agsi 0, -128 + agsi 0, -1 + agsi 0, 1 + agsi 0, 127 + agsi 0(%r1), 42 + agsi 0(%r15), 42 + agsi 524287(%r1), 42 + agsi 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-agsi-02.s b/test/MC/SystemZ/insn-agsi-02.s new file mode 100644 index 000000000000..a4b3d9a8883b --- /dev/null +++ b/test/MC/SystemZ/insn-agsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: agsi -524289, 0 +#CHECK: error: invalid operand +#CHECK: agsi 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: agsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: agsi 0, -129 +#CHECK: error: invalid operand +#CHECK: agsi 0, 128 + + agsi -524289, 0 + agsi 524288, 0 + agsi 0(%r1,%r2), 0 + agsi 0, -129 + agsi 0, 128 diff --git a/test/MC/SystemZ/insn-ah-01.s b/test/MC/SystemZ/insn-ah-01.s new file mode 100644 index 000000000000..35012f0678ed --- /dev/null +++ b/test/MC/SystemZ/insn-ah-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ah %r0, 0 # encoding: [0x4a,0x00,0x00,0x00] +#CHECK: ah %r0, 4095 # encoding: [0x4a,0x00,0x0f,0xff] +#CHECK: ah %r0, 0(%r1) # encoding: [0x4a,0x00,0x10,0x00] +#CHECK: ah %r0, 0(%r15) # encoding: [0x4a,0x00,0xf0,0x00] +#CHECK: ah %r0, 4095(%r1,%r15) # encoding: [0x4a,0x01,0xff,0xff] +#CHECK: ah %r0, 4095(%r15,%r1) # encoding: [0x4a,0x0f,0x1f,0xff] +#CHECK: ah %r15, 0 # encoding: [0x4a,0xf0,0x00,0x00] + + ah %r0, 0 + ah %r0, 4095 + ah %r0, 0(%r1) + ah %r0, 0(%r15) + ah %r0, 4095(%r1,%r15) + ah %r0, 4095(%r15,%r1) + ah %r15, 0 diff --git a/test/MC/SystemZ/insn-ah-02.s b/test/MC/SystemZ/insn-ah-02.s new file mode 100644 index 000000000000..1a20cd715f77 --- /dev/null +++ b/test/MC/SystemZ/insn-ah-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ah %r0, -1 +#CHECK: error: invalid operand +#CHECK: ah %r0, 4096 + + ah %r0, -1 + ah %r0, 4096 diff --git a/test/MC/SystemZ/insn-ahi-01.s b/test/MC/SystemZ/insn-ahi-01.s new file mode 100644 index 000000000000..e0a5fb389e6c --- /dev/null +++ b/test/MC/SystemZ/insn-ahi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ahi %r0, -32768 # encoding: [0xa7,0x0a,0x80,0x00] +#CHECK: ahi %r0, -1 # encoding: [0xa7,0x0a,0xff,0xff] +#CHECK: ahi %r0, 0 # encoding: [0xa7,0x0a,0x00,0x00] +#CHECK: ahi %r0, 1 # encoding: [0xa7,0x0a,0x00,0x01] +#CHECK: ahi %r0, 32767 # encoding: [0xa7,0x0a,0x7f,0xff] +#CHECK: ahi %r15, 0 # encoding: [0xa7,0xfa,0x00,0x00] + + ahi %r0, -32768 + ahi %r0, -1 + ahi %r0, 0 + ahi %r0, 1 + ahi %r0, 32767 + ahi %r15, 0 diff --git a/test/MC/SystemZ/insn-ahi-02.s b/test/MC/SystemZ/insn-ahi-02.s new file mode 100644 index 000000000000..d41e2da2a21b --- /dev/null +++ b/test/MC/SystemZ/insn-ahi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ahi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: ahi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: ahi %r0, foo + + ahi %r0, -32769 + ahi %r0, 32768 + ahi %r0, foo diff --git a/test/MC/SystemZ/insn-ahy-01.s b/test/MC/SystemZ/insn-ahy-01.s new file mode 100644 index 000000000000..ff25dc503c6b --- /dev/null +++ b/test/MC/SystemZ/insn-ahy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ahy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x7a] +#CHECK: ahy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x7a] +#CHECK: ahy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x7a] +#CHECK: ahy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x7a] +#CHECK: ahy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x7a] +#CHECK: ahy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x7a] +#CHECK: ahy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x7a] +#CHECK: ahy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x7a] +#CHECK: ahy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x7a] +#CHECK: ahy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x7a] + + ahy %r0, -524288 + ahy %r0, -1 + ahy %r0, 0 + ahy %r0, 1 + ahy %r0, 524287 + ahy %r0, 0(%r1) + ahy %r0, 0(%r15) + ahy %r0, 524287(%r1,%r15) + ahy %r0, 524287(%r15,%r1) + ahy %r15, 0 diff --git a/test/MC/SystemZ/insn-ahy-02.s b/test/MC/SystemZ/insn-ahy-02.s new file mode 100644 index 000000000000..e725e146df56 --- /dev/null +++ b/test/MC/SystemZ/insn-ahy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ahy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: ahy %r0, 524288 + + ahy %r0, -524289 + ahy %r0, 524288 diff --git a/test/MC/SystemZ/insn-al-01.s b/test/MC/SystemZ/insn-al-01.s new file mode 100644 index 000000000000..1efc33f0e980 --- /dev/null +++ b/test/MC/SystemZ/insn-al-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: al %r0, 0 # encoding: [0x5e,0x00,0x00,0x00] +#CHECK: al %r0, 4095 # encoding: [0x5e,0x00,0x0f,0xff] +#CHECK: al %r0, 0(%r1) # encoding: [0x5e,0x00,0x10,0x00] +#CHECK: al %r0, 0(%r15) # encoding: [0x5e,0x00,0xf0,0x00] +#CHECK: al %r0, 4095(%r1,%r15) # encoding: [0x5e,0x01,0xff,0xff] +#CHECK: al %r0, 4095(%r15,%r1) # encoding: [0x5e,0x0f,0x1f,0xff] +#CHECK: al %r15, 0 # encoding: [0x5e,0xf0,0x00,0x00] + + al %r0, 0 + al %r0, 4095 + al %r0, 0(%r1) + al %r0, 0(%r15) + al %r0, 4095(%r1,%r15) + al %r0, 4095(%r15,%r1) + al %r15, 0 diff --git a/test/MC/SystemZ/insn-al-02.s b/test/MC/SystemZ/insn-al-02.s new file mode 100644 index 000000000000..39b1b06a1ba2 --- /dev/null +++ b/test/MC/SystemZ/insn-al-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: al %r0, -1 +#CHECK: error: invalid operand +#CHECK: al %r0, 4096 + + al %r0, -1 + al %r0, 4096 diff --git a/test/MC/SystemZ/insn-alc-01.s b/test/MC/SystemZ/insn-alc-01.s new file mode 100644 index 000000000000..5f8be6a7d5af --- /dev/null +++ b/test/MC/SystemZ/insn-alc-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alc %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x98] +#CHECK: alc %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x98] +#CHECK: alc %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x98] +#CHECK: alc %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x98] +#CHECK: alc %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x98] +#CHECK: alc %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x98] +#CHECK: alc %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x98] +#CHECK: alc %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x98] +#CHECK: alc %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x98] +#CHECK: alc %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x98] + + alc %r0, -524288 + alc %r0, -1 + alc %r0, 0 + alc %r0, 1 + alc %r0, 524287 + alc %r0, 0(%r1) + alc %r0, 0(%r15) + alc %r0, 524287(%r1,%r15) + alc %r0, 524287(%r15,%r1) + alc %r15, 0 diff --git a/test/MC/SystemZ/insn-alc-02.s b/test/MC/SystemZ/insn-alc-02.s new file mode 100644 index 000000000000..9c082f2dfb7a --- /dev/null +++ b/test/MC/SystemZ/insn-alc-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: alc %r0, -524289 +#CHECK: error: invalid operand +#CHECK: alc %r0, 524288 + + alc %r0, -524289 + alc %r0, 524288 diff --git a/test/MC/SystemZ/insn-alcg-01.s b/test/MC/SystemZ/insn-alcg-01.s new file mode 100644 index 000000000000..c05207ec9e98 --- /dev/null +++ b/test/MC/SystemZ/insn-alcg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alcg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x88] +#CHECK: alcg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x88] +#CHECK: alcg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x88] +#CHECK: alcg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x88] +#CHECK: alcg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x88] +#CHECK: alcg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x88] +#CHECK: alcg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x88] +#CHECK: alcg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x88] +#CHECK: alcg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x88] +#CHECK: alcg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x88] + + alcg %r0, -524288 + alcg %r0, -1 + alcg %r0, 0 + alcg %r0, 1 + alcg %r0, 524287 + alcg %r0, 0(%r1) + alcg %r0, 0(%r15) + alcg %r0, 524287(%r1,%r15) + alcg %r0, 524287(%r15,%r1) + alcg %r15, 0 diff --git a/test/MC/SystemZ/insn-alcg-02.s b/test/MC/SystemZ/insn-alcg-02.s new file mode 100644 index 000000000000..3dab6ddc5dd8 --- /dev/null +++ b/test/MC/SystemZ/insn-alcg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: alcg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: alcg %r0, 524288 + + alcg %r0, -524289 + alcg %r0, 524288 diff --git a/test/MC/SystemZ/insn-alcgr-01.s b/test/MC/SystemZ/insn-alcgr-01.s new file mode 100644 index 000000000000..c9f3ce293418 --- /dev/null +++ b/test/MC/SystemZ/insn-alcgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alcgr %r0, %r0 # encoding: [0xb9,0x88,0x00,0x00] +#CHECK: alcgr %r0, %r15 # encoding: [0xb9,0x88,0x00,0x0f] +#CHECK: alcgr %r15, %r0 # encoding: [0xb9,0x88,0x00,0xf0] +#CHECK: alcgr %r7, %r8 # encoding: [0xb9,0x88,0x00,0x78] + + alcgr %r0,%r0 + alcgr %r0,%r15 + alcgr %r15,%r0 + alcgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-alcr-01.s b/test/MC/SystemZ/insn-alcr-01.s new file mode 100644 index 000000000000..7369224a1bea --- /dev/null +++ b/test/MC/SystemZ/insn-alcr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alcr %r0, %r0 # encoding: [0xb9,0x98,0x00,0x00] +#CHECK: alcr %r0, %r15 # encoding: [0xb9,0x98,0x00,0x0f] +#CHECK: alcr %r15, %r0 # encoding: [0xb9,0x98,0x00,0xf0] +#CHECK: alcr %r7, %r8 # encoding: [0xb9,0x98,0x00,0x78] + + alcr %r0,%r0 + alcr %r0,%r15 + alcr %r15,%r0 + alcr %r7,%r8 diff --git a/test/MC/SystemZ/insn-alfi-01.s b/test/MC/SystemZ/insn-alfi-01.s new file mode 100644 index 000000000000..332a74fdc7aa --- /dev/null +++ b/test/MC/SystemZ/insn-alfi-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alfi %r0, 0 # encoding: [0xc2,0x0b,0x00,0x00,0x00,0x00] +#CHECK: alfi %r0, 4294967295 # encoding: [0xc2,0x0b,0xff,0xff,0xff,0xff] +#CHECK: alfi %r15, 0 # encoding: [0xc2,0xfb,0x00,0x00,0x00,0x00] + + alfi %r0, 0 + alfi %r0, (1 << 32) - 1 + alfi %r15, 0 diff --git a/test/MC/SystemZ/insn-alfi-02.s b/test/MC/SystemZ/insn-alfi-02.s new file mode 100644 index 000000000000..a5d38942257b --- /dev/null +++ b/test/MC/SystemZ/insn-alfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: alfi %r0, -1 +#CHECK: error: invalid operand +#CHECK: alfi %r0, (1 << 32) + + alfi %r0, -1 + alfi %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-alg-01.s b/test/MC/SystemZ/insn-alg-01.s new file mode 100644 index 000000000000..6df084c02b2f --- /dev/null +++ b/test/MC/SystemZ/insn-alg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x0a] +#CHECK: alg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x0a] +#CHECK: alg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x0a] +#CHECK: alg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x0a] +#CHECK: alg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x0a] +#CHECK: alg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x0a] +#CHECK: alg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x0a] +#CHECK: alg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x0a] +#CHECK: alg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x0a] +#CHECK: alg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x0a] + + alg %r0, -524288 + alg %r0, -1 + alg %r0, 0 + alg %r0, 1 + alg %r0, 524287 + alg %r0, 0(%r1) + alg %r0, 0(%r15) + alg %r0, 524287(%r1,%r15) + alg %r0, 524287(%r15,%r1) + alg %r15, 0 diff --git a/test/MC/SystemZ/insn-alg-02.s b/test/MC/SystemZ/insn-alg-02.s new file mode 100644 index 000000000000..407d73d2bd57 --- /dev/null +++ b/test/MC/SystemZ/insn-alg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: alg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: alg %r0, 524288 + + alg %r0, -524289 + alg %r0, 524288 diff --git a/test/MC/SystemZ/insn-algf-01.s b/test/MC/SystemZ/insn-algf-01.s new file mode 100644 index 000000000000..751b59059f10 --- /dev/null +++ b/test/MC/SystemZ/insn-algf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: algf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1a] +#CHECK: algf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1a] +#CHECK: algf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1a] +#CHECK: algf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x1a] +#CHECK: algf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x1a] +#CHECK: algf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x1a] +#CHECK: algf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x1a] +#CHECK: algf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x1a] +#CHECK: algf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x1a] +#CHECK: algf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x1a] + + algf %r0, -524288 + algf %r0, -1 + algf %r0, 0 + algf %r0, 1 + algf %r0, 524287 + algf %r0, 0(%r1) + algf %r0, 0(%r15) + algf %r0, 524287(%r1,%r15) + algf %r0, 524287(%r15,%r1) + algf %r15, 0 diff --git a/test/MC/SystemZ/insn-algf-02.s b/test/MC/SystemZ/insn-algf-02.s new file mode 100644 index 000000000000..64ef1c975b7b --- /dev/null +++ b/test/MC/SystemZ/insn-algf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: algf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: algf %r0, 524288 + + algf %r0, -524289 + algf %r0, 524288 diff --git a/test/MC/SystemZ/insn-algfi-01.s b/test/MC/SystemZ/insn-algfi-01.s new file mode 100644 index 000000000000..b6ccb336b3b8 --- /dev/null +++ b/test/MC/SystemZ/insn-algfi-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: algfi %r0, 0 # encoding: [0xc2,0x0a,0x00,0x00,0x00,0x00] +#CHECK: algfi %r0, 4294967295 # encoding: [0xc2,0x0a,0xff,0xff,0xff,0xff] +#CHECK: algfi %r15, 0 # encoding: [0xc2,0xfa,0x00,0x00,0x00,0x00] + + algfi %r0, 0 + algfi %r0, (1 << 32) - 1 + algfi %r15, 0 diff --git a/test/MC/SystemZ/insn-algfi-02.s b/test/MC/SystemZ/insn-algfi-02.s new file mode 100644 index 000000000000..a5ed4b04e55b --- /dev/null +++ b/test/MC/SystemZ/insn-algfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: algfi %r0, -1 +#CHECK: error: invalid operand +#CHECK: algfi %r0, (1 << 32) + + algfi %r0, -1 + algfi %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-algfr-01.s b/test/MC/SystemZ/insn-algfr-01.s new file mode 100644 index 000000000000..3ccb692ab947 --- /dev/null +++ b/test/MC/SystemZ/insn-algfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: algfr %r0, %r0 # encoding: [0xb9,0x1a,0x00,0x00] +#CHECK: algfr %r0, %r15 # encoding: [0xb9,0x1a,0x00,0x0f] +#CHECK: algfr %r15, %r0 # encoding: [0xb9,0x1a,0x00,0xf0] +#CHECK: algfr %r7, %r8 # encoding: [0xb9,0x1a,0x00,0x78] + + algfr %r0,%r0 + algfr %r0,%r15 + algfr %r15,%r0 + algfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-algr-01.s b/test/MC/SystemZ/insn-algr-01.s new file mode 100644 index 000000000000..c3758ee74df4 --- /dev/null +++ b/test/MC/SystemZ/insn-algr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: algr %r0, %r0 # encoding: [0xb9,0x0a,0x00,0x00] +#CHECK: algr %r0, %r15 # encoding: [0xb9,0x0a,0x00,0x0f] +#CHECK: algr %r15, %r0 # encoding: [0xb9,0x0a,0x00,0xf0] +#CHECK: algr %r7, %r8 # encoding: [0xb9,0x0a,0x00,0x78] + + algr %r0,%r0 + algr %r0,%r15 + algr %r15,%r0 + algr %r7,%r8 diff --git a/test/MC/SystemZ/insn-alr-01.s b/test/MC/SystemZ/insn-alr-01.s new file mode 100644 index 000000000000..e85173ef151c --- /dev/null +++ b/test/MC/SystemZ/insn-alr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: alr %r0, %r0 # encoding: [0x1e,0x00] +#CHECK: alr %r0, %r15 # encoding: [0x1e,0x0f] +#CHECK: alr %r15, %r0 # encoding: [0x1e,0xf0] +#CHECK: alr %r7, %r8 # encoding: [0x1e,0x78] + + alr %r0,%r0 + alr %r0,%r15 + alr %r15,%r0 + alr %r7,%r8 diff --git a/test/MC/SystemZ/insn-aly-01.s b/test/MC/SystemZ/insn-aly-01.s new file mode 100644 index 000000000000..94afb07578f4 --- /dev/null +++ b/test/MC/SystemZ/insn-aly-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: aly %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x5e] +#CHECK: aly %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x5e] +#CHECK: aly %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x5e] +#CHECK: aly %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x5e] +#CHECK: aly %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x5e] +#CHECK: aly %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x5e] +#CHECK: aly %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x5e] +#CHECK: aly %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x5e] +#CHECK: aly %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x5e] +#CHECK: aly %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x5e] + + aly %r0, -524288 + aly %r0, -1 + aly %r0, 0 + aly %r0, 1 + aly %r0, 524287 + aly %r0, 0(%r1) + aly %r0, 0(%r15) + aly %r0, 524287(%r1,%r15) + aly %r0, 524287(%r15,%r1) + aly %r15, 0 diff --git a/test/MC/SystemZ/insn-aly-02.s b/test/MC/SystemZ/insn-aly-02.s new file mode 100644 index 000000000000..01c6f3dcdd19 --- /dev/null +++ b/test/MC/SystemZ/insn-aly-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: aly %r0, -524289 +#CHECK: error: invalid operand +#CHECK: aly %r0, 524288 + + aly %r0, -524289 + aly %r0, 524288 diff --git a/test/MC/SystemZ/insn-ar-01.s b/test/MC/SystemZ/insn-ar-01.s new file mode 100644 index 000000000000..7cd627a17021 --- /dev/null +++ b/test/MC/SystemZ/insn-ar-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ar %r0, %r0 # encoding: [0x1a,0x00] +#CHECK: ar %r0, %r15 # encoding: [0x1a,0x0f] +#CHECK: ar %r15, %r0 # encoding: [0x1a,0xf0] +#CHECK: ar %r7, %r8 # encoding: [0x1a,0x78] + + ar %r0,%r0 + ar %r0,%r15 + ar %r15,%r0 + ar %r7,%r8 diff --git a/test/MC/SystemZ/insn-asi-01.s b/test/MC/SystemZ/insn-asi-01.s new file mode 100644 index 000000000000..7a1d241e2356 --- /dev/null +++ b/test/MC/SystemZ/insn-asi-01.s @@ -0,0 +1,29 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: asi -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x6a] +#CHECK: asi -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x6a] +#CHECK: asi 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x6a] +#CHECK: asi 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x6a] +#CHECK: asi 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x6a] +#CHECK: asi 0, -128 # encoding: [0xeb,0x80,0x00,0x00,0x00,0x6a] +#CHECK: asi 0, -1 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x6a] +#CHECK: asi 0, 1 # encoding: [0xeb,0x01,0x00,0x00,0x00,0x6a] +#CHECK: asi 0, 127 # encoding: [0xeb,0x7f,0x00,0x00,0x00,0x6a] +#CHECK: asi 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x6a] +#CHECK: asi 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x6a] +#CHECK: asi 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x6a] +#CHECK: asi 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x6a] + + asi -524288, 0 + asi -1, 0 + asi 0, 0 + asi 1, 0 + asi 524287, 0 + asi 0, -128 + asi 0, -1 + asi 0, 1 + asi 0, 127 + asi 0(%r1), 42 + asi 0(%r15), 42 + asi 524287(%r1), 42 + asi 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-asi-02.s b/test/MC/SystemZ/insn-asi-02.s new file mode 100644 index 000000000000..3c09f9050382 --- /dev/null +++ b/test/MC/SystemZ/insn-asi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: asi -524289, 0 +#CHECK: error: invalid operand +#CHECK: asi 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: asi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: asi 0, -129 +#CHECK: error: invalid operand +#CHECK: asi 0, 128 + + asi -524289, 0 + asi 524288, 0 + asi 0(%r1,%r2), 0 + asi 0, -129 + asi 0, 128 diff --git a/test/MC/SystemZ/insn-axbr-01.s b/test/MC/SystemZ/insn-axbr-01.s new file mode 100644 index 000000000000..cb592efba6a5 --- /dev/null +++ b/test/MC/SystemZ/insn-axbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: axbr %f0, %f0 # encoding: [0xb3,0x4a,0x00,0x00] +#CHECK: axbr %f0, %f13 # encoding: [0xb3,0x4a,0x00,0x0d] +#CHECK: axbr %f8, %f8 # encoding: [0xb3,0x4a,0x00,0x88] +#CHECK: axbr %f13, %f0 # encoding: [0xb3,0x4a,0x00,0xd0] + + axbr %f0, %f0 + axbr %f0, %f13 + axbr %f8, %f8 + axbr %f13, %f0 diff --git a/test/MC/SystemZ/insn-axbr-02.s b/test/MC/SystemZ/insn-axbr-02.s new file mode 100644 index 000000000000..307664d51e53 --- /dev/null +++ b/test/MC/SystemZ/insn-axbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: axbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: axbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: axbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: axbr %f14, %f0 + + axbr %f0, %f2 + axbr %f0, %f14 + axbr %f2, %f0 + axbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-ay-01.s b/test/MC/SystemZ/insn-ay-01.s new file mode 100644 index 000000000000..3b65c9a7c0e8 --- /dev/null +++ b/test/MC/SystemZ/insn-ay-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ay %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x5a] +#CHECK: ay %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x5a] +#CHECK: ay %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x5a] +#CHECK: ay %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x5a] +#CHECK: ay %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x5a] +#CHECK: ay %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x5a] +#CHECK: ay %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x5a] +#CHECK: ay %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x5a] +#CHECK: ay %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x5a] +#CHECK: ay %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x5a] + + ay %r0, -524288 + ay %r0, -1 + ay %r0, 0 + ay %r0, 1 + ay %r0, 524287 + ay %r0, 0(%r1) + ay %r0, 0(%r15) + ay %r0, 524287(%r1,%r15) + ay %r0, 524287(%r15,%r1) + ay %r15, 0 diff --git a/test/MC/SystemZ/insn-ay-02.s b/test/MC/SystemZ/insn-ay-02.s new file mode 100644 index 000000000000..09704dfb9f4a --- /dev/null +++ b/test/MC/SystemZ/insn-ay-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ay %r0, -524289 +#CHECK: error: invalid operand +#CHECK: ay %r0, 524288 + + ay %r0, -524289 + ay %r0, 524288 diff --git a/test/MC/SystemZ/insn-basr-01.s b/test/MC/SystemZ/insn-basr-01.s new file mode 100644 index 000000000000..a66cee8f6352 --- /dev/null +++ b/test/MC/SystemZ/insn-basr-01.s @@ -0,0 +1,12 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: basr %r0, %r1 # encoding: [0x0d,0x01] +#CHECK: basr %r0, %r15 # encoding: [0x0d,0x0f] +#CHECK: basr %r14, %r9 # encoding: [0x0d,0xe9] +#CHECK: basr %r15, %r1 # encoding: [0x0d,0xf1] + + basr %r0,%r1 + basr %r0,%r15 + basr %r14,%r9 + basr %r15,%r1 + diff --git a/test/MC/SystemZ/insn-br-01.s b/test/MC/SystemZ/insn-br-01.s new file mode 100644 index 000000000000..8e2f2aac78a5 --- /dev/null +++ b/test/MC/SystemZ/insn-br-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: br %r1 # encoding: [0x07,0xf1] +#CHECK: br %r14 # encoding: [0x07,0xfe] +#CHECK: br %r15 # encoding: [0x07,0xff] + + br %r1 + br %r14 + br %r15 diff --git a/test/MC/SystemZ/insn-bras-01.s b/test/MC/SystemZ/insn-bras-01.s new file mode 100644 index 000000000000..89f7f77477dd --- /dev/null +++ b/test/MC/SystemZ/insn-bras-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: bras %r0, foo # encoding: [0xa7,0x05,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: bras %r14, foo # encoding: [0xa7,0xe5,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: bras %r15, foo # encoding: [0xa7,0xf5,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + bras %r0,foo + bras %r14,foo + bras %r15,foo + +#CHECK: bras %r0, bar+100 # encoding: [0xa7,0x05,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL +#CHECK: bras %r14, bar+100 # encoding: [0xa7,0xe5,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL +#CHECK: bras %r15, bar+100 # encoding: [0xa7,0xf5,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + bras %r0,bar+100 + bras %r14,bar+100 + bras %r15,bar+100 + +#CHECK: bras %r0, bar@PLT # encoding: [0xa7,0x05,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL +#CHECK: bras %r14, bar@PLT # encoding: [0xa7,0xe5,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL +#CHECK: bras %r15, bar@PLT # encoding: [0xa7,0xf5,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + bras %r0,bar@PLT + bras %r14,bar@PLT + bras %r15,bar@PLT diff --git a/test/MC/SystemZ/insn-brasl-01.s b/test/MC/SystemZ/insn-brasl-01.s new file mode 100644 index 000000000000..86d0ced9b33d --- /dev/null +++ b/test/MC/SystemZ/insn-brasl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: brasl %r0, foo # encoding: [0xc0,0x05,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: brasl %r14, foo # encoding: [0xc0,0xe5,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: brasl %r15, foo # encoding: [0xc0,0xf5,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brasl %r0,foo + brasl %r14,foo + brasl %r15,foo + +#CHECK: brasl %r0, bar+100 # encoding: [0xc0,0x05,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: brasl %r14, bar+100 # encoding: [0xc0,0xe5,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: brasl %r15, bar+100 # encoding: [0xc0,0xf5,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + brasl %r0,bar+100 + brasl %r14,bar+100 + brasl %r15,bar+100 + +#CHECK: brasl %r0, bar@PLT # encoding: [0xc0,0x05,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL +#CHECK: brasl %r14, bar@PLT # encoding: [0xc0,0xe5,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL +#CHECK: brasl %r15, bar@PLT # encoding: [0xc0,0xf5,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + brasl %r0,bar@PLT + brasl %r14,bar@PLT + brasl %r15,bar@PLT diff --git a/test/MC/SystemZ/insn-brc-01.s b/test/MC/SystemZ/insn-brc-01.s new file mode 100644 index 000000000000..a92ea45ecfcc --- /dev/null +++ b/test/MC/SystemZ/insn-brc-01.s @@ -0,0 +1,238 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: brc 0, foo # encoding: [0xa7,0x04,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 0, foo + +#CHECK: brc 1, foo # encoding: [0xa7,0x14,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jo foo # encoding: [0xa7,0x14,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 1, foo + jo foo + +#CHECK: brc 2, foo # encoding: [0xa7,0x24,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jh foo # encoding: [0xa7,0x24,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 2, foo + jh foo + +#CHECK: brc 3, foo # encoding: [0xa7,0x34,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jnle foo # encoding: [0xa7,0x34,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 3, foo + jnle foo + +#CHECK: brc 4, foo # encoding: [0xa7,0x44,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jl foo # encoding: [0xa7,0x44,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 4, foo + jl foo + +#CHECK: brc 5, foo # encoding: [0xa7,0x54,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jnhe foo # encoding: [0xa7,0x54,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 5, foo + jnhe foo + +#CHECK: brc 6, foo # encoding: [0xa7,0x64,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jlh foo # encoding: [0xa7,0x64,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 6, foo + jlh foo + +#CHECK: brc 7, foo # encoding: [0xa7,0x74,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jne foo # encoding: [0xa7,0x74,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 7, foo + jne foo + +#CHECK: brc 8, foo # encoding: [0xa7,0x84,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: je foo # encoding: [0xa7,0x84,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 8, foo + je foo + +#CHECK: brc 9, foo # encoding: [0xa7,0x94,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jnlh foo # encoding: [0xa7,0x94,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 9, foo + jnlh foo + +#CHECK: brc 10, foo # encoding: [0xa7,0xa4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jhe foo # encoding: [0xa7,0xa4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 10, foo + jhe foo + +#CHECK: brc 11, foo # encoding: [0xa7,0xb4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jnl foo # encoding: [0xa7,0xb4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 11, foo + jnl foo + +#CHECK: brc 12, foo # encoding: [0xa7,0xc4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jle foo # encoding: [0xa7,0xc4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 12, foo + jle foo + +#CHECK: brc 13, foo # encoding: [0xa7,0xd4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jnh foo # encoding: [0xa7,0xd4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 13, foo + jnh foo + +#CHECK: brc 14, foo # encoding: [0xa7,0xe4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: jno foo # encoding: [0xa7,0xe4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 14, foo + jno foo + +#CHECK: brc 15, foo # encoding: [0xa7,0xf4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: j foo # encoding: [0xa7,0xf4,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + brc 15, foo + j foo + +#CHECK: brc 0, bar+100 # encoding: [0xa7,0x04,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + brc 0, bar+100 + +#CHECK: jo bar+100 # encoding: [0xa7,0x14,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jo bar+100 + +#CHECK: jh bar+100 # encoding: [0xa7,0x24,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jh bar+100 + +#CHECK: jnle bar+100 # encoding: [0xa7,0x34,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jnle bar+100 + +#CHECK: jl bar+100 # encoding: [0xa7,0x44,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jl bar+100 + +#CHECK: jnhe bar+100 # encoding: [0xa7,0x54,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jnhe bar+100 + +#CHECK: jlh bar+100 # encoding: [0xa7,0x64,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jlh bar+100 + +#CHECK: jne bar+100 # encoding: [0xa7,0x74,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jne bar+100 + +#CHECK: je bar+100 # encoding: [0xa7,0x84,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + je bar+100 + +#CHECK: jnlh bar+100 # encoding: [0xa7,0x94,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jnlh bar+100 + +#CHECK: jhe bar+100 # encoding: [0xa7,0xa4,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jhe bar+100 + +#CHECK: jnl bar+100 # encoding: [0xa7,0xb4,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jnl bar+100 + +#CHECK: jle bar+100 # encoding: [0xa7,0xc4,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jle bar+100 + +#CHECK: jnh bar+100 # encoding: [0xa7,0xd4,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jnh bar+100 + +#CHECK: jno bar+100 # encoding: [0xa7,0xe4,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + jno bar+100 + +#CHECK: j bar+100 # encoding: [0xa7,0xf4,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + j bar+100 + +#CHECK: brc 0, bar@PLT # encoding: [0xa7,0x04,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + brc 0, bar@PLT + +#CHECK: jo bar@PLT # encoding: [0xa7,0x14,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jo bar@PLT + +#CHECK: jh bar@PLT # encoding: [0xa7,0x24,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jh bar@PLT + +#CHECK: jnle bar@PLT # encoding: [0xa7,0x34,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jnle bar@PLT + +#CHECK: jl bar@PLT # encoding: [0xa7,0x44,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jl bar@PLT + +#CHECK: jnhe bar@PLT # encoding: [0xa7,0x54,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jnhe bar@PLT + +#CHECK: jlh bar@PLT # encoding: [0xa7,0x64,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jlh bar@PLT + +#CHECK: jne bar@PLT # encoding: [0xa7,0x74,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jne bar@PLT + +#CHECK: je bar@PLT # encoding: [0xa7,0x84,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + je bar@PLT + +#CHECK: jnlh bar@PLT # encoding: [0xa7,0x94,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jnlh bar@PLT + +#CHECK: jhe bar@PLT # encoding: [0xa7,0xa4,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jhe bar@PLT + +#CHECK: jnl bar@PLT # encoding: [0xa7,0xb4,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jnl bar@PLT + +#CHECK: jle bar@PLT # encoding: [0xa7,0xc4,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jle bar@PLT + +#CHECK: jnh bar@PLT # encoding: [0xa7,0xd4,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jnh bar@PLT + +#CHECK: jno bar@PLT # encoding: [0xa7,0xe4,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + jno bar@PLT + +#CHECK: j bar@PLT # encoding: [0xa7,0xf4,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + j bar@PLT diff --git a/test/MC/SystemZ/insn-brc-02.s b/test/MC/SystemZ/insn-brc-02.s new file mode 100644 index 000000000000..941cc459f38a --- /dev/null +++ b/test/MC/SystemZ/insn-brc-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: brc foo, bar +#CHECK: error: invalid operand +#CHECK: brc -1, bar +#CHECK: error: invalid operand +#CHECK: brc 16, bar + + brc foo, bar + brc -1, bar + brc 16, bar diff --git a/test/MC/SystemZ/insn-brcl-01.s b/test/MC/SystemZ/insn-brcl-01.s new file mode 100644 index 000000000000..f7138bf5be39 --- /dev/null +++ b/test/MC/SystemZ/insn-brcl-01.s @@ -0,0 +1,238 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: brcl 0, foo # encoding: [0xc0,0x04,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 0, foo + +#CHECK: brcl 1, foo # encoding: [0xc0,0x14,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgo foo # encoding: [0xc0,0x14,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 1, foo + jgo foo + +#CHECK: brcl 2, foo # encoding: [0xc0,0x24,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgh foo # encoding: [0xc0,0x24,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 2, foo + jgh foo + +#CHECK: brcl 3, foo # encoding: [0xc0,0x34,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgnle foo # encoding: [0xc0,0x34,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 3, foo + jgnle foo + +#CHECK: brcl 4, foo # encoding: [0xc0,0x44,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgl foo # encoding: [0xc0,0x44,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 4, foo + jgl foo + +#CHECK: brcl 5, foo # encoding: [0xc0,0x54,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgnhe foo # encoding: [0xc0,0x54,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 5, foo + jgnhe foo + +#CHECK: brcl 6, foo # encoding: [0xc0,0x64,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jglh foo # encoding: [0xc0,0x64,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 6, foo + jglh foo + +#CHECK: brcl 7, foo # encoding: [0xc0,0x74,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgne foo # encoding: [0xc0,0x74,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 7, foo + jgne foo + +#CHECK: brcl 8, foo # encoding: [0xc0,0x84,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jge foo # encoding: [0xc0,0x84,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 8, foo + jge foo + +#CHECK: brcl 9, foo # encoding: [0xc0,0x94,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgnlh foo # encoding: [0xc0,0x94,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 9, foo + jgnlh foo + +#CHECK: brcl 10, foo # encoding: [0xc0,0xa4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jghe foo # encoding: [0xc0,0xa4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 10, foo + jghe foo + +#CHECK: brcl 11, foo # encoding: [0xc0,0xb4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgnl foo # encoding: [0xc0,0xb4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 11, foo + jgnl foo + +#CHECK: brcl 12, foo # encoding: [0xc0,0xc4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgle foo # encoding: [0xc0,0xc4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 12, foo + jgle foo + +#CHECK: brcl 13, foo # encoding: [0xc0,0xd4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgnh foo # encoding: [0xc0,0xd4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 13, foo + jgnh foo + +#CHECK: brcl 14, foo # encoding: [0xc0,0xe4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jgno foo # encoding: [0xc0,0xe4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 14, foo + jgno foo + +#CHECK: brcl 15, foo # encoding: [0xc0,0xf4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: jg foo # encoding: [0xc0,0xf4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + brcl 15, foo + jg foo + +#CHECK: brcl 0, bar+100 # encoding: [0xc0,0x04,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + brcl 0, bar+100 + +#CHECK: jgo bar+100 # encoding: [0xc0,0x14,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgo bar+100 + +#CHECK: jgh bar+100 # encoding: [0xc0,0x24,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgh bar+100 + +#CHECK: jgnle bar+100 # encoding: [0xc0,0x34,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgnle bar+100 + +#CHECK: jgl bar+100 # encoding: [0xc0,0x44,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgl bar+100 + +#CHECK: jgnhe bar+100 # encoding: [0xc0,0x54,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgnhe bar+100 + +#CHECK: jglh bar+100 # encoding: [0xc0,0x64,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jglh bar+100 + +#CHECK: jgne bar+100 # encoding: [0xc0,0x74,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgne bar+100 + +#CHECK: jge bar+100 # encoding: [0xc0,0x84,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jge bar+100 + +#CHECK: jgnlh bar+100 # encoding: [0xc0,0x94,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgnlh bar+100 + +#CHECK: jghe bar+100 # encoding: [0xc0,0xa4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jghe bar+100 + +#CHECK: jgnl bar+100 # encoding: [0xc0,0xb4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgnl bar+100 + +#CHECK: jgle bar+100 # encoding: [0xc0,0xc4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgle bar+100 + +#CHECK: jgnh bar+100 # encoding: [0xc0,0xd4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgnh bar+100 + +#CHECK: jgno bar+100 # encoding: [0xc0,0xe4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jgno bar+100 + +#CHECK: jg bar+100 # encoding: [0xc0,0xf4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + jg bar+100 + +#CHECK: brcl 0, bar@PLT # encoding: [0xc0,0x04,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + brcl 0, bar@PLT + +#CHECK: jgo bar@PLT # encoding: [0xc0,0x14,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgo bar@PLT + +#CHECK: jgh bar@PLT # encoding: [0xc0,0x24,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgh bar@PLT + +#CHECK: jgnle bar@PLT # encoding: [0xc0,0x34,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgnle bar@PLT + +#CHECK: jgl bar@PLT # encoding: [0xc0,0x44,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgl bar@PLT + +#CHECK: jgnhe bar@PLT # encoding: [0xc0,0x54,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgnhe bar@PLT + +#CHECK: jglh bar@PLT # encoding: [0xc0,0x64,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jglh bar@PLT + +#CHECK: jgne bar@PLT # encoding: [0xc0,0x74,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgne bar@PLT + +#CHECK: jge bar@PLT # encoding: [0xc0,0x84,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jge bar@PLT + +#CHECK: jgnlh bar@PLT # encoding: [0xc0,0x94,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgnlh bar@PLT + +#CHECK: jghe bar@PLT # encoding: [0xc0,0xa4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jghe bar@PLT + +#CHECK: jgnl bar@PLT # encoding: [0xc0,0xb4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgnl bar@PLT + +#CHECK: jgle bar@PLT # encoding: [0xc0,0xc4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgle bar@PLT + +#CHECK: jgnh bar@PLT # encoding: [0xc0,0xd4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgnh bar@PLT + +#CHECK: jgno bar@PLT # encoding: [0xc0,0xe4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jgno bar@PLT + +#CHECK: jg bar@PLT # encoding: [0xc0,0xf4,A,A,A,A] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC32DBL + jg bar@PLT diff --git a/test/MC/SystemZ/insn-brcl-02.s b/test/MC/SystemZ/insn-brcl-02.s new file mode 100644 index 000000000000..ded5f7e4a6e1 --- /dev/null +++ b/test/MC/SystemZ/insn-brcl-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: brcl foo, bar +#CHECK: error: invalid operand +#CHECK: brcl -1, bar +#CHECK: error: invalid operand +#CHECK: brcl 16, bar + + brcl foo, bar + brcl -1, bar + brcl 16, bar diff --git a/test/MC/SystemZ/insn-c-01.s b/test/MC/SystemZ/insn-c-01.s new file mode 100644 index 000000000000..e8a8ada30d89 --- /dev/null +++ b/test/MC/SystemZ/insn-c-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: c %r0, 0 # encoding: [0x59,0x00,0x00,0x00] +#CHECK: c %r0, 4095 # encoding: [0x59,0x00,0x0f,0xff] +#CHECK: c %r0, 0(%r1) # encoding: [0x59,0x00,0x10,0x00] +#CHECK: c %r0, 0(%r15) # encoding: [0x59,0x00,0xf0,0x00] +#CHECK: c %r0, 4095(%r1,%r15) # encoding: [0x59,0x01,0xff,0xff] +#CHECK: c %r0, 4095(%r15,%r1) # encoding: [0x59,0x0f,0x1f,0xff] +#CHECK: c %r15, 0 # encoding: [0x59,0xf0,0x00,0x00] + + c %r0, 0 + c %r0, 4095 + c %r0, 0(%r1) + c %r0, 0(%r15) + c %r0, 4095(%r1,%r15) + c %r0, 4095(%r15,%r1) + c %r15, 0 diff --git a/test/MC/SystemZ/insn-c-02.s b/test/MC/SystemZ/insn-c-02.s new file mode 100644 index 000000000000..81fe25181968 --- /dev/null +++ b/test/MC/SystemZ/insn-c-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: c %r0, -1 +#CHECK: error: invalid operand +#CHECK: c %r0, 4096 + + c %r0, -1 + c %r0, 4096 diff --git a/test/MC/SystemZ/insn-cdb-01.s b/test/MC/SystemZ/insn-cdb-01.s new file mode 100644 index 000000000000..7f6bb59956cb --- /dev/null +++ b/test/MC/SystemZ/insn-cdb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cdb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x19] +#CHECK: cdb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x19] +#CHECK: cdb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x19] +#CHECK: cdb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x19] +#CHECK: cdb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x19] +#CHECK: cdb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x19] +#CHECK: cdb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x19] + + cdb %f0, 0 + cdb %f0, 4095 + cdb %f0, 0(%r1) + cdb %f0, 0(%r15) + cdb %f0, 4095(%r1,%r15) + cdb %f0, 4095(%r15,%r1) + cdb %f15, 0 diff --git a/test/MC/SystemZ/insn-cdb-02.s b/test/MC/SystemZ/insn-cdb-02.s new file mode 100644 index 000000000000..5f02b84c1496 --- /dev/null +++ b/test/MC/SystemZ/insn-cdb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cdb %f0, -1 +#CHECK: error: invalid operand +#CHECK: cdb %f0, 4096 + + cdb %f0, -1 + cdb %f0, 4096 diff --git a/test/MC/SystemZ/insn-cdbr-01.s b/test/MC/SystemZ/insn-cdbr-01.s new file mode 100644 index 000000000000..d2acfc01a256 --- /dev/null +++ b/test/MC/SystemZ/insn-cdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cdbr %f0, %f0 # encoding: [0xb3,0x19,0x00,0x00] +#CHECK: cdbr %f0, %f15 # encoding: [0xb3,0x19,0x00,0x0f] +#CHECK: cdbr %f7, %f8 # encoding: [0xb3,0x19,0x00,0x78] +#CHECK: cdbr %f15, %f0 # encoding: [0xb3,0x19,0x00,0xf0] + + cdbr %f0, %f0 + cdbr %f0, %f15 + cdbr %f7, %f8 + cdbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-cdfbr-01.s b/test/MC/SystemZ/insn-cdfbr-01.s new file mode 100644 index 000000000000..94c9b0779c76 --- /dev/null +++ b/test/MC/SystemZ/insn-cdfbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cdfbr %f0, %r0 # encoding: [0xb3,0x95,0x00,0x00] +#CHECK: cdfbr %f0, %r15 # encoding: [0xb3,0x95,0x00,0x0f] +#CHECK: cdfbr %f15, %r0 # encoding: [0xb3,0x95,0x00,0xf0] +#CHECK: cdfbr %f7, %r8 # encoding: [0xb3,0x95,0x00,0x78] +#CHECK: cdfbr %f15, %r15 # encoding: [0xb3,0x95,0x00,0xff] + + cdfbr %f0, %r0 + cdfbr %f0, %r15 + cdfbr %f15, %r0 + cdfbr %f7, %r8 + cdfbr %f15, %r15 diff --git a/test/MC/SystemZ/insn-cdfbr-02.s b/test/MC/SystemZ/insn-cdfbr-02.s new file mode 100644 index 000000000000..14caa1e3c0d8 --- /dev/null +++ b/test/MC/SystemZ/insn-cdfbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cdfbr %r0, %r0 +#CHECK: error: invalid register +#CHECK: cdfbr %f0, %f0 +#CHECK: error: invalid register +#CHECK: cdfbr %f0, %a0 +#CHECK: error: invalid register +#CHECK: cdfbr %a0, %r0 + + cdfbr %r0, %r0 + cdfbr %f0, %f0 + cdfbr %f0, %a0 + cdfbr %a0, %r0 diff --git a/test/MC/SystemZ/insn-cdgbr-01.s b/test/MC/SystemZ/insn-cdgbr-01.s new file mode 100644 index 000000000000..6a994af744e9 --- /dev/null +++ b/test/MC/SystemZ/insn-cdgbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cdgbr %f0, %r0 # encoding: [0xb3,0xa5,0x00,0x00] +#CHECK: cdgbr %f0, %r15 # encoding: [0xb3,0xa5,0x00,0x0f] +#CHECK: cdgbr %f15, %r0 # encoding: [0xb3,0xa5,0x00,0xf0] +#CHECK: cdgbr %f7, %r8 # encoding: [0xb3,0xa5,0x00,0x78] +#CHECK: cdgbr %f15, %r15 # encoding: [0xb3,0xa5,0x00,0xff] + + cdgbr %f0, %r0 + cdgbr %f0, %r15 + cdgbr %f15, %r0 + cdgbr %f7, %r8 + cdgbr %f15, %r15 diff --git a/test/MC/SystemZ/insn-cdgbr-02.s b/test/MC/SystemZ/insn-cdgbr-02.s new file mode 100644 index 000000000000..8fa9d4fa5c28 --- /dev/null +++ b/test/MC/SystemZ/insn-cdgbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cdgbr %r0, %r0 +#CHECK: error: invalid register +#CHECK: cdgbr %f0, %f0 +#CHECK: error: invalid register +#CHECK: cdgbr %f0, %a0 +#CHECK: error: invalid register +#CHECK: cdgbr %a0, %r0 + + cdgbr %r0, %r0 + cdgbr %f0, %f0 + cdgbr %f0, %a0 + cdgbr %a0, %r0 diff --git a/test/MC/SystemZ/insn-ceb-01.s b/test/MC/SystemZ/insn-ceb-01.s new file mode 100644 index 000000000000..d576e9d572df --- /dev/null +++ b/test/MC/SystemZ/insn-ceb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ceb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x09] +#CHECK: ceb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x09] +#CHECK: ceb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x09] +#CHECK: ceb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x09] +#CHECK: ceb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x09] +#CHECK: ceb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x09] +#CHECK: ceb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x09] + + ceb %f0, 0 + ceb %f0, 4095 + ceb %f0, 0(%r1) + ceb %f0, 0(%r15) + ceb %f0, 4095(%r1,%r15) + ceb %f0, 4095(%r15,%r1) + ceb %f15, 0 diff --git a/test/MC/SystemZ/insn-ceb-02.s b/test/MC/SystemZ/insn-ceb-02.s new file mode 100644 index 000000000000..90829dbe12f5 --- /dev/null +++ b/test/MC/SystemZ/insn-ceb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ceb %f0, -1 +#CHECK: error: invalid operand +#CHECK: ceb %f0, 4096 + + ceb %f0, -1 + ceb %f0, 4096 diff --git a/test/MC/SystemZ/insn-cebr-01.s b/test/MC/SystemZ/insn-cebr-01.s new file mode 100644 index 000000000000..b820e3901a67 --- /dev/null +++ b/test/MC/SystemZ/insn-cebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cebr %f0, %f0 # encoding: [0xb3,0x09,0x00,0x00] +#CHECK: cebr %f0, %f15 # encoding: [0xb3,0x09,0x00,0x0f] +#CHECK: cebr %f7, %f8 # encoding: [0xb3,0x09,0x00,0x78] +#CHECK: cebr %f15, %f0 # encoding: [0xb3,0x09,0x00,0xf0] + + cebr %f0, %f0 + cebr %f0, %f15 + cebr %f7, %f8 + cebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-cefbr-01.s b/test/MC/SystemZ/insn-cefbr-01.s new file mode 100644 index 000000000000..f1068f506c58 --- /dev/null +++ b/test/MC/SystemZ/insn-cefbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cefbr %f0, %r0 # encoding: [0xb3,0x94,0x00,0x00] +#CHECK: cefbr %f0, %r15 # encoding: [0xb3,0x94,0x00,0x0f] +#CHECK: cefbr %f15, %r0 # encoding: [0xb3,0x94,0x00,0xf0] +#CHECK: cefbr %f7, %r8 # encoding: [0xb3,0x94,0x00,0x78] +#CHECK: cefbr %f15, %r15 # encoding: [0xb3,0x94,0x00,0xff] + + cefbr %f0, %r0 + cefbr %f0, %r15 + cefbr %f15, %r0 + cefbr %f7, %r8 + cefbr %f15, %r15 diff --git a/test/MC/SystemZ/insn-cefbr-02.s b/test/MC/SystemZ/insn-cefbr-02.s new file mode 100644 index 000000000000..b894fb9f3257 --- /dev/null +++ b/test/MC/SystemZ/insn-cefbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cefbr %r0, %r0 +#CHECK: error: invalid register +#CHECK: cefbr %f0, %f0 +#CHECK: error: invalid register +#CHECK: cefbr %f0, %a0 +#CHECK: error: invalid register +#CHECK: cefbr %a0, %r0 + + cefbr %r0, %r0 + cefbr %f0, %f0 + cefbr %f0, %a0 + cefbr %a0, %r0 diff --git a/test/MC/SystemZ/insn-cegbr-01.s b/test/MC/SystemZ/insn-cegbr-01.s new file mode 100644 index 000000000000..5b2e6caf12c1 --- /dev/null +++ b/test/MC/SystemZ/insn-cegbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cegbr %f0, %r0 # encoding: [0xb3,0xa4,0x00,0x00] +#CHECK: cegbr %f0, %r15 # encoding: [0xb3,0xa4,0x00,0x0f] +#CHECK: cegbr %f15, %r0 # encoding: [0xb3,0xa4,0x00,0xf0] +#CHECK: cegbr %f7, %r8 # encoding: [0xb3,0xa4,0x00,0x78] +#CHECK: cegbr %f15, %r15 # encoding: [0xb3,0xa4,0x00,0xff] + + cegbr %f0, %r0 + cegbr %f0, %r15 + cegbr %f15, %r0 + cegbr %f7, %r8 + cegbr %f15, %r15 diff --git a/test/MC/SystemZ/insn-cegbr-02.s b/test/MC/SystemZ/insn-cegbr-02.s new file mode 100644 index 000000000000..bf0c31ad13f9 --- /dev/null +++ b/test/MC/SystemZ/insn-cegbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cegbr %r0, %r0 +#CHECK: error: invalid register +#CHECK: cegbr %f0, %f0 +#CHECK: error: invalid register +#CHECK: cegbr %f0, %a0 +#CHECK: error: invalid register +#CHECK: cegbr %a0, %r0 + + cegbr %r0, %r0 + cegbr %f0, %f0 + cegbr %f0, %a0 + cegbr %a0, %r0 diff --git a/test/MC/SystemZ/insn-cfdbr-01.s b/test/MC/SystemZ/insn-cfdbr-01.s new file mode 100644 index 000000000000..be4f87fb29e4 --- /dev/null +++ b/test/MC/SystemZ/insn-cfdbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cfdbr %r0, 0, %f0 # encoding: [0xb3,0x99,0x00,0x00] +#CHECK: cfdbr %r0, 0, %f15 # encoding: [0xb3,0x99,0x00,0x0f] +#CHECK: cfdbr %r0, 15, %f0 # encoding: [0xb3,0x99,0xf0,0x00] +#CHECK: cfdbr %r4, 5, %f6 # encoding: [0xb3,0x99,0x50,0x46] +#CHECK: cfdbr %r15, 0, %f0 # encoding: [0xb3,0x99,0x00,0xf0] + + cfdbr %r0, 0, %f0 + cfdbr %r0, 0, %f15 + cfdbr %r0, 15, %f0 + cfdbr %r4, 5, %f6 + cfdbr %r15, 0, %f0 diff --git a/test/MC/SystemZ/insn-cfdbr-02.s b/test/MC/SystemZ/insn-cfdbr-02.s new file mode 100644 index 000000000000..00175955f255 --- /dev/null +++ b/test/MC/SystemZ/insn-cfdbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cfdbr %r0, 0, %r0 +#CHECK: error: invalid register +#CHECK: cfdbr %f0, 0, %f0 +#CHECK: error: invalid operand +#CHECK: cfdbr %r0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: cfdbr %r0, 16, %f0 + + cfdbr %r0, 0, %r0 + cfdbr %f0, 0, %f0 + cfdbr %r0, -1, %f0 + cfdbr %r0, 16, %f0 diff --git a/test/MC/SystemZ/insn-cfebr-01.s b/test/MC/SystemZ/insn-cfebr-01.s new file mode 100644 index 000000000000..6f7ab2c0e038 --- /dev/null +++ b/test/MC/SystemZ/insn-cfebr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cfebr %r0, 0, %f0 # encoding: [0xb3,0x98,0x00,0x00] +#CHECK: cfebr %r0, 0, %f15 # encoding: [0xb3,0x98,0x00,0x0f] +#CHECK: cfebr %r0, 15, %f0 # encoding: [0xb3,0x98,0xf0,0x00] +#CHECK: cfebr %r4, 5, %f6 # encoding: [0xb3,0x98,0x50,0x46] +#CHECK: cfebr %r15, 0, %f0 # encoding: [0xb3,0x98,0x00,0xf0] + + cfebr %r0, 0, %f0 + cfebr %r0, 0, %f15 + cfebr %r0, 15, %f0 + cfebr %r4, 5, %f6 + cfebr %r15, 0, %f0 diff --git a/test/MC/SystemZ/insn-cfebr-02.s b/test/MC/SystemZ/insn-cfebr-02.s new file mode 100644 index 000000000000..c3c5adaed2ca --- /dev/null +++ b/test/MC/SystemZ/insn-cfebr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cfebr %r0, 0, %r0 +#CHECK: error: invalid register +#CHECK: cfebr %f0, 0, %f0 +#CHECK: error: invalid operand +#CHECK: cfebr %r0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: cfebr %r0, 16, %f0 + + cfebr %r0, 0, %r0 + cfebr %f0, 0, %f0 + cfebr %r0, -1, %f0 + cfebr %r0, 16, %f0 diff --git a/test/MC/SystemZ/insn-cfi-01.s b/test/MC/SystemZ/insn-cfi-01.s new file mode 100644 index 000000000000..52e34c02e896 --- /dev/null +++ b/test/MC/SystemZ/insn-cfi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cfi %r0, -2147483648 # encoding: [0xc2,0x0d,0x80,0x00,0x00,0x00] +#CHECK: cfi %r0, -1 # encoding: [0xc2,0x0d,0xff,0xff,0xff,0xff] +#CHECK: cfi %r0, 0 # encoding: [0xc2,0x0d,0x00,0x00,0x00,0x00] +#CHECK: cfi %r0, 1 # encoding: [0xc2,0x0d,0x00,0x00,0x00,0x01] +#CHECK: cfi %r0, 2147483647 # encoding: [0xc2,0x0d,0x7f,0xff,0xff,0xff] +#CHECK: cfi %r15, 0 # encoding: [0xc2,0xfd,0x00,0x00,0x00,0x00] + + cfi %r0, -1 << 31 + cfi %r0, -1 + cfi %r0, 0 + cfi %r0, 1 + cfi %r0, (1 << 31) - 1 + cfi %r15, 0 diff --git a/test/MC/SystemZ/insn-cfi-02.s b/test/MC/SystemZ/insn-cfi-02.s new file mode 100644 index 000000000000..cf7c72621b74 --- /dev/null +++ b/test/MC/SystemZ/insn-cfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cfi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: cfi %r0, (1 << 31) + + cfi %r0, (-1 << 31) - 1 + cfi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-cfxbr-01.s b/test/MC/SystemZ/insn-cfxbr-01.s new file mode 100644 index 000000000000..c509106b5430 --- /dev/null +++ b/test/MC/SystemZ/insn-cfxbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cfxbr %r0, 0, %f0 # encoding: [0xb3,0x9a,0x00,0x00] +#CHECK: cfxbr %r0, 0, %f13 # encoding: [0xb3,0x9a,0x00,0x0d] +#CHECK: cfxbr %r0, 15, %f0 # encoding: [0xb3,0x9a,0xf0,0x00] +#CHECK: cfxbr %r4, 5, %f8 # encoding: [0xb3,0x9a,0x50,0x48] +#CHECK: cfxbr %r15, 0, %f0 # encoding: [0xb3,0x9a,0x00,0xf0] + + cfxbr %r0, 0, %f0 + cfxbr %r0, 0, %f13 + cfxbr %r0, 15, %f0 + cfxbr %r4, 5, %f8 + cfxbr %r15, 0, %f0 diff --git a/test/MC/SystemZ/insn-cfxbr-02.s b/test/MC/SystemZ/insn-cfxbr-02.s new file mode 100644 index 000000000000..3802c514332b --- /dev/null +++ b/test/MC/SystemZ/insn-cfxbr-02.s @@ -0,0 +1,23 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cfxbr %r0, 0, %r0 +#CHECK: error: invalid register +#CHECK: cfxbr %f0, 0, %f0 +#CHECK: error: invalid operand +#CHECK: cfxbr %r0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: cfxbr %r0, 16, %f0 +#CHECK: error: invalid register +#CHECK: cfxbr %r0, 0, %f2 +#CHECK: error: invalid register +#CHECK: cfxbr %r0, 0, %f14 + + cfxbr %r0, 0, %r0 + cfxbr %f0, 0, %f0 + cfxbr %r0, -1, %f0 + cfxbr %r0, 16, %f0 + cfxbr %r0, 0, %f2 + cfxbr %r0, 0, %f14 + diff --git a/test/MC/SystemZ/insn-cg-01.s b/test/MC/SystemZ/insn-cg-01.s new file mode 100644 index 000000000000..1eb185f0ec60 --- /dev/null +++ b/test/MC/SystemZ/insn-cg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x20] +#CHECK: cg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x20] +#CHECK: cg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x20] +#CHECK: cg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x20] +#CHECK: cg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x20] +#CHECK: cg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x20] +#CHECK: cg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x20] +#CHECK: cg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x20] +#CHECK: cg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x20] +#CHECK: cg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x20] + + cg %r0, -524288 + cg %r0, -1 + cg %r0, 0 + cg %r0, 1 + cg %r0, 524287 + cg %r0, 0(%r1) + cg %r0, 0(%r15) + cg %r0, 524287(%r1,%r15) + cg %r0, 524287(%r15,%r1) + cg %r15, 0 diff --git a/test/MC/SystemZ/insn-cg-02.s b/test/MC/SystemZ/insn-cg-02.s new file mode 100644 index 000000000000..e093ccd75112 --- /dev/null +++ b/test/MC/SystemZ/insn-cg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: cg %r0, 524288 + + cg %r0, -524289 + cg %r0, 524288 diff --git a/test/MC/SystemZ/insn-cgdbr-01.s b/test/MC/SystemZ/insn-cgdbr-01.s new file mode 100644 index 000000000000..718f50a9ea9a --- /dev/null +++ b/test/MC/SystemZ/insn-cgdbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgdbr %r0, 0, %f0 # encoding: [0xb3,0xa9,0x00,0x00] +#CHECK: cgdbr %r0, 0, %f15 # encoding: [0xb3,0xa9,0x00,0x0f] +#CHECK: cgdbr %r0, 15, %f0 # encoding: [0xb3,0xa9,0xf0,0x00] +#CHECK: cgdbr %r4, 5, %f6 # encoding: [0xb3,0xa9,0x50,0x46] +#CHECK: cgdbr %r15, 0, %f0 # encoding: [0xb3,0xa9,0x00,0xf0] + + cgdbr %r0, 0, %f0 + cgdbr %r0, 0, %f15 + cgdbr %r0, 15, %f0 + cgdbr %r4, 5, %f6 + cgdbr %r15, 0, %f0 diff --git a/test/MC/SystemZ/insn-cgdbr-02.s b/test/MC/SystemZ/insn-cgdbr-02.s new file mode 100644 index 000000000000..3a3e01fde0f4 --- /dev/null +++ b/test/MC/SystemZ/insn-cgdbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cgdbr %r0, 0, %r0 +#CHECK: error: invalid register +#CHECK: cgdbr %f0, 0, %f0 +#CHECK: error: invalid operand +#CHECK: cgdbr %r0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: cgdbr %r0, 16, %f0 + + cgdbr %r0, 0, %r0 + cgdbr %f0, 0, %f0 + cgdbr %r0, -1, %f0 + cgdbr %r0, 16, %f0 diff --git a/test/MC/SystemZ/insn-cgebr-01.s b/test/MC/SystemZ/insn-cgebr-01.s new file mode 100644 index 000000000000..dc6a7dbfafdb --- /dev/null +++ b/test/MC/SystemZ/insn-cgebr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgebr %r0, 0, %f0 # encoding: [0xb3,0xa8,0x00,0x00] +#CHECK: cgebr %r0, 0, %f15 # encoding: [0xb3,0xa8,0x00,0x0f] +#CHECK: cgebr %r0, 15, %f0 # encoding: [0xb3,0xa8,0xf0,0x00] +#CHECK: cgebr %r4, 5, %f6 # encoding: [0xb3,0xa8,0x50,0x46] +#CHECK: cgebr %r15, 0, %f0 # encoding: [0xb3,0xa8,0x00,0xf0] + + cgebr %r0, 0, %f0 + cgebr %r0, 0, %f15 + cgebr %r0, 15, %f0 + cgebr %r4, 5, %f6 + cgebr %r15, 0, %f0 diff --git a/test/MC/SystemZ/insn-cgebr-02.s b/test/MC/SystemZ/insn-cgebr-02.s new file mode 100644 index 000000000000..9b817a417281 --- /dev/null +++ b/test/MC/SystemZ/insn-cgebr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cgebr %r0, 0, %r0 +#CHECK: error: invalid register +#CHECK: cgebr %f0, 0, %f0 +#CHECK: error: invalid operand +#CHECK: cgebr %r0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: cgebr %r0, 16, %f0 + + cgebr %r0, 0, %r0 + cgebr %f0, 0, %f0 + cgebr %r0, -1, %f0 + cgebr %r0, 16, %f0 diff --git a/test/MC/SystemZ/insn-cgf-01.s b/test/MC/SystemZ/insn-cgf-01.s new file mode 100644 index 000000000000..03c439f1f5dc --- /dev/null +++ b/test/MC/SystemZ/insn-cgf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x30] +#CHECK: cgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x30] +#CHECK: cgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x30] +#CHECK: cgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x30] +#CHECK: cgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x30] +#CHECK: cgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x30] +#CHECK: cgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x30] +#CHECK: cgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x30] +#CHECK: cgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x30] +#CHECK: cgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x30] + + cgf %r0, -524288 + cgf %r0, -1 + cgf %r0, 0 + cgf %r0, 1 + cgf %r0, 524287 + cgf %r0, 0(%r1) + cgf %r0, 0(%r15) + cgf %r0, 524287(%r1,%r15) + cgf %r0, 524287(%r15,%r1) + cgf %r15, 0 diff --git a/test/MC/SystemZ/insn-cgf-02.s b/test/MC/SystemZ/insn-cgf-02.s new file mode 100644 index 000000000000..7171c6e38816 --- /dev/null +++ b/test/MC/SystemZ/insn-cgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: cgf %r0, 524288 + + cgf %r0, -524289 + cgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-cgfi-01.s b/test/MC/SystemZ/insn-cgfi-01.s new file mode 100644 index 000000000000..d6f72d5d6712 --- /dev/null +++ b/test/MC/SystemZ/insn-cgfi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgfi %r0, -2147483648 # encoding: [0xc2,0x0c,0x80,0x00,0x00,0x00] +#CHECK: cgfi %r0, -1 # encoding: [0xc2,0x0c,0xff,0xff,0xff,0xff] +#CHECK: cgfi %r0, 0 # encoding: [0xc2,0x0c,0x00,0x00,0x00,0x00] +#CHECK: cgfi %r0, 1 # encoding: [0xc2,0x0c,0x00,0x00,0x00,0x01] +#CHECK: cgfi %r0, 2147483647 # encoding: [0xc2,0x0c,0x7f,0xff,0xff,0xff] +#CHECK: cgfi %r15, 0 # encoding: [0xc2,0xfc,0x00,0x00,0x00,0x00] + + cgfi %r0, -1 << 31 + cgfi %r0, -1 + cgfi %r0, 0 + cgfi %r0, 1 + cgfi %r0, (1 << 31) - 1 + cgfi %r15, 0 diff --git a/test/MC/SystemZ/insn-cgfi-02.s b/test/MC/SystemZ/insn-cgfi-02.s new file mode 100644 index 000000000000..6f72a24e6902 --- /dev/null +++ b/test/MC/SystemZ/insn-cgfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cgfi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: cgfi %r0, (1 << 31) + + cgfi %r0, (-1 << 31) - 1 + cgfi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-cgfr-01.s b/test/MC/SystemZ/insn-cgfr-01.s new file mode 100644 index 000000000000..6bd1792ea020 --- /dev/null +++ b/test/MC/SystemZ/insn-cgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgfr %r0, %r0 # encoding: [0xb9,0x30,0x00,0x00] +#CHECK: cgfr %r0, %r15 # encoding: [0xb9,0x30,0x00,0x0f] +#CHECK: cgfr %r15, %r0 # encoding: [0xb9,0x30,0x00,0xf0] +#CHECK: cgfr %r7, %r8 # encoding: [0xb9,0x30,0x00,0x78] + + cgfr %r0,%r0 + cgfr %r0,%r15 + cgfr %r15,%r0 + cgfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-cgfrl-01.s b/test/MC/SystemZ/insn-cgfrl-01.s new file mode 100644 index 000000000000..2792fb4a93b7 --- /dev/null +++ b/test/MC/SystemZ/insn-cgfrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgfrl %r0, 2864434397 # encoding: [0xc6,0x0c,0x55,0x5d,0xe6,0x6e] +#CHECK: cgfrl %r15, 2864434397 # encoding: [0xc6,0xfc,0x55,0x5d,0xe6,0x6e] + + cgfrl %r0,0xaabbccdd + cgfrl %r15,0xaabbccdd + +#CHECK: cgfrl %r0, foo # encoding: [0xc6,0x0c,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: cgfrl %r15, foo # encoding: [0xc6,0xfc,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + cgfrl %r0,foo + cgfrl %r15,foo + +#CHECK: cgfrl %r3, bar+100 # encoding: [0xc6,0x3c,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: cgfrl %r4, bar+100 # encoding: [0xc6,0x4c,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + cgfrl %r3,bar+100 + cgfrl %r4,bar+100 + +#CHECK: cgfrl %r7, frob@PLT # encoding: [0xc6,0x7c,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: cgfrl %r8, frob@PLT # encoding: [0xc6,0x8c,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + cgfrl %r7,frob@PLT + cgfrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-cgh-01.s b/test/MC/SystemZ/insn-cgh-01.s new file mode 100644 index 000000000000..31c86abdda76 --- /dev/null +++ b/test/MC/SystemZ/insn-cgh-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x34] +#CHECK: cgh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x34] +#CHECK: cgh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x34] +#CHECK: cgh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x34] +#CHECK: cgh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x34] +#CHECK: cgh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x34] +#CHECK: cgh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x34] +#CHECK: cgh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x34] +#CHECK: cgh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x34] +#CHECK: cgh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x34] + + cgh %r0, -524288 + cgh %r0, -1 + cgh %r0, 0 + cgh %r0, 1 + cgh %r0, 524287 + cgh %r0, 0(%r1) + cgh %r0, 0(%r15) + cgh %r0, 524287(%r1,%r15) + cgh %r0, 524287(%r15,%r1) + cgh %r15, 0 diff --git a/test/MC/SystemZ/insn-cgh-02.s b/test/MC/SystemZ/insn-cgh-02.s new file mode 100644 index 000000000000..60e665f2dd85 --- /dev/null +++ b/test/MC/SystemZ/insn-cgh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cgh %r0, -524289 +#CHECK: error: invalid operand +#CHECK: cgh %r0, 524288 + + cgh %r0, -524289 + cgh %r0, 524288 diff --git a/test/MC/SystemZ/insn-cghi-01.s b/test/MC/SystemZ/insn-cghi-01.s new file mode 100644 index 000000000000..575ad89023a2 --- /dev/null +++ b/test/MC/SystemZ/insn-cghi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cghi %r0, -32768 # encoding: [0xa7,0x0f,0x80,0x00] +#CHECK: cghi %r0, -1 # encoding: [0xa7,0x0f,0xff,0xff] +#CHECK: cghi %r0, 0 # encoding: [0xa7,0x0f,0x00,0x00] +#CHECK: cghi %r0, 1 # encoding: [0xa7,0x0f,0x00,0x01] +#CHECK: cghi %r0, 32767 # encoding: [0xa7,0x0f,0x7f,0xff] +#CHECK: cghi %r15, 0 # encoding: [0xa7,0xff,0x00,0x00] + + cghi %r0, -32768 + cghi %r0, -1 + cghi %r0, 0 + cghi %r0, 1 + cghi %r0, 32767 + cghi %r15, 0 diff --git a/test/MC/SystemZ/insn-cghi-02.s b/test/MC/SystemZ/insn-cghi-02.s new file mode 100644 index 000000000000..bd4a52a6b720 --- /dev/null +++ b/test/MC/SystemZ/insn-cghi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cghi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: cghi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: cghi %r0, foo + + cghi %r0, -32769 + cghi %r0, 32768 + cghi %r0, foo diff --git a/test/MC/SystemZ/insn-cghrl-01.s b/test/MC/SystemZ/insn-cghrl-01.s new file mode 100644 index 000000000000..c48c5ec3efdf --- /dev/null +++ b/test/MC/SystemZ/insn-cghrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cghrl %r0, 2864434397 # encoding: [0xc6,0x04,0x55,0x5d,0xe6,0x6e] +#CHECK: cghrl %r15, 2864434397 # encoding: [0xc6,0xf4,0x55,0x5d,0xe6,0x6e] + + cghrl %r0,0xaabbccdd + cghrl %r15,0xaabbccdd + +#CHECK: cghrl %r0, foo # encoding: [0xc6,0x04,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: cghrl %r15, foo # encoding: [0xc6,0xf4,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + cghrl %r0,foo + cghrl %r15,foo + +#CHECK: cghrl %r3, bar+100 # encoding: [0xc6,0x34,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: cghrl %r4, bar+100 # encoding: [0xc6,0x44,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + cghrl %r3,bar+100 + cghrl %r4,bar+100 + +#CHECK: cghrl %r7, frob@PLT # encoding: [0xc6,0x74,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: cghrl %r8, frob@PLT # encoding: [0xc6,0x84,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + cghrl %r7,frob@PLT + cghrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-cghsi-01.s b/test/MC/SystemZ/insn-cghsi-01.s new file mode 100644 index 000000000000..7d67e20b5b70 --- /dev/null +++ b/test/MC/SystemZ/insn-cghsi-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cghsi 0, 0 # encoding: [0xe5,0x58,0x00,0x00,0x00,0x00] +#CHECK: cghsi 4095, 0 # encoding: [0xe5,0x58,0x0f,0xff,0x00,0x00] +#CHECK: cghsi 0, -32768 # encoding: [0xe5,0x58,0x00,0x00,0x80,0x00] +#CHECK: cghsi 0, -1 # encoding: [0xe5,0x58,0x00,0x00,0xff,0xff] +#CHECK: cghsi 0, 0 # encoding: [0xe5,0x58,0x00,0x00,0x00,0x00] +#CHECK: cghsi 0, 1 # encoding: [0xe5,0x58,0x00,0x00,0x00,0x01] +#CHECK: cghsi 0, 32767 # encoding: [0xe5,0x58,0x00,0x00,0x7f,0xff] +#CHECK: cghsi 0(%r1), 42 # encoding: [0xe5,0x58,0x10,0x00,0x00,0x2a] +#CHECK: cghsi 0(%r15), 42 # encoding: [0xe5,0x58,0xf0,0x00,0x00,0x2a] +#CHECK: cghsi 4095(%r1), 42 # encoding: [0xe5,0x58,0x1f,0xff,0x00,0x2a] +#CHECK: cghsi 4095(%r15), 42 # encoding: [0xe5,0x58,0xff,0xff,0x00,0x2a] + + cghsi 0, 0 + cghsi 4095, 0 + cghsi 0, -32768 + cghsi 0, -1 + cghsi 0, 0 + cghsi 0, 1 + cghsi 0, 32767 + cghsi 0(%r1), 42 + cghsi 0(%r15), 42 + cghsi 4095(%r1), 42 + cghsi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-cghsi-02.s b/test/MC/SystemZ/insn-cghsi-02.s new file mode 100644 index 000000000000..773ee5cd9e9d --- /dev/null +++ b/test/MC/SystemZ/insn-cghsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cghsi -1, 0 +#CHECK: error: invalid operand +#CHECK: cghsi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: cghsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: cghsi 0, -32769 +#CHECK: error: invalid operand +#CHECK: cghsi 0, 32768 + + cghsi -1, 0 + cghsi 4096, 0 + cghsi 0(%r1,%r2), 0 + cghsi 0, -32769 + cghsi 0, 32768 diff --git a/test/MC/SystemZ/insn-cgr-01.s b/test/MC/SystemZ/insn-cgr-01.s new file mode 100644 index 000000000000..334a0f63f82b --- /dev/null +++ b/test/MC/SystemZ/insn-cgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgr %r0, %r0 # encoding: [0xb9,0x20,0x00,0x00] +#CHECK: cgr %r0, %r15 # encoding: [0xb9,0x20,0x00,0x0f] +#CHECK: cgr %r15, %r0 # encoding: [0xb9,0x20,0x00,0xf0] +#CHECK: cgr %r7, %r8 # encoding: [0xb9,0x20,0x00,0x78] + + cgr %r0,%r0 + cgr %r0,%r15 + cgr %r15,%r0 + cgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-cgrl-01.s b/test/MC/SystemZ/insn-cgrl-01.s new file mode 100644 index 000000000000..af878cbf450a --- /dev/null +++ b/test/MC/SystemZ/insn-cgrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgrl %r0, 2864434397 # encoding: [0xc6,0x08,0x55,0x5d,0xe6,0x6e] +#CHECK: cgrl %r15, 2864434397 # encoding: [0xc6,0xf8,0x55,0x5d,0xe6,0x6e] + + cgrl %r0,0xaabbccdd + cgrl %r15,0xaabbccdd + +#CHECK: cgrl %r0, foo # encoding: [0xc6,0x08,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: cgrl %r15, foo # encoding: [0xc6,0xf8,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + cgrl %r0,foo + cgrl %r15,foo + +#CHECK: cgrl %r3, bar+100 # encoding: [0xc6,0x38,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: cgrl %r4, bar+100 # encoding: [0xc6,0x48,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + cgrl %r3,bar+100 + cgrl %r4,bar+100 + +#CHECK: cgrl %r7, frob@PLT # encoding: [0xc6,0x78,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: cgrl %r8, frob@PLT # encoding: [0xc6,0x88,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + cgrl %r7,frob@PLT + cgrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-cgxbr-01.s b/test/MC/SystemZ/insn-cgxbr-01.s new file mode 100644 index 000000000000..0250b52955af --- /dev/null +++ b/test/MC/SystemZ/insn-cgxbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cgxbr %r0, 0, %f0 # encoding: [0xb3,0xaa,0x00,0x00] +#CHECK: cgxbr %r0, 0, %f13 # encoding: [0xb3,0xaa,0x00,0x0d] +#CHECK: cgxbr %r0, 15, %f0 # encoding: [0xb3,0xaa,0xf0,0x00] +#CHECK: cgxbr %r4, 5, %f8 # encoding: [0xb3,0xaa,0x50,0x48] +#CHECK: cgxbr %r15, 0, %f0 # encoding: [0xb3,0xaa,0x00,0xf0] + + cgxbr %r0, 0, %f0 + cgxbr %r0, 0, %f13 + cgxbr %r0, 15, %f0 + cgxbr %r4, 5, %f8 + cgxbr %r15, 0, %f0 diff --git a/test/MC/SystemZ/insn-cgxbr-02.s b/test/MC/SystemZ/insn-cgxbr-02.s new file mode 100644 index 000000000000..9caab9fc401d --- /dev/null +++ b/test/MC/SystemZ/insn-cgxbr-02.s @@ -0,0 +1,23 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cgxbr %r0, 0, %r0 +#CHECK: error: invalid register +#CHECK: cgxbr %f0, 0, %f0 +#CHECK: error: invalid operand +#CHECK: cgxbr %r0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: cgxbr %r0, 16, %f0 +#CHECK: error: invalid register +#CHECK: cgxbr %r0, 0, %f2 +#CHECK: error: invalid register +#CHECK: cgxbr %r0, 0, %f14 + + cgxbr %r0, 0, %r0 + cgxbr %f0, 0, %f0 + cgxbr %r0, -1, %f0 + cgxbr %r0, 16, %f0 + cgxbr %r0, 0, %f2 + cgxbr %r0, 0, %f14 + diff --git a/test/MC/SystemZ/insn-ch-01.s b/test/MC/SystemZ/insn-ch-01.s new file mode 100644 index 000000000000..dfb0b7fcca05 --- /dev/null +++ b/test/MC/SystemZ/insn-ch-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ch %r0, 0 # encoding: [0x49,0x00,0x00,0x00] +#CHECK: ch %r0, 4095 # encoding: [0x49,0x00,0x0f,0xff] +#CHECK: ch %r0, 0(%r1) # encoding: [0x49,0x00,0x10,0x00] +#CHECK: ch %r0, 0(%r15) # encoding: [0x49,0x00,0xf0,0x00] +#CHECK: ch %r0, 4095(%r1,%r15) # encoding: [0x49,0x01,0xff,0xff] +#CHECK: ch %r0, 4095(%r15,%r1) # encoding: [0x49,0x0f,0x1f,0xff] +#CHECK: ch %r15, 0 # encoding: [0x49,0xf0,0x00,0x00] + + ch %r0, 0 + ch %r0, 4095 + ch %r0, 0(%r1) + ch %r0, 0(%r15) + ch %r0, 4095(%r1,%r15) + ch %r0, 4095(%r15,%r1) + ch %r15, 0 diff --git a/test/MC/SystemZ/insn-ch-02.s b/test/MC/SystemZ/insn-ch-02.s new file mode 100644 index 000000000000..2034c2b8d4e9 --- /dev/null +++ b/test/MC/SystemZ/insn-ch-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ch %r0, -1 +#CHECK: error: invalid operand +#CHECK: ch %r0, 4096 + + ch %r0, -1 + ch %r0, 4096 diff --git a/test/MC/SystemZ/insn-chhsi-01.s b/test/MC/SystemZ/insn-chhsi-01.s new file mode 100644 index 000000000000..0fd50bc5e100 --- /dev/null +++ b/test/MC/SystemZ/insn-chhsi-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: chhsi 0, 0 # encoding: [0xe5,0x54,0x00,0x00,0x00,0x00] +#CHECK: chhsi 4095, 0 # encoding: [0xe5,0x54,0x0f,0xff,0x00,0x00] +#CHECK: chhsi 0, -32768 # encoding: [0xe5,0x54,0x00,0x00,0x80,0x00] +#CHECK: chhsi 0, -1 # encoding: [0xe5,0x54,0x00,0x00,0xff,0xff] +#CHECK: chhsi 0, 0 # encoding: [0xe5,0x54,0x00,0x00,0x00,0x00] +#CHECK: chhsi 0, 1 # encoding: [0xe5,0x54,0x00,0x00,0x00,0x01] +#CHECK: chhsi 0, 32767 # encoding: [0xe5,0x54,0x00,0x00,0x7f,0xff] +#CHECK: chhsi 0(%r1), 42 # encoding: [0xe5,0x54,0x10,0x00,0x00,0x2a] +#CHECK: chhsi 0(%r15), 42 # encoding: [0xe5,0x54,0xf0,0x00,0x00,0x2a] +#CHECK: chhsi 4095(%r1), 42 # encoding: [0xe5,0x54,0x1f,0xff,0x00,0x2a] +#CHECK: chhsi 4095(%r15), 42 # encoding: [0xe5,0x54,0xff,0xff,0x00,0x2a] + + chhsi 0, 0 + chhsi 4095, 0 + chhsi 0, -32768 + chhsi 0, -1 + chhsi 0, 0 + chhsi 0, 1 + chhsi 0, 32767 + chhsi 0(%r1), 42 + chhsi 0(%r15), 42 + chhsi 4095(%r1), 42 + chhsi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-chhsi-02.s b/test/MC/SystemZ/insn-chhsi-02.s new file mode 100644 index 000000000000..24e8c0cfbd3a --- /dev/null +++ b/test/MC/SystemZ/insn-chhsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: chhsi -1, 0 +#CHECK: error: invalid operand +#CHECK: chhsi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: chhsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: chhsi 0, -32769 +#CHECK: error: invalid operand +#CHECK: chhsi 0, 32768 + + chhsi -1, 0 + chhsi 4096, 0 + chhsi 0(%r1,%r2), 0 + chhsi 0, -32769 + chhsi 0, 32768 diff --git a/test/MC/SystemZ/insn-chi-01.s b/test/MC/SystemZ/insn-chi-01.s new file mode 100644 index 000000000000..fb44cfc21708 --- /dev/null +++ b/test/MC/SystemZ/insn-chi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: chi %r0, -32768 # encoding: [0xa7,0x0e,0x80,0x00] +#CHECK: chi %r0, -1 # encoding: [0xa7,0x0e,0xff,0xff] +#CHECK: chi %r0, 0 # encoding: [0xa7,0x0e,0x00,0x00] +#CHECK: chi %r0, 1 # encoding: [0xa7,0x0e,0x00,0x01] +#CHECK: chi %r0, 32767 # encoding: [0xa7,0x0e,0x7f,0xff] +#CHECK: chi %r15, 0 # encoding: [0xa7,0xfe,0x00,0x00] + + chi %r0, -32768 + chi %r0, -1 + chi %r0, 0 + chi %r0, 1 + chi %r0, 32767 + chi %r15, 0 diff --git a/test/MC/SystemZ/insn-chi-02.s b/test/MC/SystemZ/insn-chi-02.s new file mode 100644 index 000000000000..bb9ffdc7e6b0 --- /dev/null +++ b/test/MC/SystemZ/insn-chi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: chi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: chi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: chi %r0, foo + + chi %r0, -32769 + chi %r0, 32768 + chi %r0, foo diff --git a/test/MC/SystemZ/insn-chrl-01.s b/test/MC/SystemZ/insn-chrl-01.s new file mode 100644 index 000000000000..c133a326d2b0 --- /dev/null +++ b/test/MC/SystemZ/insn-chrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: chrl %r0, 2864434397 # encoding: [0xc6,0x05,0x55,0x5d,0xe6,0x6e] +#CHECK: chrl %r15, 2864434397 # encoding: [0xc6,0xf5,0x55,0x5d,0xe6,0x6e] + + chrl %r0,0xaabbccdd + chrl %r15,0xaabbccdd + +#CHECK: chrl %r0, foo # encoding: [0xc6,0x05,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: chrl %r15, foo # encoding: [0xc6,0xf5,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + chrl %r0,foo + chrl %r15,foo + +#CHECK: chrl %r3, bar+100 # encoding: [0xc6,0x35,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: chrl %r4, bar+100 # encoding: [0xc6,0x45,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + chrl %r3,bar+100 + chrl %r4,bar+100 + +#CHECK: chrl %r7, frob@PLT # encoding: [0xc6,0x75,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: chrl %r8, frob@PLT # encoding: [0xc6,0x85,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + chrl %r7,frob@PLT + chrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-chsi-01.s b/test/MC/SystemZ/insn-chsi-01.s new file mode 100644 index 000000000000..6d92202185ab --- /dev/null +++ b/test/MC/SystemZ/insn-chsi-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: chsi 0, 0 # encoding: [0xe5,0x5c,0x00,0x00,0x00,0x00] +#CHECK: chsi 4095, 0 # encoding: [0xe5,0x5c,0x0f,0xff,0x00,0x00] +#CHECK: chsi 0, -32768 # encoding: [0xe5,0x5c,0x00,0x00,0x80,0x00] +#CHECK: chsi 0, -1 # encoding: [0xe5,0x5c,0x00,0x00,0xff,0xff] +#CHECK: chsi 0, 0 # encoding: [0xe5,0x5c,0x00,0x00,0x00,0x00] +#CHECK: chsi 0, 1 # encoding: [0xe5,0x5c,0x00,0x00,0x00,0x01] +#CHECK: chsi 0, 32767 # encoding: [0xe5,0x5c,0x00,0x00,0x7f,0xff] +#CHECK: chsi 0(%r1), 42 # encoding: [0xe5,0x5c,0x10,0x00,0x00,0x2a] +#CHECK: chsi 0(%r15), 42 # encoding: [0xe5,0x5c,0xf0,0x00,0x00,0x2a] +#CHECK: chsi 4095(%r1), 42 # encoding: [0xe5,0x5c,0x1f,0xff,0x00,0x2a] +#CHECK: chsi 4095(%r15), 42 # encoding: [0xe5,0x5c,0xff,0xff,0x00,0x2a] + + chsi 0, 0 + chsi 4095, 0 + chsi 0, -32768 + chsi 0, -1 + chsi 0, 0 + chsi 0, 1 + chsi 0, 32767 + chsi 0(%r1), 42 + chsi 0(%r15), 42 + chsi 4095(%r1), 42 + chsi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-chsi-02.s b/test/MC/SystemZ/insn-chsi-02.s new file mode 100644 index 000000000000..16ace53d6710 --- /dev/null +++ b/test/MC/SystemZ/insn-chsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: chsi -1, 0 +#CHECK: error: invalid operand +#CHECK: chsi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: chsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: chsi 0, -32769 +#CHECK: error: invalid operand +#CHECK: chsi 0, 32768 + + chsi -1, 0 + chsi 4096, 0 + chsi 0(%r1,%r2), 0 + chsi 0, -32769 + chsi 0, 32768 diff --git a/test/MC/SystemZ/insn-chy-01.s b/test/MC/SystemZ/insn-chy-01.s new file mode 100644 index 000000000000..9ecc0551cf2b --- /dev/null +++ b/test/MC/SystemZ/insn-chy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: chy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x79] +#CHECK: chy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x79] +#CHECK: chy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x79] +#CHECK: chy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x79] +#CHECK: chy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x79] +#CHECK: chy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x79] +#CHECK: chy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x79] +#CHECK: chy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x79] +#CHECK: chy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x79] +#CHECK: chy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x79] + + chy %r0, -524288 + chy %r0, -1 + chy %r0, 0 + chy %r0, 1 + chy %r0, 524287 + chy %r0, 0(%r1) + chy %r0, 0(%r15) + chy %r0, 524287(%r1,%r15) + chy %r0, 524287(%r15,%r1) + chy %r15, 0 diff --git a/test/MC/SystemZ/insn-chy-02.s b/test/MC/SystemZ/insn-chy-02.s new file mode 100644 index 000000000000..8ab849f0908c --- /dev/null +++ b/test/MC/SystemZ/insn-chy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: chy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: chy %r0, 524288 + + chy %r0, -524289 + chy %r0, 524288 diff --git a/test/MC/SystemZ/insn-cl-01.s b/test/MC/SystemZ/insn-cl-01.s new file mode 100644 index 000000000000..7face8f85431 --- /dev/null +++ b/test/MC/SystemZ/insn-cl-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cl %r0, 0 # encoding: [0x55,0x00,0x00,0x00] +#CHECK: cl %r0, 4095 # encoding: [0x55,0x00,0x0f,0xff] +#CHECK: cl %r0, 0(%r1) # encoding: [0x55,0x00,0x10,0x00] +#CHECK: cl %r0, 0(%r15) # encoding: [0x55,0x00,0xf0,0x00] +#CHECK: cl %r0, 4095(%r1,%r15) # encoding: [0x55,0x01,0xff,0xff] +#CHECK: cl %r0, 4095(%r15,%r1) # encoding: [0x55,0x0f,0x1f,0xff] +#CHECK: cl %r15, 0 # encoding: [0x55,0xf0,0x00,0x00] + + cl %r0, 0 + cl %r0, 4095 + cl %r0, 0(%r1) + cl %r0, 0(%r15) + cl %r0, 4095(%r1,%r15) + cl %r0, 4095(%r15,%r1) + cl %r15, 0 diff --git a/test/MC/SystemZ/insn-cl-02.s b/test/MC/SystemZ/insn-cl-02.s new file mode 100644 index 000000000000..ec3e1df996fa --- /dev/null +++ b/test/MC/SystemZ/insn-cl-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cl %r0, -1 +#CHECK: error: invalid operand +#CHECK: cl %r0, 4096 + + cl %r0, -1 + cl %r0, 4096 diff --git a/test/MC/SystemZ/insn-clfhsi-01.s b/test/MC/SystemZ/insn-clfhsi-01.s new file mode 100644 index 000000000000..910515d96b7c --- /dev/null +++ b/test/MC/SystemZ/insn-clfhsi-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clfhsi 0, 0 # encoding: [0xe5,0x5d,0x00,0x00,0x00,0x00] +#CHECK: clfhsi 4095, 0 # encoding: [0xe5,0x5d,0x0f,0xff,0x00,0x00] +#CHECK: clfhsi 0, 65535 # encoding: [0xe5,0x5d,0x00,0x00,0xff,0xff] +#CHECK: clfhsi 0(%r1), 42 # encoding: [0xe5,0x5d,0x10,0x00,0x00,0x2a] +#CHECK: clfhsi 0(%r15), 42 # encoding: [0xe5,0x5d,0xf0,0x00,0x00,0x2a] +#CHECK: clfhsi 4095(%r1), 42 # encoding: [0xe5,0x5d,0x1f,0xff,0x00,0x2a] +#CHECK: clfhsi 4095(%r15), 42 # encoding: [0xe5,0x5d,0xff,0xff,0x00,0x2a] + + clfhsi 0, 0 + clfhsi 4095, 0 + clfhsi 0, 65535 + clfhsi 0(%r1), 42 + clfhsi 0(%r15), 42 + clfhsi 4095(%r1), 42 + clfhsi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-clfhsi-02.s b/test/MC/SystemZ/insn-clfhsi-02.s new file mode 100644 index 000000000000..4a6f4049c584 --- /dev/null +++ b/test/MC/SystemZ/insn-clfhsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clfhsi -1, 0 +#CHECK: error: invalid operand +#CHECK: clfhsi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: clfhsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: clfhsi 0, -1 +#CHECK: error: invalid operand +#CHECK: clfhsi 0, 65536 + + clfhsi -1, 0 + clfhsi 4096, 0 + clfhsi 0(%r1,%r2), 0 + clfhsi 0, -1 + clfhsi 0, 65536 diff --git a/test/MC/SystemZ/insn-clfi-01.s b/test/MC/SystemZ/insn-clfi-01.s new file mode 100644 index 000000000000..4156c7f6e8ea --- /dev/null +++ b/test/MC/SystemZ/insn-clfi-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clfi %r0, 0 # encoding: [0xc2,0x0f,0x00,0x00,0x00,0x00] +#CHECK: clfi %r0, 4294967295 # encoding: [0xc2,0x0f,0xff,0xff,0xff,0xff] +#CHECK: clfi %r15, 0 # encoding: [0xc2,0xff,0x00,0x00,0x00,0x00] + + clfi %r0, 0 + clfi %r0, (1 << 32) - 1 + clfi %r15, 0 diff --git a/test/MC/SystemZ/insn-clfi-02.s b/test/MC/SystemZ/insn-clfi-02.s new file mode 100644 index 000000000000..9d3f80630ef9 --- /dev/null +++ b/test/MC/SystemZ/insn-clfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clfi %r0, -1 +#CHECK: error: invalid operand +#CHECK: clfi %r0, (1 << 32) + + clfi %r0, -1 + clfi %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-clg-01.s b/test/MC/SystemZ/insn-clg-01.s new file mode 100644 index 000000000000..596bae1c813b --- /dev/null +++ b/test/MC/SystemZ/insn-clg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x21] +#CHECK: clg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x21] +#CHECK: clg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x21] +#CHECK: clg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x21] +#CHECK: clg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x21] +#CHECK: clg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x21] +#CHECK: clg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x21] +#CHECK: clg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x21] +#CHECK: clg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x21] +#CHECK: clg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x21] + + clg %r0, -524288 + clg %r0, -1 + clg %r0, 0 + clg %r0, 1 + clg %r0, 524287 + clg %r0, 0(%r1) + clg %r0, 0(%r15) + clg %r0, 524287(%r1,%r15) + clg %r0, 524287(%r15,%r1) + clg %r15, 0 diff --git a/test/MC/SystemZ/insn-clg-02.s b/test/MC/SystemZ/insn-clg-02.s new file mode 100644 index 000000000000..a17aab52049f --- /dev/null +++ b/test/MC/SystemZ/insn-clg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: clg %r0, 524288 + + clg %r0, -524289 + clg %r0, 524288 diff --git a/test/MC/SystemZ/insn-clgf-01.s b/test/MC/SystemZ/insn-clgf-01.s new file mode 100644 index 000000000000..003ba838028e --- /dev/null +++ b/test/MC/SystemZ/insn-clgf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x31] +#CHECK: clgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x31] +#CHECK: clgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x31] +#CHECK: clgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x31] +#CHECK: clgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x31] +#CHECK: clgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x31] +#CHECK: clgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x31] +#CHECK: clgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x31] +#CHECK: clgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x31] +#CHECK: clgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x31] + + clgf %r0, -524288 + clgf %r0, -1 + clgf %r0, 0 + clgf %r0, 1 + clgf %r0, 524287 + clgf %r0, 0(%r1) + clgf %r0, 0(%r15) + clgf %r0, 524287(%r1,%r15) + clgf %r0, 524287(%r15,%r1) + clgf %r15, 0 diff --git a/test/MC/SystemZ/insn-clgf-02.s b/test/MC/SystemZ/insn-clgf-02.s new file mode 100644 index 000000000000..9de49ae79b6a --- /dev/null +++ b/test/MC/SystemZ/insn-clgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: clgf %r0, 524288 + + clgf %r0, -524289 + clgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-clgfi-01.s b/test/MC/SystemZ/insn-clgfi-01.s new file mode 100644 index 000000000000..dbf4a0e8f0a7 --- /dev/null +++ b/test/MC/SystemZ/insn-clgfi-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clgfi %r0, 0 # encoding: [0xc2,0x0e,0x00,0x00,0x00,0x00] +#CHECK: clgfi %r0, 4294967295 # encoding: [0xc2,0x0e,0xff,0xff,0xff,0xff] +#CHECK: clgfi %r15, 0 # encoding: [0xc2,0xfe,0x00,0x00,0x00,0x00] + + clgfi %r0, 0 + clgfi %r0, (1 << 32) - 1 + clgfi %r15, 0 diff --git a/test/MC/SystemZ/insn-clgfi-02.s b/test/MC/SystemZ/insn-clgfi-02.s new file mode 100644 index 000000000000..3f2db33d8366 --- /dev/null +++ b/test/MC/SystemZ/insn-clgfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clgfi %r0, -1 +#CHECK: error: invalid operand +#CHECK: clgfi %r0, (1 << 32) + + clgfi %r0, -1 + clgfi %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-clgfr-01.s b/test/MC/SystemZ/insn-clgfr-01.s new file mode 100644 index 000000000000..37f1e24452de --- /dev/null +++ b/test/MC/SystemZ/insn-clgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clgfr %r0, %r0 # encoding: [0xb9,0x31,0x00,0x00] +#CHECK: clgfr %r0, %r15 # encoding: [0xb9,0x31,0x00,0x0f] +#CHECK: clgfr %r15, %r0 # encoding: [0xb9,0x31,0x00,0xf0] +#CHECK: clgfr %r7, %r8 # encoding: [0xb9,0x31,0x00,0x78] + + clgfr %r0,%r0 + clgfr %r0,%r15 + clgfr %r15,%r0 + clgfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-clgfrl-01.s b/test/MC/SystemZ/insn-clgfrl-01.s new file mode 100644 index 000000000000..6fc6d5eb3bad --- /dev/null +++ b/test/MC/SystemZ/insn-clgfrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clgfrl %r0, 2864434397 # encoding: [0xc6,0x0e,0x55,0x5d,0xe6,0x6e] +#CHECK: clgfrl %r15, 2864434397 # encoding: [0xc6,0xfe,0x55,0x5d,0xe6,0x6e] + + clgfrl %r0,0xaabbccdd + clgfrl %r15,0xaabbccdd + +#CHECK: clgfrl %r0, foo # encoding: [0xc6,0x0e,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: clgfrl %r15, foo # encoding: [0xc6,0xfe,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + clgfrl %r0,foo + clgfrl %r15,foo + +#CHECK: clgfrl %r3, bar+100 # encoding: [0xc6,0x3e,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: clgfrl %r4, bar+100 # encoding: [0xc6,0x4e,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + clgfrl %r3,bar+100 + clgfrl %r4,bar+100 + +#CHECK: clgfrl %r7, frob@PLT # encoding: [0xc6,0x7e,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: clgfrl %r8, frob@PLT # encoding: [0xc6,0x8e,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + clgfrl %r7,frob@PLT + clgfrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-clghrl-01.s b/test/MC/SystemZ/insn-clghrl-01.s new file mode 100644 index 000000000000..41c2580abde5 --- /dev/null +++ b/test/MC/SystemZ/insn-clghrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clghrl %r0, 2864434397 # encoding: [0xc6,0x06,0x55,0x5d,0xe6,0x6e] +#CHECK: clghrl %r15, 2864434397 # encoding: [0xc6,0xf6,0x55,0x5d,0xe6,0x6e] + + clghrl %r0,0xaabbccdd + clghrl %r15,0xaabbccdd + +#CHECK: clghrl %r0, foo # encoding: [0xc6,0x06,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: clghrl %r15, foo # encoding: [0xc6,0xf6,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + clghrl %r0,foo + clghrl %r15,foo + +#CHECK: clghrl %r3, bar+100 # encoding: [0xc6,0x36,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: clghrl %r4, bar+100 # encoding: [0xc6,0x46,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + clghrl %r3,bar+100 + clghrl %r4,bar+100 + +#CHECK: clghrl %r7, frob@PLT # encoding: [0xc6,0x76,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: clghrl %r8, frob@PLT # encoding: [0xc6,0x86,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + clghrl %r7,frob@PLT + clghrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-clghsi-01.s b/test/MC/SystemZ/insn-clghsi-01.s new file mode 100644 index 000000000000..05e0c585c0a9 --- /dev/null +++ b/test/MC/SystemZ/insn-clghsi-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clghsi 0, 0 # encoding: [0xe5,0x59,0x00,0x00,0x00,0x00] +#CHECK: clghsi 4095, 0 # encoding: [0xe5,0x59,0x0f,0xff,0x00,0x00] +#CHECK: clghsi 0, 65535 # encoding: [0xe5,0x59,0x00,0x00,0xff,0xff] +#CHECK: clghsi 0(%r1), 42 # encoding: [0xe5,0x59,0x10,0x00,0x00,0x2a] +#CHECK: clghsi 0(%r15), 42 # encoding: [0xe5,0x59,0xf0,0x00,0x00,0x2a] +#CHECK: clghsi 4095(%r1), 42 # encoding: [0xe5,0x59,0x1f,0xff,0x00,0x2a] +#CHECK: clghsi 4095(%r15), 42 # encoding: [0xe5,0x59,0xff,0xff,0x00,0x2a] + + clghsi 0, 0 + clghsi 4095, 0 + clghsi 0, 65535 + clghsi 0(%r1), 42 + clghsi 0(%r15), 42 + clghsi 4095(%r1), 42 + clghsi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-clghsi-02.s b/test/MC/SystemZ/insn-clghsi-02.s new file mode 100644 index 000000000000..f0361280705d --- /dev/null +++ b/test/MC/SystemZ/insn-clghsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clghsi -1, 0 +#CHECK: error: invalid operand +#CHECK: clghsi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: clghsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: clghsi 0, -1 +#CHECK: error: invalid operand +#CHECK: clghsi 0, 65536 + + clghsi -1, 0 + clghsi 4096, 0 + clghsi 0(%r1,%r2), 0 + clghsi 0, -1 + clghsi 0, 65536 diff --git a/test/MC/SystemZ/insn-clgr-01.s b/test/MC/SystemZ/insn-clgr-01.s new file mode 100644 index 000000000000..7e9d2ad43988 --- /dev/null +++ b/test/MC/SystemZ/insn-clgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clgr %r0, %r0 # encoding: [0xb9,0x21,0x00,0x00] +#CHECK: clgr %r0, %r15 # encoding: [0xb9,0x21,0x00,0x0f] +#CHECK: clgr %r15, %r0 # encoding: [0xb9,0x21,0x00,0xf0] +#CHECK: clgr %r7, %r8 # encoding: [0xb9,0x21,0x00,0x78] + + clgr %r0,%r0 + clgr %r0,%r15 + clgr %r15,%r0 + clgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-clgrl-01.s b/test/MC/SystemZ/insn-clgrl-01.s new file mode 100644 index 000000000000..439bcd94ff89 --- /dev/null +++ b/test/MC/SystemZ/insn-clgrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clgrl %r0, 2864434397 # encoding: [0xc6,0x0a,0x55,0x5d,0xe6,0x6e] +#CHECK: clgrl %r15, 2864434397 # encoding: [0xc6,0xfa,0x55,0x5d,0xe6,0x6e] + + clgrl %r0,0xaabbccdd + clgrl %r15,0xaabbccdd + +#CHECK: clgrl %r0, foo # encoding: [0xc6,0x0a,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: clgrl %r15, foo # encoding: [0xc6,0xfa,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + clgrl %r0,foo + clgrl %r15,foo + +#CHECK: clgrl %r3, bar+100 # encoding: [0xc6,0x3a,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: clgrl %r4, bar+100 # encoding: [0xc6,0x4a,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + clgrl %r3,bar+100 + clgrl %r4,bar+100 + +#CHECK: clgrl %r7, frob@PLT # encoding: [0xc6,0x7a,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: clgrl %r8, frob@PLT # encoding: [0xc6,0x8a,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + clgrl %r7,frob@PLT + clgrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-clhhsi-01.s b/test/MC/SystemZ/insn-clhhsi-01.s new file mode 100644 index 000000000000..ae72ffa018ad --- /dev/null +++ b/test/MC/SystemZ/insn-clhhsi-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clhhsi 0, 0 # encoding: [0xe5,0x55,0x00,0x00,0x00,0x00] +#CHECK: clhhsi 4095, 0 # encoding: [0xe5,0x55,0x0f,0xff,0x00,0x00] +#CHECK: clhhsi 0, 65535 # encoding: [0xe5,0x55,0x00,0x00,0xff,0xff] +#CHECK: clhhsi 0(%r1), 42 # encoding: [0xe5,0x55,0x10,0x00,0x00,0x2a] +#CHECK: clhhsi 0(%r15), 42 # encoding: [0xe5,0x55,0xf0,0x00,0x00,0x2a] +#CHECK: clhhsi 4095(%r1), 42 # encoding: [0xe5,0x55,0x1f,0xff,0x00,0x2a] +#CHECK: clhhsi 4095(%r15), 42 # encoding: [0xe5,0x55,0xff,0xff,0x00,0x2a] + + clhhsi 0, 0 + clhhsi 4095, 0 + clhhsi 0, 65535 + clhhsi 0(%r1), 42 + clhhsi 0(%r15), 42 + clhhsi 4095(%r1), 42 + clhhsi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-clhhsi-02.s b/test/MC/SystemZ/insn-clhhsi-02.s new file mode 100644 index 000000000000..bbdf7cd0da6c --- /dev/null +++ b/test/MC/SystemZ/insn-clhhsi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: clhhsi -1, 0 +#CHECK: error: invalid operand +#CHECK: clhhsi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: clhhsi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: clhhsi 0, -1 +#CHECK: error: invalid operand +#CHECK: clhhsi 0, 65536 + + clhhsi -1, 0 + clhhsi 4096, 0 + clhhsi 0(%r1,%r2), 0 + clhhsi 0, -1 + clhhsi 0, 65536 diff --git a/test/MC/SystemZ/insn-clhrl-01.s b/test/MC/SystemZ/insn-clhrl-01.s new file mode 100644 index 000000000000..b424de8f6678 --- /dev/null +++ b/test/MC/SystemZ/insn-clhrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clhrl %r0, 2864434397 # encoding: [0xc6,0x07,0x55,0x5d,0xe6,0x6e] +#CHECK: clhrl %r15, 2864434397 # encoding: [0xc6,0xf7,0x55,0x5d,0xe6,0x6e] + + clhrl %r0,0xaabbccdd + clhrl %r15,0xaabbccdd + +#CHECK: clhrl %r0, foo # encoding: [0xc6,0x07,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: clhrl %r15, foo # encoding: [0xc6,0xf7,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + clhrl %r0,foo + clhrl %r15,foo + +#CHECK: clhrl %r3, bar+100 # encoding: [0xc6,0x37,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: clhrl %r4, bar+100 # encoding: [0xc6,0x47,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + clhrl %r3,bar+100 + clhrl %r4,bar+100 + +#CHECK: clhrl %r7, frob@PLT # encoding: [0xc6,0x77,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: clhrl %r8, frob@PLT # encoding: [0xc6,0x87,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + clhrl %r7,frob@PLT + clhrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-cli-01.s b/test/MC/SystemZ/insn-cli-01.s new file mode 100644 index 000000000000..23bccfab4b79 --- /dev/null +++ b/test/MC/SystemZ/insn-cli-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cli 0, 0 # encoding: [0x95,0x00,0x00,0x00] +#CHECK: cli 4095, 0 # encoding: [0x95,0x00,0x0f,0xff] +#CHECK: cli 0, 255 # encoding: [0x95,0xff,0x00,0x00] +#CHECK: cli 0(%r1), 42 # encoding: [0x95,0x2a,0x10,0x00] +#CHECK: cli 0(%r15), 42 # encoding: [0x95,0x2a,0xf0,0x00] +#CHECK: cli 4095(%r1), 42 # encoding: [0x95,0x2a,0x1f,0xff] +#CHECK: cli 4095(%r15), 42 # encoding: [0x95,0x2a,0xff,0xff] + + cli 0, 0 + cli 4095, 0 + cli 0, 255 + cli 0(%r1), 42 + cli 0(%r15), 42 + cli 4095(%r1), 42 + cli 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-cli-02.s b/test/MC/SystemZ/insn-cli-02.s new file mode 100644 index 000000000000..7fe6fdabfd32 --- /dev/null +++ b/test/MC/SystemZ/insn-cli-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cli -1, 0 +#CHECK: error: invalid operand +#CHECK: cli 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: cli 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: cli 0, -1 +#CHECK: error: invalid operand +#CHECK: cli 0, 256 + + cli -1, 0 + cli 4096, 0 + cli 0(%r1,%r2), 0 + cli 0, -1 + cli 0, 256 diff --git a/test/MC/SystemZ/insn-cliy-01.s b/test/MC/SystemZ/insn-cliy-01.s new file mode 100644 index 000000000000..1a26f605d8b1 --- /dev/null +++ b/test/MC/SystemZ/insn-cliy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cliy -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x55] +#CHECK: cliy -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x55] +#CHECK: cliy 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x55] +#CHECK: cliy 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x55] +#CHECK: cliy 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x55] +#CHECK: cliy 0, 255 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x55] +#CHECK: cliy 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x55] +#CHECK: cliy 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x55] +#CHECK: cliy 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x55] +#CHECK: cliy 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x55] + + cliy -524288, 0 + cliy -1, 0 + cliy 0, 0 + cliy 1, 0 + cliy 524287, 0 + cliy 0, 255 + cliy 0(%r1), 42 + cliy 0(%r15), 42 + cliy 524287(%r1), 42 + cliy 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-cliy-02.s b/test/MC/SystemZ/insn-cliy-02.s new file mode 100644 index 000000000000..3e8056315d78 --- /dev/null +++ b/test/MC/SystemZ/insn-cliy-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cliy -524289, 0 +#CHECK: error: invalid operand +#CHECK: cliy 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: cliy 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: cliy 0, -1 +#CHECK: error: invalid operand +#CHECK: cliy 0, 256 + + cliy -524289, 0 + cliy 524288, 0 + cliy 0(%r1,%r2), 0 + cliy 0, -1 + cliy 0, 256 diff --git a/test/MC/SystemZ/insn-clr-01.s b/test/MC/SystemZ/insn-clr-01.s new file mode 100644 index 000000000000..d187d4e3e823 --- /dev/null +++ b/test/MC/SystemZ/insn-clr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clr %r0, %r0 # encoding: [0x15,0x00] +#CHECK: clr %r0, %r15 # encoding: [0x15,0x0f] +#CHECK: clr %r15, %r0 # encoding: [0x15,0xf0] +#CHECK: clr %r7, %r8 # encoding: [0x15,0x78] + + clr %r0,%r0 + clr %r0,%r15 + clr %r15,%r0 + clr %r7,%r8 diff --git a/test/MC/SystemZ/insn-clrl-01.s b/test/MC/SystemZ/insn-clrl-01.s new file mode 100644 index 000000000000..4c6e649b439d --- /dev/null +++ b/test/MC/SystemZ/insn-clrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: clrl %r0, 2864434397 # encoding: [0xc6,0x0f,0x55,0x5d,0xe6,0x6e] +#CHECK: clrl %r15, 2864434397 # encoding: [0xc6,0xff,0x55,0x5d,0xe6,0x6e] + + clrl %r0,0xaabbccdd + clrl %r15,0xaabbccdd + +#CHECK: clrl %r0, foo # encoding: [0xc6,0x0f,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: clrl %r15, foo # encoding: [0xc6,0xff,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + clrl %r0,foo + clrl %r15,foo + +#CHECK: clrl %r3, bar+100 # encoding: [0xc6,0x3f,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: clrl %r4, bar+100 # encoding: [0xc6,0x4f,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + clrl %r3,bar+100 + clrl %r4,bar+100 + +#CHECK: clrl %r7, frob@PLT # encoding: [0xc6,0x7f,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: clrl %r8, frob@PLT # encoding: [0xc6,0x8f,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + clrl %r7,frob@PLT + clrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-cly-01.s b/test/MC/SystemZ/insn-cly-01.s new file mode 100644 index 000000000000..8fb4af683e60 --- /dev/null +++ b/test/MC/SystemZ/insn-cly-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cly %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x55] +#CHECK: cly %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x55] +#CHECK: cly %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x55] +#CHECK: cly %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x55] +#CHECK: cly %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x55] +#CHECK: cly %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x55] +#CHECK: cly %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x55] +#CHECK: cly %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x55] +#CHECK: cly %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x55] +#CHECK: cly %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x55] + + cly %r0, -524288 + cly %r0, -1 + cly %r0, 0 + cly %r0, 1 + cly %r0, 524287 + cly %r0, 0(%r1) + cly %r0, 0(%r15) + cly %r0, 524287(%r1,%r15) + cly %r0, 524287(%r15,%r1) + cly %r15, 0 diff --git a/test/MC/SystemZ/insn-cly-02.s b/test/MC/SystemZ/insn-cly-02.s new file mode 100644 index 000000000000..23f37a96cc4a --- /dev/null +++ b/test/MC/SystemZ/insn-cly-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cly %r0, -524289 +#CHECK: error: invalid operand +#CHECK: cly %r0, 524288 + + cly %r0, -524289 + cly %r0, 524288 diff --git a/test/MC/SystemZ/insn-cpsdr-01.s b/test/MC/SystemZ/insn-cpsdr-01.s new file mode 100644 index 000000000000..23d773dfc9c7 --- /dev/null +++ b/test/MC/SystemZ/insn-cpsdr-01.s @@ -0,0 +1,16 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cpsdr %f0, %f0, %f0 # encoding: [0xb3,0x72,0x00,0x00] +#CHECK: cpsdr %f0, %f0, %f15 # encoding: [0xb3,0x72,0x00,0x0f] +#CHECK: cpsdr %f0, %f15, %f0 # encoding: [0xb3,0x72,0xf0,0x00] +#CHECK: cpsdr %f15, %f0, %f0 # encoding: [0xb3,0x72,0x00,0xf0] +#CHECK: cpsdr %f1, %f2, %f3 # encoding: [0xb3,0x72,0x20,0x13] +#CHECK: cpsdr %f15, %f15, %f15 # encoding: [0xb3,0x72,0xf0,0xff] + + cpsdr %f0, %f0, %f0 + cpsdr %f0, %f0, %f15 + cpsdr %f0, %f15, %f0 + cpsdr %f15, %f0, %f0 + cpsdr %f1, %f2, %f3 + cpsdr %f15, %f15, %f15 + diff --git a/test/MC/SystemZ/insn-cr-01.s b/test/MC/SystemZ/insn-cr-01.s new file mode 100644 index 000000000000..d77e08513fc3 --- /dev/null +++ b/test/MC/SystemZ/insn-cr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cr %r0, %r0 # encoding: [0x19,0x00] +#CHECK: cr %r0, %r15 # encoding: [0x19,0x0f] +#CHECK: cr %r15, %r0 # encoding: [0x19,0xf0] +#CHECK: cr %r7, %r8 # encoding: [0x19,0x78] + + cr %r0,%r0 + cr %r0,%r15 + cr %r15,%r0 + cr %r7,%r8 diff --git a/test/MC/SystemZ/insn-crl-01.s b/test/MC/SystemZ/insn-crl-01.s new file mode 100644 index 000000000000..2451b4c9f829 --- /dev/null +++ b/test/MC/SystemZ/insn-crl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: crl %r0, 2864434397 # encoding: [0xc6,0x0d,0x55,0x5d,0xe6,0x6e] +#CHECK: crl %r15, 2864434397 # encoding: [0xc6,0xfd,0x55,0x5d,0xe6,0x6e] + + crl %r0,0xaabbccdd + crl %r15,0xaabbccdd + +#CHECK: crl %r0, foo # encoding: [0xc6,0x0d,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: crl %r15, foo # encoding: [0xc6,0xfd,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + crl %r0,foo + crl %r15,foo + +#CHECK: crl %r3, bar+100 # encoding: [0xc6,0x3d,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: crl %r4, bar+100 # encoding: [0xc6,0x4d,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + crl %r3,bar+100 + crl %r4,bar+100 + +#CHECK: crl %r7, frob@PLT # encoding: [0xc6,0x7d,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: crl %r8, frob@PLT # encoding: [0xc6,0x8d,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + crl %r7,frob@PLT + crl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-cs-01.s b/test/MC/SystemZ/insn-cs-01.s new file mode 100644 index 000000000000..3fc6c34b7404 --- /dev/null +++ b/test/MC/SystemZ/insn-cs-01.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cs %r0, %r0, 0 # encoding: [0xba,0x00,0x00,0x00] +#CHECK: cs %r0, %r0, 4095 # encoding: [0xba,0x00,0x0f,0xff] +#CHECK: cs %r0, %r0, 0(%r1) # encoding: [0xba,0x00,0x10,0x00] +#CHECK: cs %r0, %r0, 0(%r15) # encoding: [0xba,0x00,0xf0,0x00] +#CHECK: cs %r0, %r0, 4095(%r1) # encoding: [0xba,0x00,0x1f,0xff] +#CHECK: cs %r0, %r0, 4095(%r15) # encoding: [0xba,0x00,0xff,0xff] +#CHECK: cs %r0, %r15, 0 # encoding: [0xba,0x0f,0x00,0x00] +#CHECK: cs %r15, %r0, 0 # encoding: [0xba,0xf0,0x00,0x00] + + cs %r0, %r0, 0 + cs %r0, %r0, 4095 + cs %r0, %r0, 0(%r1) + cs %r0, %r0, 0(%r15) + cs %r0, %r0, 4095(%r1) + cs %r0, %r0, 4095(%r15) + cs %r0, %r15, 0 + cs %r15, %r0, 0 diff --git a/test/MC/SystemZ/insn-cs-02.s b/test/MC/SystemZ/insn-cs-02.s new file mode 100644 index 000000000000..c22795998dd2 --- /dev/null +++ b/test/MC/SystemZ/insn-cs-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cs %r0, %r0, -1 +#CHECK: error: invalid operand +#CHECK: cs %r0, %r0, 4096 +#CHECK: error: invalid use of indexed addressing +#CHECK: cs %r0, %r0, 0(%r1,%r2) + + cs %r0, %r0, -1 + cs %r0, %r0, 4096 + cs %r0, %r0, 0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-csg-01.s b/test/MC/SystemZ/insn-csg-01.s new file mode 100644 index 000000000000..b0fcfa6450a3 --- /dev/null +++ b/test/MC/SystemZ/insn-csg-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: csg %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x30] +#CHECK: csg %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x30] +#CHECK: csg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x30] +#CHECK: csg %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x30] +#CHECK: csg %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x30] +#CHECK: csg %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x30] +#CHECK: csg %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x30] +#CHECK: csg %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x30] +#CHECK: csg %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x30] +#CHECK: csg %r0, %r15, 0 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0x30] +#CHECK: csg %r15, %r0, 0 # encoding: [0xeb,0xf0,0x00,0x00,0x00,0x30] + + csg %r0, %r0, -524288 + csg %r0, %r0, -1 + csg %r0, %r0, 0 + csg %r0, %r0, 1 + csg %r0, %r0, 524287 + csg %r0, %r0, 0(%r1) + csg %r0, %r0, 0(%r15) + csg %r0, %r0, 524287(%r1) + csg %r0, %r0, 524287(%r15) + csg %r0, %r15, 0 + csg %r15, %r0, 0 diff --git a/test/MC/SystemZ/insn-csg-02.s b/test/MC/SystemZ/insn-csg-02.s new file mode 100644 index 000000000000..816b155930bb --- /dev/null +++ b/test/MC/SystemZ/insn-csg-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: csg %r0, %r0, -524289 +#CHECK: error: invalid operand +#CHECK: csg %r0, %r0, 524288 +#CHECK: error: invalid use of indexed addressing +#CHECK: csg %r0, %r0, 0(%r1,%r2) + + csg %r0, %r0, -524289 + csg %r0, %r0, 524288 + csg %r0, %r0, 0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-csy-01.s b/test/MC/SystemZ/insn-csy-01.s new file mode 100644 index 000000000000..d19b2df703c3 --- /dev/null +++ b/test/MC/SystemZ/insn-csy-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: csy %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x14] +#CHECK: csy %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x14] +#CHECK: csy %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x14] +#CHECK: csy %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x14] +#CHECK: csy %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x14] +#CHECK: csy %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x14] +#CHECK: csy %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x14] +#CHECK: csy %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x14] +#CHECK: csy %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x14] +#CHECK: csy %r0, %r15, 0 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0x14] +#CHECK: csy %r15, %r0, 0 # encoding: [0xeb,0xf0,0x00,0x00,0x00,0x14] + + csy %r0, %r0, -524288 + csy %r0, %r0, -1 + csy %r0, %r0, 0 + csy %r0, %r0, 1 + csy %r0, %r0, 524287 + csy %r0, %r0, 0(%r1) + csy %r0, %r0, 0(%r15) + csy %r0, %r0, 524287(%r1) + csy %r0, %r0, 524287(%r15) + csy %r0, %r15, 0 + csy %r15, %r0, 0 diff --git a/test/MC/SystemZ/insn-csy-02.s b/test/MC/SystemZ/insn-csy-02.s new file mode 100644 index 000000000000..3ff795909b43 --- /dev/null +++ b/test/MC/SystemZ/insn-csy-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: csy %r0, %r0, -524289 +#CHECK: error: invalid operand +#CHECK: csy %r0, %r0, 524288 +#CHECK: error: invalid use of indexed addressing +#CHECK: csy %r0, %r0, 0(%r1,%r2) + + csy %r0, %r0, -524289 + csy %r0, %r0, 524288 + csy %r0, %r0, 0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-cxbr-01.s b/test/MC/SystemZ/insn-cxbr-01.s new file mode 100644 index 000000000000..79527f0c5033 --- /dev/null +++ b/test/MC/SystemZ/insn-cxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cxbr %f0, %f0 # encoding: [0xb3,0x49,0x00,0x00] +#CHECK: cxbr %f0, %f13 # encoding: [0xb3,0x49,0x00,0x0d] +#CHECK: cxbr %f8, %f8 # encoding: [0xb3,0x49,0x00,0x88] +#CHECK: cxbr %f13, %f0 # encoding: [0xb3,0x49,0x00,0xd0] + + cxbr %f0, %f0 + cxbr %f0, %f13 + cxbr %f8, %f8 + cxbr %f13, %f0 diff --git a/test/MC/SystemZ/insn-cxbr-02.s b/test/MC/SystemZ/insn-cxbr-02.s new file mode 100644 index 000000000000..7aaca91c5f22 --- /dev/null +++ b/test/MC/SystemZ/insn-cxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: cxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: cxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: cxbr %f14, %f0 + + cxbr %f0, %f2 + cxbr %f0, %f14 + cxbr %f2, %f0 + cxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-cxfbr-01.s b/test/MC/SystemZ/insn-cxfbr-01.s new file mode 100644 index 000000000000..14bafd12071d --- /dev/null +++ b/test/MC/SystemZ/insn-cxfbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cxfbr %f0, %r0 # encoding: [0xb3,0x96,0x00,0x00] +#CHECK: cxfbr %f0, %r15 # encoding: [0xb3,0x96,0x00,0x0f] +#CHECK: cxfbr %f13, %r0 # encoding: [0xb3,0x96,0x00,0xd0] +#CHECK: cxfbr %f8, %r7 # encoding: [0xb3,0x96,0x00,0x87] +#CHECK: cxfbr %f13, %r15 # encoding: [0xb3,0x96,0x00,0xdf] + + cxfbr %f0, %r0 + cxfbr %f0, %r15 + cxfbr %f13, %r0 + cxfbr %f8, %r7 + cxfbr %f13, %r15 diff --git a/test/MC/SystemZ/insn-cxfbr-02.s b/test/MC/SystemZ/insn-cxfbr-02.s new file mode 100644 index 000000000000..5343378569c1 --- /dev/null +++ b/test/MC/SystemZ/insn-cxfbr-02.s @@ -0,0 +1,22 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cxfbr %r0, %r0 +#CHECK: error: invalid register +#CHECK: cxfbr %f0, %f0 +#CHECK: error: invalid register +#CHECK: cxfbr %f0, %a0 +#CHECK: error: invalid register +#CHECK: cxfbr %a0, %r0 +#CHECK: error: invalid register +#CHECK: cxfbr %f2, %r0 +#CHECK: error: invalid register +#CHECK: cxfbr %f14, %r0 + + cxfbr %r0, %r0 + cxfbr %f0, %f0 + cxfbr %f0, %a0 + cxfbr %a0, %r0 + cxfbr %f2, %r0 + cxfbr %f14, %r0 diff --git a/test/MC/SystemZ/insn-cxgbr-01.s b/test/MC/SystemZ/insn-cxgbr-01.s new file mode 100644 index 000000000000..90914b44e9a2 --- /dev/null +++ b/test/MC/SystemZ/insn-cxgbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cxgbr %f0, %r0 # encoding: [0xb3,0xa6,0x00,0x00] +#CHECK: cxgbr %f0, %r15 # encoding: [0xb3,0xa6,0x00,0x0f] +#CHECK: cxgbr %f13, %r0 # encoding: [0xb3,0xa6,0x00,0xd0] +#CHECK: cxgbr %f8, %r7 # encoding: [0xb3,0xa6,0x00,0x87] +#CHECK: cxgbr %f13, %r15 # encoding: [0xb3,0xa6,0x00,0xdf] + + cxgbr %f0, %r0 + cxgbr %f0, %r15 + cxgbr %f13, %r0 + cxgbr %f8, %r7 + cxgbr %f13, %r15 diff --git a/test/MC/SystemZ/insn-cxgbr-02.s b/test/MC/SystemZ/insn-cxgbr-02.s new file mode 100644 index 000000000000..d10664dba7c2 --- /dev/null +++ b/test/MC/SystemZ/insn-cxgbr-02.s @@ -0,0 +1,22 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: cxgbr %r0, %r0 +#CHECK: error: invalid register +#CHECK: cxgbr %f0, %f0 +#CHECK: error: invalid register +#CHECK: cxgbr %f0, %a0 +#CHECK: error: invalid register +#CHECK: cxgbr %a0, %r0 +#CHECK: error: invalid register +#CHECK: cxgbr %f2, %r0 +#CHECK: error: invalid register +#CHECK: cxgbr %f14, %r0 + + cxgbr %r0, %r0 + cxgbr %f0, %f0 + cxgbr %f0, %a0 + cxgbr %a0, %r0 + cxgbr %f2, %r0 + cxgbr %f14, %r0 diff --git a/test/MC/SystemZ/insn-cy-01.s b/test/MC/SystemZ/insn-cy-01.s new file mode 100644 index 000000000000..5f21b963ff90 --- /dev/null +++ b/test/MC/SystemZ/insn-cy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: cy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x59] +#CHECK: cy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x59] +#CHECK: cy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x59] +#CHECK: cy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x59] +#CHECK: cy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x59] +#CHECK: cy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x59] +#CHECK: cy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x59] +#CHECK: cy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x59] +#CHECK: cy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x59] +#CHECK: cy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x59] + + cy %r0, -524288 + cy %r0, -1 + cy %r0, 0 + cy %r0, 1 + cy %r0, 524287 + cy %r0, 0(%r1) + cy %r0, 0(%r15) + cy %r0, 524287(%r1,%r15) + cy %r0, 524287(%r15,%r1) + cy %r15, 0 diff --git a/test/MC/SystemZ/insn-cy-02.s b/test/MC/SystemZ/insn-cy-02.s new file mode 100644 index 000000000000..1c996cdced35 --- /dev/null +++ b/test/MC/SystemZ/insn-cy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: cy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: cy %r0, 524288 + + cy %r0, -524289 + cy %r0, 524288 diff --git a/test/MC/SystemZ/insn-ddb-01.s b/test/MC/SystemZ/insn-ddb-01.s new file mode 100644 index 000000000000..417af11c08ae --- /dev/null +++ b/test/MC/SystemZ/insn-ddb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ddb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x1d] +#CHECK: ddb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x1d] +#CHECK: ddb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x1d] +#CHECK: ddb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x1d] +#CHECK: ddb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x1d] +#CHECK: ddb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x1d] +#CHECK: ddb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x1d] + + ddb %f0, 0 + ddb %f0, 4095 + ddb %f0, 0(%r1) + ddb %f0, 0(%r15) + ddb %f0, 4095(%r1,%r15) + ddb %f0, 4095(%r15,%r1) + ddb %f15, 0 diff --git a/test/MC/SystemZ/insn-ddb-02.s b/test/MC/SystemZ/insn-ddb-02.s new file mode 100644 index 000000000000..c6357d10e429 --- /dev/null +++ b/test/MC/SystemZ/insn-ddb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ddb %f0, -1 +#CHECK: error: invalid operand +#CHECK: ddb %f0, 4096 + + ddb %f0, -1 + ddb %f0, 4096 diff --git a/test/MC/SystemZ/insn-ddbr-01.s b/test/MC/SystemZ/insn-ddbr-01.s new file mode 100644 index 000000000000..7ee1fee5b375 --- /dev/null +++ b/test/MC/SystemZ/insn-ddbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ddbr %f0, %f0 # encoding: [0xb3,0x1d,0x00,0x00] +#CHECK: ddbr %f0, %f15 # encoding: [0xb3,0x1d,0x00,0x0f] +#CHECK: ddbr %f7, %f8 # encoding: [0xb3,0x1d,0x00,0x78] +#CHECK: ddbr %f15, %f0 # encoding: [0xb3,0x1d,0x00,0xf0] + + ddbr %f0, %f0 + ddbr %f0, %f15 + ddbr %f7, %f8 + ddbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-deb-01.s b/test/MC/SystemZ/insn-deb-01.s new file mode 100644 index 000000000000..93cfb024648c --- /dev/null +++ b/test/MC/SystemZ/insn-deb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: deb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x0d] +#CHECK: deb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x0d] +#CHECK: deb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x0d] +#CHECK: deb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x0d] +#CHECK: deb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x0d] +#CHECK: deb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x0d] +#CHECK: deb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x0d] + + deb %f0, 0 + deb %f0, 4095 + deb %f0, 0(%r1) + deb %f0, 0(%r15) + deb %f0, 4095(%r1,%r15) + deb %f0, 4095(%r15,%r1) + deb %f15, 0 diff --git a/test/MC/SystemZ/insn-deb-02.s b/test/MC/SystemZ/insn-deb-02.s new file mode 100644 index 000000000000..e4edd4ef86d1 --- /dev/null +++ b/test/MC/SystemZ/insn-deb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: deb %f0, -1 +#CHECK: error: invalid operand +#CHECK: deb %f0, 4096 + + deb %f0, -1 + deb %f0, 4096 diff --git a/test/MC/SystemZ/insn-debr-01.s b/test/MC/SystemZ/insn-debr-01.s new file mode 100644 index 000000000000..02ee16c9cf44 --- /dev/null +++ b/test/MC/SystemZ/insn-debr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: debr %f0, %f0 # encoding: [0xb3,0x0d,0x00,0x00] +#CHECK: debr %f0, %f15 # encoding: [0xb3,0x0d,0x00,0x0f] +#CHECK: debr %f7, %f8 # encoding: [0xb3,0x0d,0x00,0x78] +#CHECK: debr %f15, %f0 # encoding: [0xb3,0x0d,0x00,0xf0] + + debr %f0, %f0 + debr %f0, %f15 + debr %f7, %f8 + debr %f15, %f0 diff --git a/test/MC/SystemZ/insn-dl-01.s b/test/MC/SystemZ/insn-dl-01.s new file mode 100644 index 000000000000..50b24e7a00da --- /dev/null +++ b/test/MC/SystemZ/insn-dl-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dl %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x97] +#CHECK: dl %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x97] +#CHECK: dl %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x97] +#CHECK: dl %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x97] +#CHECK: dl %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x97] +#CHECK: dl %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x97] +#CHECK: dl %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x97] +#CHECK: dl %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x97] +#CHECK: dl %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x97] +#CHECK: dl %r14, 0 # encoding: [0xe3,0xe0,0x00,0x00,0x00,0x97] + + dl %r0, -524288 + dl %r0, -1 + dl %r0, 0 + dl %r0, 1 + dl %r0, 524287 + dl %r0, 0(%r1) + dl %r0, 0(%r15) + dl %r0, 524287(%r1,%r15) + dl %r0, 524287(%r15,%r1) + dl %r14, 0 diff --git a/test/MC/SystemZ/insn-dl-02.s b/test/MC/SystemZ/insn-dl-02.s new file mode 100644 index 000000000000..8f9f37320b86 --- /dev/null +++ b/test/MC/SystemZ/insn-dl-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: dl %r0, -524289 +#CHECK: error: invalid operand +#CHECK: dl %r0, 524288 +#CHECK: error: invalid register +#CHECK: dl %r1, 0 +#CHECK: error: invalid register +#CHECK: dl %r15, 0 + + dl %r0, -524289 + dl %r0, 524288 + dl %r1, 0 + dl %r15, 0 diff --git a/test/MC/SystemZ/insn-dlg-01.s b/test/MC/SystemZ/insn-dlg-01.s new file mode 100644 index 000000000000..8a304f828ec8 --- /dev/null +++ b/test/MC/SystemZ/insn-dlg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dlg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x87] +#CHECK: dlg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x87] +#CHECK: dlg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x87] +#CHECK: dlg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x87] +#CHECK: dlg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x87] +#CHECK: dlg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x87] +#CHECK: dlg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x87] +#CHECK: dlg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x87] +#CHECK: dlg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x87] +#CHECK: dlg %r14, 0 # encoding: [0xe3,0xe0,0x00,0x00,0x00,0x87] + + dlg %r0, -524288 + dlg %r0, -1 + dlg %r0, 0 + dlg %r0, 1 + dlg %r0, 524287 + dlg %r0, 0(%r1) + dlg %r0, 0(%r15) + dlg %r0, 524287(%r1,%r15) + dlg %r0, 524287(%r15,%r1) + dlg %r14, 0 diff --git a/test/MC/SystemZ/insn-dlg-02.s b/test/MC/SystemZ/insn-dlg-02.s new file mode 100644 index 000000000000..cbed8981732f --- /dev/null +++ b/test/MC/SystemZ/insn-dlg-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: dlg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: dlg %r0, 524288 +#CHECK: error: invalid register +#CHECK: dlg %r1, 0 +#CHECK: error: invalid register +#CHECK: dlg %r15, 0 + + dlg %r0, -524289 + dlg %r0, 524288 + dlg %r1, 0 + dlg %r15, 0 diff --git a/test/MC/SystemZ/insn-dlgr-01.s b/test/MC/SystemZ/insn-dlgr-01.s new file mode 100644 index 000000000000..b2a4de5f91f3 --- /dev/null +++ b/test/MC/SystemZ/insn-dlgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dlgr %r0, %r0 # encoding: [0xb9,0x87,0x00,0x00] +#CHECK: dlgr %r0, %r15 # encoding: [0xb9,0x87,0x00,0x0f] +#CHECK: dlgr %r14, %r0 # encoding: [0xb9,0x87,0x00,0xe0] +#CHECK: dlgr %r6, %r9 # encoding: [0xb9,0x87,0x00,0x69] + + dlgr %r0,%r0 + dlgr %r0,%r15 + dlgr %r14,%r0 + dlgr %r6,%r9 diff --git a/test/MC/SystemZ/insn-dlgr-02.s b/test/MC/SystemZ/insn-dlgr-02.s new file mode 100644 index 000000000000..c407b4fb0bf8 --- /dev/null +++ b/test/MC/SystemZ/insn-dlgr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: dlgr %r1, %r0 +#CHECK: error: invalid register +#CHECK: dlgr %r15, %r0 + + dlgr %r1, %r0 + dlgr %r15, %r0 diff --git a/test/MC/SystemZ/insn-dlr-01.s b/test/MC/SystemZ/insn-dlr-01.s new file mode 100644 index 000000000000..7e8be79e46aa --- /dev/null +++ b/test/MC/SystemZ/insn-dlr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dlr %r0, %r0 # encoding: [0xb9,0x97,0x00,0x00] +#CHECK: dlr %r0, %r15 # encoding: [0xb9,0x97,0x00,0x0f] +#CHECK: dlr %r14, %r0 # encoding: [0xb9,0x97,0x00,0xe0] +#CHECK: dlr %r6, %r9 # encoding: [0xb9,0x97,0x00,0x69] + + dlr %r0,%r0 + dlr %r0,%r15 + dlr %r14,%r0 + dlr %r6,%r9 diff --git a/test/MC/SystemZ/insn-dlr-02.s b/test/MC/SystemZ/insn-dlr-02.s new file mode 100644 index 000000000000..eb31e18fd876 --- /dev/null +++ b/test/MC/SystemZ/insn-dlr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: dlr %r1, %r0 +#CHECK: error: invalid register +#CHECK: dlr %r15, %r0 + + dlr %r1, %r0 + dlr %r15, %r0 diff --git a/test/MC/SystemZ/insn-dsg-01.s b/test/MC/SystemZ/insn-dsg-01.s new file mode 100644 index 000000000000..5cd0b40a9fb1 --- /dev/null +++ b/test/MC/SystemZ/insn-dsg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dsg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x0d] +#CHECK: dsg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x0d] +#CHECK: dsg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x0d] +#CHECK: dsg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x0d] +#CHECK: dsg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x0d] +#CHECK: dsg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x0d] +#CHECK: dsg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x0d] +#CHECK: dsg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x0d] +#CHECK: dsg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x0d] +#CHECK: dsg %r14, 0 # encoding: [0xe3,0xe0,0x00,0x00,0x00,0x0d] + + dsg %r0, -524288 + dsg %r0, -1 + dsg %r0, 0 + dsg %r0, 1 + dsg %r0, 524287 + dsg %r0, 0(%r1) + dsg %r0, 0(%r15) + dsg %r0, 524287(%r1,%r15) + dsg %r0, 524287(%r15,%r1) + dsg %r14, 0 diff --git a/test/MC/SystemZ/insn-dsg-02.s b/test/MC/SystemZ/insn-dsg-02.s new file mode 100644 index 000000000000..16979418c48b --- /dev/null +++ b/test/MC/SystemZ/insn-dsg-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: dsg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: dsg %r0, 524288 +#CHECK: error: invalid register +#CHECK: dsg %r1, 0 +#CHECK: error: invalid register +#CHECK: dsg %r15, 0 + + dsg %r0, -524289 + dsg %r0, 524288 + dsg %r1, 0 + dsg %r15, 0 diff --git a/test/MC/SystemZ/insn-dsgf-01.s b/test/MC/SystemZ/insn-dsgf-01.s new file mode 100644 index 000000000000..2cde0c79d9d4 --- /dev/null +++ b/test/MC/SystemZ/insn-dsgf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dsgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1d] +#CHECK: dsgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1d] +#CHECK: dsgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1d] +#CHECK: dsgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x1d] +#CHECK: dsgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x1d] +#CHECK: dsgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x1d] +#CHECK: dsgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x1d] +#CHECK: dsgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x1d] +#CHECK: dsgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x1d] +#CHECK: dsgf %r14, 0 # encoding: [0xe3,0xe0,0x00,0x00,0x00,0x1d] + + dsgf %r0, -524288 + dsgf %r0, -1 + dsgf %r0, 0 + dsgf %r0, 1 + dsgf %r0, 524287 + dsgf %r0, 0(%r1) + dsgf %r0, 0(%r15) + dsgf %r0, 524287(%r1,%r15) + dsgf %r0, 524287(%r15,%r1) + dsgf %r14, 0 diff --git a/test/MC/SystemZ/insn-dsgf-02.s b/test/MC/SystemZ/insn-dsgf-02.s new file mode 100644 index 000000000000..253d9ad70be5 --- /dev/null +++ b/test/MC/SystemZ/insn-dsgf-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: dsgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: dsgf %r0, 524288 +#CHECK: error: invalid register +#CHECK: dsgf %r1, 0 +#CHECK: error: invalid register +#CHECK: dsgf %r15, 0 + + dsgf %r0, -524289 + dsgf %r0, 524288 + dsgf %r1, 0 + dsgf %r15, 0 diff --git a/test/MC/SystemZ/insn-dsgfr-01.s b/test/MC/SystemZ/insn-dsgfr-01.s new file mode 100644 index 000000000000..9b61550ffcbf --- /dev/null +++ b/test/MC/SystemZ/insn-dsgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dsgfr %r0, %r0 # encoding: [0xb9,0x1d,0x00,0x00] +#CHECK: dsgfr %r0, %r15 # encoding: [0xb9,0x1d,0x00,0x0f] +#CHECK: dsgfr %r14, %r0 # encoding: [0xb9,0x1d,0x00,0xe0] +#CHECK: dsgfr %r6, %r9 # encoding: [0xb9,0x1d,0x00,0x69] + + dsgfr %r0,%r0 + dsgfr %r0,%r15 + dsgfr %r14,%r0 + dsgfr %r6,%r9 diff --git a/test/MC/SystemZ/insn-dsgfr-02.s b/test/MC/SystemZ/insn-dsgfr-02.s new file mode 100644 index 000000000000..2eb8b2394723 --- /dev/null +++ b/test/MC/SystemZ/insn-dsgfr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: dsgfr %r1, %r0 +#CHECK: error: invalid register +#CHECK: dsgfr %r15, %r0 + + dsgfr %r1, %r0 + dsgfr %r15, %r0 diff --git a/test/MC/SystemZ/insn-dsgr-01.s b/test/MC/SystemZ/insn-dsgr-01.s new file mode 100644 index 000000000000..02b4099cfaa7 --- /dev/null +++ b/test/MC/SystemZ/insn-dsgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dsgr %r0, %r0 # encoding: [0xb9,0x0d,0x00,0x00] +#CHECK: dsgr %r0, %r15 # encoding: [0xb9,0x0d,0x00,0x0f] +#CHECK: dsgr %r14, %r0 # encoding: [0xb9,0x0d,0x00,0xe0] +#CHECK: dsgr %r6, %r9 # encoding: [0xb9,0x0d,0x00,0x69] + + dsgr %r0,%r0 + dsgr %r0,%r15 + dsgr %r14,%r0 + dsgr %r6,%r9 diff --git a/test/MC/SystemZ/insn-dsgr-02.s b/test/MC/SystemZ/insn-dsgr-02.s new file mode 100644 index 000000000000..019429580696 --- /dev/null +++ b/test/MC/SystemZ/insn-dsgr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: dsgr %r1, %r0 +#CHECK: error: invalid register +#CHECK: dsgr %r15, %r0 + + dsgr %r1, %r0 + dsgr %r15, %r0 diff --git a/test/MC/SystemZ/insn-dxbr-01.s b/test/MC/SystemZ/insn-dxbr-01.s new file mode 100644 index 000000000000..6a452080ced9 --- /dev/null +++ b/test/MC/SystemZ/insn-dxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dxbr %f0, %f0 # encoding: [0xb3,0x4d,0x00,0x00] +#CHECK: dxbr %f0, %f13 # encoding: [0xb3,0x4d,0x00,0x0d] +#CHECK: dxbr %f8, %f8 # encoding: [0xb3,0x4d,0x00,0x88] +#CHECK: dxbr %f13, %f0 # encoding: [0xb3,0x4d,0x00,0xd0] + + dxbr %f0, %f0 + dxbr %f0, %f13 + dxbr %f8, %f8 + dxbr %f13, %f0 diff --git a/test/MC/SystemZ/insn-dxbr-02.s b/test/MC/SystemZ/insn-dxbr-02.s new file mode 100644 index 000000000000..cac64191b8be --- /dev/null +++ b/test/MC/SystemZ/insn-dxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: dxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: dxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: dxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: dxbr %f14, %f0 + + dxbr %f0, %f2 + dxbr %f0, %f14 + dxbr %f2, %f0 + dxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-ear-01.s b/test/MC/SystemZ/insn-ear-01.s new file mode 100644 index 000000000000..f614f86999ba --- /dev/null +++ b/test/MC/SystemZ/insn-ear-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ear %r0, %a0 # encoding: [0xb2,0x4f,0x00,0x00] +#CHECK: ear %r0, %a15 # encoding: [0xb2,0x4f,0x00,0x0f] +#CHECK: ear %r15, %a0 # encoding: [0xb2,0x4f,0x00,0xf0] +#CHECK: ear %r7, %a8 # encoding: [0xb2,0x4f,0x00,0x78] +#CHECK: ear %r15, %a15 # encoding: [0xb2,0x4f,0x00,0xff] + + ear %r0, %a0 + ear %r0, %a15 + ear %r15, %a0 + ear %r7, %a8 + ear %r15, %a15 diff --git a/test/MC/SystemZ/insn-ear-02.s b/test/MC/SystemZ/insn-ear-02.s new file mode 100644 index 000000000000..7fb35eaa5353 --- /dev/null +++ b/test/MC/SystemZ/insn-ear-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ear %r0, 0 +#CHECK: error: invalid register +#CHECK: ear %r0, %r0 +#CHECK: error: invalid register +#CHECK: ear %a0, %r0 + + ear %r0, 0 + ear %r0, %r0 + ear %a0, %r0 diff --git a/test/MC/SystemZ/insn-fidbr-01.s b/test/MC/SystemZ/insn-fidbr-01.s new file mode 100644 index 000000000000..e52c91c21142 --- /dev/null +++ b/test/MC/SystemZ/insn-fidbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: fidbr %f0, 0, %f0 # encoding: [0xb3,0x5f,0x00,0x00] +#CHECK: fidbr %f0, 0, %f15 # encoding: [0xb3,0x5f,0x00,0x0f] +#CHECK: fidbr %f0, 15, %f0 # encoding: [0xb3,0x5f,0xf0,0x00] +#CHECK: fidbr %f4, 5, %f6 # encoding: [0xb3,0x5f,0x50,0x46] +#CHECK: fidbr %f15, 0, %f0 # encoding: [0xb3,0x5f,0x00,0xf0] + + fidbr %f0, 0, %f0 + fidbr %f0, 0, %f15 + fidbr %f0, 15, %f0 + fidbr %f4, 5, %f6 + fidbr %f15, 0, %f0 diff --git a/test/MC/SystemZ/insn-fidbr-02.s b/test/MC/SystemZ/insn-fidbr-02.s new file mode 100644 index 000000000000..5a35f46589bc --- /dev/null +++ b/test/MC/SystemZ/insn-fidbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: fidbr %r0, 0, %f0 +#CHECK: error: invalid register +#CHECK: fidbr %f0, 0, %r0 +#CHECK: error: invalid operand +#CHECK: fidbr %f0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: fidbr %f0, 16, %f0 + + fidbr %r0, 0, %f0 + fidbr %f0, 0, %r0 + fidbr %f0, -1, %f0 + fidbr %f0, 16, %f0 diff --git a/test/MC/SystemZ/insn-fiebr-01.s b/test/MC/SystemZ/insn-fiebr-01.s new file mode 100644 index 000000000000..0b4e633a1edc --- /dev/null +++ b/test/MC/SystemZ/insn-fiebr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: fiebr %f0, 0, %f0 # encoding: [0xb3,0x57,0x00,0x00] +#CHECK: fiebr %f0, 0, %f15 # encoding: [0xb3,0x57,0x00,0x0f] +#CHECK: fiebr %f0, 15, %f0 # encoding: [0xb3,0x57,0xf0,0x00] +#CHECK: fiebr %f4, 5, %f6 # encoding: [0xb3,0x57,0x50,0x46] +#CHECK: fiebr %f15, 0, %f0 # encoding: [0xb3,0x57,0x00,0xf0] + + fiebr %f0, 0, %f0 + fiebr %f0, 0, %f15 + fiebr %f0, 15, %f0 + fiebr %f4, 5, %f6 + fiebr %f15, 0, %f0 diff --git a/test/MC/SystemZ/insn-fiebr-02.s b/test/MC/SystemZ/insn-fiebr-02.s new file mode 100644 index 000000000000..2ecdd4d1bc00 --- /dev/null +++ b/test/MC/SystemZ/insn-fiebr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: fiebr %r0, 0, %f0 +#CHECK: error: invalid register +#CHECK: fiebr %f0, 0, %r0 +#CHECK: error: invalid operand +#CHECK: fiebr %f0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: fiebr %f0, 16, %f0 + + fiebr %r0, 0, %f0 + fiebr %f0, 0, %r0 + fiebr %f0, -1, %f0 + fiebr %f0, 16, %f0 diff --git a/test/MC/SystemZ/insn-fixbr-01.s b/test/MC/SystemZ/insn-fixbr-01.s new file mode 100644 index 000000000000..02676ed76d32 --- /dev/null +++ b/test/MC/SystemZ/insn-fixbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: fixbr %f0, 0, %f0 # encoding: [0xb3,0x47,0x00,0x00] +#CHECK: fixbr %f0, 0, %f13 # encoding: [0xb3,0x47,0x00,0x0d] +#CHECK: fixbr %f0, 15, %f0 # encoding: [0xb3,0x47,0xf0,0x00] +#CHECK: fixbr %f4, 5, %f8 # encoding: [0xb3,0x47,0x50,0x48] +#CHECK: fixbr %f13, 0, %f0 # encoding: [0xb3,0x47,0x00,0xd0] + + fixbr %f0, 0, %f0 + fixbr %f0, 0, %f13 + fixbr %f0, 15, %f0 + fixbr %f4, 5, %f8 + fixbr %f13, 0, %f0 diff --git a/test/MC/SystemZ/insn-fixbr-02.s b/test/MC/SystemZ/insn-fixbr-02.s new file mode 100644 index 000000000000..3f6873429208 --- /dev/null +++ b/test/MC/SystemZ/insn-fixbr-02.s @@ -0,0 +1,28 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: fixbr %r0, 0, %f0 +#CHECK: error: invalid register +#CHECK: fixbr %f0, 0, %r0 +#CHECK: error: invalid operand +#CHECK: fixbr %f0, -1, %f0 +#CHECK: error: invalid operand +#CHECK: fixbr %f0, 16, %f0 +#CHECK: error: invalid register +#CHECK: fixbr %f0, 0, %f2 +#CHECK: error: invalid register +#CHECK: fixbr %f0, 0, %f14 +#CHECK: error: invalid register +#CHECK: fixbr %f2, 0, %f0 +#CHECK: error: invalid register +#CHECK: fixbr %f14, 0, %f0 + + fixbr %r0, 0, %f0 + fixbr %f0, 0, %r0 + fixbr %f0, -1, %f0 + fixbr %f0, 16, %f0 + fixbr %f0, 0, %f2 + fixbr %f0, 0, %f14 + fixbr %f2, 0, %f0 + fixbr %f14, 0, %f0 diff --git a/test/MC/SystemZ/insn-flogr-01.s b/test/MC/SystemZ/insn-flogr-01.s new file mode 100644 index 000000000000..f6031ce3b678 --- /dev/null +++ b/test/MC/SystemZ/insn-flogr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: flogr %r0, %r0 # encoding: [0xb9,0x83,0x00,0x00] +#CHECK: flogr %r0, %r15 # encoding: [0xb9,0x83,0x00,0x0f] +#CHECK: flogr %r10, %r9 # encoding: [0xb9,0x83,0x00,0xa9] +#CHECK: flogr %r14, %r0 # encoding: [0xb9,0x83,0x00,0xe0] + + flogr %r0, %r0 + flogr %r0, %r15 + flogr %r10, %r9 + flogr %r14, %r0 diff --git a/test/MC/SystemZ/insn-flogr-02.s b/test/MC/SystemZ/insn-flogr-02.s new file mode 100644 index 000000000000..e0d117c3be73 --- /dev/null +++ b/test/MC/SystemZ/insn-flogr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: flogr %r1, %r0 +#CHECK: error: invalid register +#CHECK: flogr %r15, %r0 + + flogr %r1, %r0 + flogr %r15, %r0 diff --git a/test/MC/SystemZ/insn-ic-01.s b/test/MC/SystemZ/insn-ic-01.s new file mode 100644 index 000000000000..76772f9d1a08 --- /dev/null +++ b/test/MC/SystemZ/insn-ic-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ic %r0, 0 # encoding: [0x43,0x00,0x00,0x00] +#CHECK: ic %r0, 4095 # encoding: [0x43,0x00,0x0f,0xff] +#CHECK: ic %r0, 0(%r1) # encoding: [0x43,0x00,0x10,0x00] +#CHECK: ic %r0, 0(%r15) # encoding: [0x43,0x00,0xf0,0x00] +#CHECK: ic %r0, 4095(%r1,%r15) # encoding: [0x43,0x01,0xff,0xff] +#CHECK: ic %r0, 4095(%r15,%r1) # encoding: [0x43,0x0f,0x1f,0xff] +#CHECK: ic %r15, 0 # encoding: [0x43,0xf0,0x00,0x00] + + ic %r0, 0 + ic %r0, 4095 + ic %r0, 0(%r1) + ic %r0, 0(%r15) + ic %r0, 4095(%r1,%r15) + ic %r0, 4095(%r15,%r1) + ic %r15, 0 diff --git a/test/MC/SystemZ/insn-ic-02.s b/test/MC/SystemZ/insn-ic-02.s new file mode 100644 index 000000000000..e70ef1c58dbe --- /dev/null +++ b/test/MC/SystemZ/insn-ic-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ic %r0, -1 +#CHECK: error: invalid operand +#CHECK: ic %r0, 4096 + + ic %r0, -1 + ic %r0, 4096 diff --git a/test/MC/SystemZ/insn-icy-01.s b/test/MC/SystemZ/insn-icy-01.s new file mode 100644 index 000000000000..079ae2142f1c --- /dev/null +++ b/test/MC/SystemZ/insn-icy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: icy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x73] +#CHECK: icy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x73] +#CHECK: icy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x73] +#CHECK: icy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x73] +#CHECK: icy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x73] +#CHECK: icy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x73] +#CHECK: icy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x73] +#CHECK: icy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x73] +#CHECK: icy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x73] +#CHECK: icy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x73] + + icy %r0, -524288 + icy %r0, -1 + icy %r0, 0 + icy %r0, 1 + icy %r0, 524287 + icy %r0, 0(%r1) + icy %r0, 0(%r15) + icy %r0, 524287(%r1,%r15) + icy %r0, 524287(%r15,%r1) + icy %r15, 0 diff --git a/test/MC/SystemZ/insn-icy-02.s b/test/MC/SystemZ/insn-icy-02.s new file mode 100644 index 000000000000..321c86f9dfff --- /dev/null +++ b/test/MC/SystemZ/insn-icy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: icy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: icy %r0, 524288 + + icy %r0, -524289 + icy %r0, 524288 diff --git a/test/MC/SystemZ/insn-iihf-01.s b/test/MC/SystemZ/insn-iihf-01.s new file mode 100644 index 000000000000..bf8d48fbc634 --- /dev/null +++ b/test/MC/SystemZ/insn-iihf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: iihf %r0, 0 # encoding: [0xc0,0x08,0x00,0x00,0x00,0x00] +#CHECK: iihf %r0, 4294967295 # encoding: [0xc0,0x08,0xff,0xff,0xff,0xff] +#CHECK: iihf %r15, 0 # encoding: [0xc0,0xf8,0x00,0x00,0x00,0x00] + + iihf %r0, 0 + iihf %r0, 0xffffffff + iihf %r15, 0 diff --git a/test/MC/SystemZ/insn-iihf-02.s b/test/MC/SystemZ/insn-iihf-02.s new file mode 100644 index 000000000000..1c7a69addf60 --- /dev/null +++ b/test/MC/SystemZ/insn-iihf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: iihf %r0, -1 +#CHECK: error: invalid operand +#CHECK: iihf %r0, 1 << 32 + + iihf %r0, -1 + iihf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-iihh-01.s b/test/MC/SystemZ/insn-iihh-01.s new file mode 100644 index 000000000000..a2ba9a33a456 --- /dev/null +++ b/test/MC/SystemZ/insn-iihh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: iihh %r0, 0 # encoding: [0xa5,0x00,0x00,0x00] +#CHECK: iihh %r0, 32768 # encoding: [0xa5,0x00,0x80,0x00] +#CHECK: iihh %r0, 65535 # encoding: [0xa5,0x00,0xff,0xff] +#CHECK: iihh %r15, 0 # encoding: [0xa5,0xf0,0x00,0x00] + + iihh %r0, 0 + iihh %r0, 0x8000 + iihh %r0, 0xffff + iihh %r15, 0 diff --git a/test/MC/SystemZ/insn-iihh-02.s b/test/MC/SystemZ/insn-iihh-02.s new file mode 100644 index 000000000000..2d8f8541dd07 --- /dev/null +++ b/test/MC/SystemZ/insn-iihh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: iihh %r0, -1 +#CHECK: error: invalid operand +#CHECK: iihh %r0, 0x10000 + + iihh %r0, -1 + iihh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-iihl-01.s b/test/MC/SystemZ/insn-iihl-01.s new file mode 100644 index 000000000000..ff591e8b8696 --- /dev/null +++ b/test/MC/SystemZ/insn-iihl-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: iihl %r0, 0 # encoding: [0xa5,0x01,0x00,0x00] +#CHECK: iihl %r0, 32768 # encoding: [0xa5,0x01,0x80,0x00] +#CHECK: iihl %r0, 65535 # encoding: [0xa5,0x01,0xff,0xff] +#CHECK: iihl %r15, 0 # encoding: [0xa5,0xf1,0x00,0x00] + + iihl %r0, 0 + iihl %r0, 0x8000 + iihl %r0, 0xffff + iihl %r15, 0 diff --git a/test/MC/SystemZ/insn-iihl-02.s b/test/MC/SystemZ/insn-iihl-02.s new file mode 100644 index 000000000000..262955e38d39 --- /dev/null +++ b/test/MC/SystemZ/insn-iihl-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: iihl %r0, -1 +#CHECK: error: invalid operand +#CHECK: iihl %r0, 0x10000 + + iihl %r0, -1 + iihl %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-iilf-01.s b/test/MC/SystemZ/insn-iilf-01.s new file mode 100644 index 000000000000..228e1476764c --- /dev/null +++ b/test/MC/SystemZ/insn-iilf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: iilf %r0, 0 # encoding: [0xc0,0x09,0x00,0x00,0x00,0x00] +#CHECK: iilf %r0, 4294967295 # encoding: [0xc0,0x09,0xff,0xff,0xff,0xff] +#CHECK: iilf %r15, 0 # encoding: [0xc0,0xf9,0x00,0x00,0x00,0x00] + + iilf %r0, 0 + iilf %r0, 0xffffffff + iilf %r15, 0 diff --git a/test/MC/SystemZ/insn-iilf-02.s b/test/MC/SystemZ/insn-iilf-02.s new file mode 100644 index 000000000000..c7571e8f6d17 --- /dev/null +++ b/test/MC/SystemZ/insn-iilf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: iilf %r0, -1 +#CHECK: error: invalid operand +#CHECK: iilf %r0, 1 << 32 + + iilf %r0, -1 + iilf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-iilh-01.s b/test/MC/SystemZ/insn-iilh-01.s new file mode 100644 index 000000000000..045ccfe80b66 --- /dev/null +++ b/test/MC/SystemZ/insn-iilh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: iilh %r0, 0 # encoding: [0xa5,0x02,0x00,0x00] +#CHECK: iilh %r0, 32768 # encoding: [0xa5,0x02,0x80,0x00] +#CHECK: iilh %r0, 65535 # encoding: [0xa5,0x02,0xff,0xff] +#CHECK: iilh %r15, 0 # encoding: [0xa5,0xf2,0x00,0x00] + + iilh %r0, 0 + iilh %r0, 0x8000 + iilh %r0, 0xffff + iilh %r15, 0 diff --git a/test/MC/SystemZ/insn-iilh-02.s b/test/MC/SystemZ/insn-iilh-02.s new file mode 100644 index 000000000000..af5bdacaff8b --- /dev/null +++ b/test/MC/SystemZ/insn-iilh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: iilh %r0, -1 +#CHECK: error: invalid operand +#CHECK: iilh %r0, 0x10000 + + iilh %r0, -1 + iilh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-iill-01.s b/test/MC/SystemZ/insn-iill-01.s new file mode 100644 index 000000000000..bf50eeb0f678 --- /dev/null +++ b/test/MC/SystemZ/insn-iill-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: iill %r0, 0 # encoding: [0xa5,0x03,0x00,0x00] +#CHECK: iill %r0, 32768 # encoding: [0xa5,0x03,0x80,0x00] +#CHECK: iill %r0, 65535 # encoding: [0xa5,0x03,0xff,0xff] +#CHECK: iill %r15, 0 # encoding: [0xa5,0xf3,0x00,0x00] + + iill %r0, 0 + iill %r0, 0x8000 + iill %r0, 0xffff + iill %r15, 0 diff --git a/test/MC/SystemZ/insn-iill-02.s b/test/MC/SystemZ/insn-iill-02.s new file mode 100644 index 000000000000..fe31e44ee66b --- /dev/null +++ b/test/MC/SystemZ/insn-iill-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: iill %r0, -1 +#CHECK: error: invalid operand +#CHECK: iill %r0, 0x10000 + + iill %r0, -1 + iill %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-l-01.s b/test/MC/SystemZ/insn-l-01.s new file mode 100644 index 000000000000..a589116ebf41 --- /dev/null +++ b/test/MC/SystemZ/insn-l-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: l %r0, 0 # encoding: [0x58,0x00,0x00,0x00] +#CHECK: l %r0, 4095 # encoding: [0x58,0x00,0x0f,0xff] +#CHECK: l %r0, 0(%r1) # encoding: [0x58,0x00,0x10,0x00] +#CHECK: l %r0, 0(%r15) # encoding: [0x58,0x00,0xf0,0x00] +#CHECK: l %r0, 4095(%r1,%r15) # encoding: [0x58,0x01,0xff,0xff] +#CHECK: l %r0, 4095(%r15,%r1) # encoding: [0x58,0x0f,0x1f,0xff] +#CHECK: l %r15, 0 # encoding: [0x58,0xf0,0x00,0x00] + + l %r0, 0 + l %r0, 4095 + l %r0, 0(%r1) + l %r0, 0(%r15) + l %r0, 4095(%r1,%r15) + l %r0, 4095(%r15,%r1) + l %r15, 0 diff --git a/test/MC/SystemZ/insn-l-02.s b/test/MC/SystemZ/insn-l-02.s new file mode 100644 index 000000000000..fad96ff6ce2f --- /dev/null +++ b/test/MC/SystemZ/insn-l-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: l %r0, -1 +#CHECK: error: invalid operand +#CHECK: l %r0, 4096 + + l %r0, -1 + l %r0, 4096 diff --git a/test/MC/SystemZ/insn-la-01.s b/test/MC/SystemZ/insn-la-01.s new file mode 100644 index 000000000000..d4776ab58570 --- /dev/null +++ b/test/MC/SystemZ/insn-la-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: la %r0, 0 # encoding: [0x41,0x00,0x00,0x00] +#CHECK: la %r0, 4095 # encoding: [0x41,0x00,0x0f,0xff] +#CHECK: la %r0, 0(%r1) # encoding: [0x41,0x00,0x10,0x00] +#CHECK: la %r0, 0(%r15) # encoding: [0x41,0x00,0xf0,0x00] +#CHECK: la %r0, 4095(%r1,%r15) # encoding: [0x41,0x01,0xff,0xff] +#CHECK: la %r0, 4095(%r15,%r1) # encoding: [0x41,0x0f,0x1f,0xff] +#CHECK: la %r15, 0 # encoding: [0x41,0xf0,0x00,0x00] + + la %r0, 0 + la %r0, 4095 + la %r0, 0(%r1) + la %r0, 0(%r15) + la %r0, 4095(%r1,%r15) + la %r0, 4095(%r15,%r1) + la %r15, 0 diff --git a/test/MC/SystemZ/insn-la-02.s b/test/MC/SystemZ/insn-la-02.s new file mode 100644 index 000000000000..35c1ab04b5ea --- /dev/null +++ b/test/MC/SystemZ/insn-la-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: la %r0, -1 +#CHECK: error: invalid operand +#CHECK: la %r0, 4096 + + la %r0, -1 + la %r0, 4096 diff --git a/test/MC/SystemZ/insn-larl-01.s b/test/MC/SystemZ/insn-larl-01.s new file mode 100644 index 000000000000..3d0f98f562a2 --- /dev/null +++ b/test/MC/SystemZ/insn-larl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: larl %r0, 2864434397 # encoding: [0xc0,0x00,0x55,0x5d,0xe6,0x6e] +#CHECK: larl %r15, 2864434397 # encoding: [0xc0,0xf0,0x55,0x5d,0xe6,0x6e] + + larl %r0,0xaabbccdd + larl %r15,0xaabbccdd + +#CHECK: larl %r0, foo # encoding: [0xc0,0x00,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: larl %r15, foo # encoding: [0xc0,0xf0,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + larl %r0,foo + larl %r15,foo + +#CHECK: larl %r3, bar+100 # encoding: [0xc0,0x30,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: larl %r4, bar+100 # encoding: [0xc0,0x40,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + larl %r3,bar+100 + larl %r4,bar+100 + +#CHECK: larl %r7, frob@PLT # encoding: [0xc0,0x70,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: larl %r8, frob@PLT # encoding: [0xc0,0x80,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + larl %r7,frob@PLT + larl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-lay-01.s b/test/MC/SystemZ/insn-lay-01.s new file mode 100644 index 000000000000..daa88288ab56 --- /dev/null +++ b/test/MC/SystemZ/insn-lay-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lay %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x71] +#CHECK: lay %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x71] +#CHECK: lay %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x71] +#CHECK: lay %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x71] +#CHECK: lay %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x71] +#CHECK: lay %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x71] +#CHECK: lay %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x71] +#CHECK: lay %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x71] +#CHECK: lay %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x71] +#CHECK: lay %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x71] + + lay %r0, -524288 + lay %r0, -1 + lay %r0, 0 + lay %r0, 1 + lay %r0, 524287 + lay %r0, 0(%r1) + lay %r0, 0(%r15) + lay %r0, 524287(%r1,%r15) + lay %r0, 524287(%r15,%r1) + lay %r15, 0 diff --git a/test/MC/SystemZ/insn-lay-02.s b/test/MC/SystemZ/insn-lay-02.s new file mode 100644 index 000000000000..2729eead22a6 --- /dev/null +++ b/test/MC/SystemZ/insn-lay-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lay %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lay %r0, 524288 + + lay %r0, -524289 + lay %r0, 524288 diff --git a/test/MC/SystemZ/insn-lb-01.s b/test/MC/SystemZ/insn-lb-01.s new file mode 100644 index 000000000000..e9ee0fab2266 --- /dev/null +++ b/test/MC/SystemZ/insn-lb-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lb %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x76] +#CHECK: lb %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x76] +#CHECK: lb %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x76] +#CHECK: lb %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x76] +#CHECK: lb %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x76] +#CHECK: lb %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x76] +#CHECK: lb %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x76] +#CHECK: lb %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x76] +#CHECK: lb %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x76] +#CHECK: lb %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x76] + + lb %r0, -524288 + lb %r0, -1 + lb %r0, 0 + lb %r0, 1 + lb %r0, 524287 + lb %r0, 0(%r1) + lb %r0, 0(%r15) + lb %r0, 524287(%r1,%r15) + lb %r0, 524287(%r15,%r1) + lb %r15, 0 diff --git a/test/MC/SystemZ/insn-lb-02.s b/test/MC/SystemZ/insn-lb-02.s new file mode 100644 index 000000000000..e65edaf09dac --- /dev/null +++ b/test/MC/SystemZ/insn-lb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lb %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lb %r0, 524288 + + lb %r0, -524289 + lb %r0, 524288 diff --git a/test/MC/SystemZ/insn-lbr-01.s b/test/MC/SystemZ/insn-lbr-01.s new file mode 100644 index 000000000000..cb4ead043080 --- /dev/null +++ b/test/MC/SystemZ/insn-lbr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lbr %r0, %r15 # encoding: [0xb9,0x26,0x00,0x0f] +#CHECK: lbr %r7, %r8 # encoding: [0xb9,0x26,0x00,0x78] +#CHECK: lbr %r15, %r0 # encoding: [0xb9,0x26,0x00,0xf0] + + lbr %r0, %r15 + lbr %r7, %r8 + lbr %r15, %r0 diff --git a/test/MC/SystemZ/insn-lcdbr-01.s b/test/MC/SystemZ/insn-lcdbr-01.s new file mode 100644 index 000000000000..347cab514116 --- /dev/null +++ b/test/MC/SystemZ/insn-lcdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lcdbr %f0, %f9 # encoding: [0xb3,0x13,0x00,0x09] +#CHECK: lcdbr %f0, %f15 # encoding: [0xb3,0x13,0x00,0x0f] +#CHECK: lcdbr %f15, %f0 # encoding: [0xb3,0x13,0x00,0xf0] +#CHECK: lcdbr %f15, %f9 # encoding: [0xb3,0x13,0x00,0xf9] + + lcdbr %f0,%f9 + lcdbr %f0,%f15 + lcdbr %f15,%f0 + lcdbr %f15,%f9 diff --git a/test/MC/SystemZ/insn-lcebr-01.s b/test/MC/SystemZ/insn-lcebr-01.s new file mode 100644 index 000000000000..e31822f00460 --- /dev/null +++ b/test/MC/SystemZ/insn-lcebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lcebr %f0, %f9 # encoding: [0xb3,0x03,0x00,0x09] +#CHECK: lcebr %f0, %f15 # encoding: [0xb3,0x03,0x00,0x0f] +#CHECK: lcebr %f15, %f0 # encoding: [0xb3,0x03,0x00,0xf0] +#CHECK: lcebr %f15, %f9 # encoding: [0xb3,0x03,0x00,0xf9] + + lcebr %f0,%f9 + lcebr %f0,%f15 + lcebr %f15,%f0 + lcebr %f15,%f9 diff --git a/test/MC/SystemZ/insn-lcgfr-01.s b/test/MC/SystemZ/insn-lcgfr-01.s new file mode 100644 index 000000000000..bca430b8015d --- /dev/null +++ b/test/MC/SystemZ/insn-lcgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lcgfr %r0, %r0 # encoding: [0xb9,0x13,0x00,0x00] +#CHECK: lcgfr %r0, %r15 # encoding: [0xb9,0x13,0x00,0x0f] +#CHECK: lcgfr %r15, %r0 # encoding: [0xb9,0x13,0x00,0xf0] +#CHECK: lcgfr %r7, %r8 # encoding: [0xb9,0x13,0x00,0x78] + + lcgfr %r0,%r0 + lcgfr %r0,%r15 + lcgfr %r15,%r0 + lcgfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-lcgr-01.s b/test/MC/SystemZ/insn-lcgr-01.s new file mode 100644 index 000000000000..dc4e94f03eed --- /dev/null +++ b/test/MC/SystemZ/insn-lcgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lcgr %r0, %r0 # encoding: [0xb9,0x03,0x00,0x00] +#CHECK: lcgr %r0, %r15 # encoding: [0xb9,0x03,0x00,0x0f] +#CHECK: lcgr %r15, %r0 # encoding: [0xb9,0x03,0x00,0xf0] +#CHECK: lcgr %r7, %r8 # encoding: [0xb9,0x03,0x00,0x78] + + lcgr %r0,%r0 + lcgr %r0,%r15 + lcgr %r15,%r0 + lcgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-lcr-01.s b/test/MC/SystemZ/insn-lcr-01.s new file mode 100644 index 000000000000..52471cbbdc54 --- /dev/null +++ b/test/MC/SystemZ/insn-lcr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lcr %r0, %r0 # encoding: [0x13,0x00] +#CHECK: lcr %r0, %r15 # encoding: [0x13,0x0f] +#CHECK: lcr %r15, %r0 # encoding: [0x13,0xf0] +#CHECK: lcr %r7, %r8 # encoding: [0x13,0x78] + + lcr %r0,%r0 + lcr %r0,%r15 + lcr %r15,%r0 + lcr %r7,%r8 diff --git a/test/MC/SystemZ/insn-lcxbr-01.s b/test/MC/SystemZ/insn-lcxbr-01.s new file mode 100644 index 000000000000..48c0b8a77213 --- /dev/null +++ b/test/MC/SystemZ/insn-lcxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lcxbr %f0, %f8 # encoding: [0xb3,0x43,0x00,0x08] +#CHECK: lcxbr %f0, %f13 # encoding: [0xb3,0x43,0x00,0x0d] +#CHECK: lcxbr %f13, %f0 # encoding: [0xb3,0x43,0x00,0xd0] +#CHECK: lcxbr %f13, %f9 # encoding: [0xb3,0x43,0x00,0xd9] + + lcxbr %f0,%f8 + lcxbr %f0,%f13 + lcxbr %f13,%f0 + lcxbr %f13,%f9 diff --git a/test/MC/SystemZ/insn-lcxbr-02.s b/test/MC/SystemZ/insn-lcxbr-02.s new file mode 100644 index 000000000000..ab3d6bfe9cd8 --- /dev/null +++ b/test/MC/SystemZ/insn-lcxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lcxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: lcxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: lcxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: lcxbr %f14, %f0 + + lcxbr %f0, %f2 + lcxbr %f0, %f14 + lcxbr %f2, %f0 + lcxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-ld-01.s b/test/MC/SystemZ/insn-ld-01.s new file mode 100644 index 000000000000..653eab5e0a57 --- /dev/null +++ b/test/MC/SystemZ/insn-ld-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ld %f0, 0 # encoding: [0x68,0x00,0x00,0x00] +#CHECK: ld %f0, 4095 # encoding: [0x68,0x00,0x0f,0xff] +#CHECK: ld %f0, 0(%r1) # encoding: [0x68,0x00,0x10,0x00] +#CHECK: ld %f0, 0(%r15) # encoding: [0x68,0x00,0xf0,0x00] +#CHECK: ld %f0, 4095(%r1,%r15) # encoding: [0x68,0x01,0xff,0xff] +#CHECK: ld %f0, 4095(%r15,%r1) # encoding: [0x68,0x0f,0x1f,0xff] +#CHECK: ld %f15, 0 # encoding: [0x68,0xf0,0x00,0x00] + + ld %f0, 0 + ld %f0, 4095 + ld %f0, 0(%r1) + ld %f0, 0(%r15) + ld %f0, 4095(%r1,%r15) + ld %f0, 4095(%r15,%r1) + ld %f15, 0 diff --git a/test/MC/SystemZ/insn-ld-02.s b/test/MC/SystemZ/insn-ld-02.s new file mode 100644 index 000000000000..5d786b555705 --- /dev/null +++ b/test/MC/SystemZ/insn-ld-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ld %f0, -1 +#CHECK: error: invalid operand +#CHECK: ld %f0, 4096 + + ld %f0, -1 + ld %f0, 4096 diff --git a/test/MC/SystemZ/insn-ldeb-01.s b/test/MC/SystemZ/insn-ldeb-01.s new file mode 100644 index 000000000000..a06344d27d97 --- /dev/null +++ b/test/MC/SystemZ/insn-ldeb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldeb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x04] +#CHECK: ldeb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x04] +#CHECK: ldeb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x04] +#CHECK: ldeb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x04] +#CHECK: ldeb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x04] +#CHECK: ldeb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x04] +#CHECK: ldeb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x04] + + ldeb %f0, 0 + ldeb %f0, 4095 + ldeb %f0, 0(%r1) + ldeb %f0, 0(%r15) + ldeb %f0, 4095(%r1,%r15) + ldeb %f0, 4095(%r15,%r1) + ldeb %f15, 0 diff --git a/test/MC/SystemZ/insn-ldeb-02.s b/test/MC/SystemZ/insn-ldeb-02.s new file mode 100644 index 000000000000..6df5e7b46d05 --- /dev/null +++ b/test/MC/SystemZ/insn-ldeb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ldeb %f0, -1 +#CHECK: error: invalid operand +#CHECK: ldeb %f0, 4096 + + ldeb %f0, -1 + ldeb %f0, 4096 diff --git a/test/MC/SystemZ/insn-ldebr-01.s b/test/MC/SystemZ/insn-ldebr-01.s new file mode 100644 index 000000000000..2df932c6686a --- /dev/null +++ b/test/MC/SystemZ/insn-ldebr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldebr %f0, %f15 # encoding: [0xb3,0x04,0x00,0x0f] +#CHECK: ldebr %f7, %f8 # encoding: [0xb3,0x04,0x00,0x78] +#CHECK: ldebr %f15, %f0 # encoding: [0xb3,0x04,0x00,0xf0] + + ldebr %f0, %f15 + ldebr %f7, %f8 + ldebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-ldgr-01.s b/test/MC/SystemZ/insn-ldgr-01.s new file mode 100644 index 000000000000..61a4529bee7c --- /dev/null +++ b/test/MC/SystemZ/insn-ldgr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldgr %f0, %r0 # encoding: [0xb3,0xc1,0x00,0x00] +#CHECK: ldgr %f0, %r15 # encoding: [0xb3,0xc1,0x00,0x0f] +#CHECK: ldgr %f15, %r0 # encoding: [0xb3,0xc1,0x00,0xf0] +#CHECK: ldgr %f7, %r9 # encoding: [0xb3,0xc1,0x00,0x79] +#CHECK: ldgr %f15, %r15 # encoding: [0xb3,0xc1,0x00,0xff] + + ldgr %f0,%r0 + ldgr %f0,%r15 + ldgr %f15,%r0 + ldgr %f7,%r9 + ldgr %f15,%r15 diff --git a/test/MC/SystemZ/insn-ldgr-02.s b/test/MC/SystemZ/insn-ldgr-02.s new file mode 100644 index 000000000000..900174ab1f14 --- /dev/null +++ b/test/MC/SystemZ/insn-ldgr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: ldgr %f0, %f0 +#CHECK: error: invalid register +#CHECK: ldgr %r0, %r0 +#CHECK: error: invalid register +#CHECK: ldgr %f0, %a0 +#CHECK: error: invalid register +#CHECK: ldgr %a0, %r0 + + ldgr %f0, %f0 + ldgr %r0, %r0 + ldgr %f0, %a0 + ldgr %a0, %r0 diff --git a/test/MC/SystemZ/insn-ldr-01.s b/test/MC/SystemZ/insn-ldr-01.s new file mode 100644 index 000000000000..895ed3439fce --- /dev/null +++ b/test/MC/SystemZ/insn-ldr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldr %f0, %f9 # encoding: [0x28,0x09] +#CHECK: ldr %f0, %f15 # encoding: [0x28,0x0f] +#CHECK: ldr %f15, %f0 # encoding: [0x28,0xf0] +#CHECK: ldr %f15, %f9 # encoding: [0x28,0xf9] + + ldr %f0,%f9 + ldr %f0,%f15 + ldr %f15,%f0 + ldr %f15,%f9 diff --git a/test/MC/SystemZ/insn-ldxbr-01.s b/test/MC/SystemZ/insn-ldxbr-01.s new file mode 100644 index 000000000000..49e1d2adfb15 --- /dev/null +++ b/test/MC/SystemZ/insn-ldxbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldxbr %f0, %f0 # encoding: [0xb3,0x45,0x00,0x00] +#CHECK: ldxbr %f0, %f13 # encoding: [0xb3,0x45,0x00,0x0d] +#CHECK: ldxbr %f8, %f12 # encoding: [0xb3,0x45,0x00,0x8c] +#CHECK: ldxbr %f13, %f0 # encoding: [0xb3,0x45,0x00,0xd0] +#CHECK: ldxbr %f13, %f13 # encoding: [0xb3,0x45,0x00,0xdd] + + ldxbr %f0, %f0 + ldxbr %f0, %f13 + ldxbr %f8, %f12 + ldxbr %f13, %f0 + ldxbr %f13, %f13 diff --git a/test/MC/SystemZ/insn-ldxbr-02.s b/test/MC/SystemZ/insn-ldxbr-02.s new file mode 100644 index 000000000000..89914dff9d47 --- /dev/null +++ b/test/MC/SystemZ/insn-ldxbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: ldxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: ldxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: ldxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: ldxbr %f14, %f0 + + ldxbr %f0, %f2 + ldxbr %f0, %f14 + ldxbr %f2, %f0 + ldxbr %f14, %f0 diff --git a/test/MC/SystemZ/insn-ldy-01.s b/test/MC/SystemZ/insn-ldy-01.s new file mode 100644 index 000000000000..5c2d145af124 --- /dev/null +++ b/test/MC/SystemZ/insn-ldy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldy %f0, -524288 # encoding: [0xed,0x00,0x00,0x00,0x80,0x65] +#CHECK: ldy %f0, -1 # encoding: [0xed,0x00,0x0f,0xff,0xff,0x65] +#CHECK: ldy %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x65] +#CHECK: ldy %f0, 1 # encoding: [0xed,0x00,0x00,0x01,0x00,0x65] +#CHECK: ldy %f0, 524287 # encoding: [0xed,0x00,0x0f,0xff,0x7f,0x65] +#CHECK: ldy %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x65] +#CHECK: ldy %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x65] +#CHECK: ldy %f0, 524287(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x7f,0x65] +#CHECK: ldy %f0, 524287(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x7f,0x65] +#CHECK: ldy %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x65] + + ldy %f0, -524288 + ldy %f0, -1 + ldy %f0, 0 + ldy %f0, 1 + ldy %f0, 524287 + ldy %f0, 0(%r1) + ldy %f0, 0(%r15) + ldy %f0, 524287(%r1,%r15) + ldy %f0, 524287(%r15,%r1) + ldy %f15, 0 diff --git a/test/MC/SystemZ/insn-ldy-02.s b/test/MC/SystemZ/insn-ldy-02.s new file mode 100644 index 000000000000..b16e0149ee76 --- /dev/null +++ b/test/MC/SystemZ/insn-ldy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ldy %f0, -524289 +#CHECK: error: invalid operand +#CHECK: ldy %f0, 524288 + + ldy %f0, -524289 + ldy %f0, 524288 diff --git a/test/MC/SystemZ/insn-le-01.s b/test/MC/SystemZ/insn-le-01.s new file mode 100644 index 000000000000..15bbce26a519 --- /dev/null +++ b/test/MC/SystemZ/insn-le-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: le %f0, 0 # encoding: [0x78,0x00,0x00,0x00] +#CHECK: le %f0, 4095 # encoding: [0x78,0x00,0x0f,0xff] +#CHECK: le %f0, 0(%r1) # encoding: [0x78,0x00,0x10,0x00] +#CHECK: le %f0, 0(%r15) # encoding: [0x78,0x00,0xf0,0x00] +#CHECK: le %f0, 4095(%r1,%r15) # encoding: [0x78,0x01,0xff,0xff] +#CHECK: le %f0, 4095(%r15,%r1) # encoding: [0x78,0x0f,0x1f,0xff] +#CHECK: le %f15, 0 # encoding: [0x78,0xf0,0x00,0x00] + + le %f0, 0 + le %f0, 4095 + le %f0, 0(%r1) + le %f0, 0(%r15) + le %f0, 4095(%r1,%r15) + le %f0, 4095(%r15,%r1) + le %f15, 0 diff --git a/test/MC/SystemZ/insn-le-02.s b/test/MC/SystemZ/insn-le-02.s new file mode 100644 index 000000000000..f784ea1c9012 --- /dev/null +++ b/test/MC/SystemZ/insn-le-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: le %f0, -1 +#CHECK: error: invalid operand +#CHECK: le %f0, 4096 + + le %f0, -1 + le %f0, 4096 diff --git a/test/MC/SystemZ/insn-ledbr-01.s b/test/MC/SystemZ/insn-ledbr-01.s new file mode 100644 index 000000000000..6582d6344f7e --- /dev/null +++ b/test/MC/SystemZ/insn-ledbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ledbr %f0, %f0 # encoding: [0xb3,0x44,0x00,0x00] +#CHECK: ledbr %f0, %f15 # encoding: [0xb3,0x44,0x00,0x0f] +#CHECK: ledbr %f7, %f8 # encoding: [0xb3,0x44,0x00,0x78] +#CHECK: ledbr %f15, %f0 # encoding: [0xb3,0x44,0x00,0xf0] +#CHECK: ledbr %f15, %f15 # encoding: [0xb3,0x44,0x00,0xff] + + ledbr %f0, %f0 + ledbr %f0, %f15 + ledbr %f7, %f8 + ledbr %f15, %f0 + ledbr %f15, %f15 diff --git a/test/MC/SystemZ/insn-ler-01.s b/test/MC/SystemZ/insn-ler-01.s new file mode 100644 index 000000000000..775e5232186d --- /dev/null +++ b/test/MC/SystemZ/insn-ler-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ler %f0, %f9 # encoding: [0x38,0x09] +#CHECK: ler %f0, %f15 # encoding: [0x38,0x0f] +#CHECK: ler %f15, %f0 # encoding: [0x38,0xf0] +#CHECK: ler %f15, %f9 # encoding: [0x38,0xf9] + + ler %f0,%f9 + ler %f0,%f15 + ler %f15,%f0 + ler %f15,%f9 diff --git a/test/MC/SystemZ/insn-lexbr-01.s b/test/MC/SystemZ/insn-lexbr-01.s new file mode 100644 index 000000000000..ce32103c66cb --- /dev/null +++ b/test/MC/SystemZ/insn-lexbr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lexbr %f0, %f0 # encoding: [0xb3,0x46,0x00,0x00] +#CHECK: lexbr %f0, %f13 # encoding: [0xb3,0x46,0x00,0x0d] +#CHECK: lexbr %f8, %f12 # encoding: [0xb3,0x46,0x00,0x8c] +#CHECK: lexbr %f13, %f0 # encoding: [0xb3,0x46,0x00,0xd0] +#CHECK: lexbr %f13, %f13 # encoding: [0xb3,0x46,0x00,0xdd] + + lexbr %f0, %f0 + lexbr %f0, %f13 + lexbr %f8, %f12 + lexbr %f13, %f0 + lexbr %f13, %f13 diff --git a/test/MC/SystemZ/insn-lexbr-02.s b/test/MC/SystemZ/insn-lexbr-02.s new file mode 100644 index 000000000000..8c9bb9ed600e --- /dev/null +++ b/test/MC/SystemZ/insn-lexbr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lexbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: lexbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: lexbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: lexbr %f14, %f0 + + lexbr %f0, %f2 + lexbr %f0, %f14 + lexbr %f2, %f0 + lexbr %f14, %f0 diff --git a/test/MC/SystemZ/insn-ley-01.s b/test/MC/SystemZ/insn-ley-01.s new file mode 100644 index 000000000000..b854dc148c77 --- /dev/null +++ b/test/MC/SystemZ/insn-ley-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ley %f0, -524288 # encoding: [0xed,0x00,0x00,0x00,0x80,0x64] +#CHECK: ley %f0, -1 # encoding: [0xed,0x00,0x0f,0xff,0xff,0x64] +#CHECK: ley %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x64] +#CHECK: ley %f0, 1 # encoding: [0xed,0x00,0x00,0x01,0x00,0x64] +#CHECK: ley %f0, 524287 # encoding: [0xed,0x00,0x0f,0xff,0x7f,0x64] +#CHECK: ley %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x64] +#CHECK: ley %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x64] +#CHECK: ley %f0, 524287(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x7f,0x64] +#CHECK: ley %f0, 524287(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x7f,0x64] +#CHECK: ley %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x64] + + ley %f0, -524288 + ley %f0, -1 + ley %f0, 0 + ley %f0, 1 + ley %f0, 524287 + ley %f0, 0(%r1) + ley %f0, 0(%r15) + ley %f0, 524287(%r1,%r15) + ley %f0, 524287(%r15,%r1) + ley %f15, 0 diff --git a/test/MC/SystemZ/insn-ley-02.s b/test/MC/SystemZ/insn-ley-02.s new file mode 100644 index 000000000000..98bbd94dc176 --- /dev/null +++ b/test/MC/SystemZ/insn-ley-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ley %f0, -524289 +#CHECK: error: invalid operand +#CHECK: ley %f0, 524288 + + ley %f0, -524289 + ley %f0, 524288 diff --git a/test/MC/SystemZ/insn-lg-01.s b/test/MC/SystemZ/insn-lg-01.s new file mode 100644 index 000000000000..10a95cc8958a --- /dev/null +++ b/test/MC/SystemZ/insn-lg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x04] +#CHECK: lg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x04] +#CHECK: lg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x04] +#CHECK: lg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x04] +#CHECK: lg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x04] +#CHECK: lg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x04] +#CHECK: lg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x04] +#CHECK: lg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x04] +#CHECK: lg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x04] +#CHECK: lg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x04] + + lg %r0, -524288 + lg %r0, -1 + lg %r0, 0 + lg %r0, 1 + lg %r0, 524287 + lg %r0, 0(%r1) + lg %r0, 0(%r15) + lg %r0, 524287(%r1,%r15) + lg %r0, 524287(%r15,%r1) + lg %r15, 0 diff --git a/test/MC/SystemZ/insn-lg-02.s b/test/MC/SystemZ/insn-lg-02.s new file mode 100644 index 000000000000..85b29fff5533 --- /dev/null +++ b/test/MC/SystemZ/insn-lg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lg %r0, 524288 + + lg %r0, -524289 + lg %r0, 524288 diff --git a/test/MC/SystemZ/insn-lgb-01.s b/test/MC/SystemZ/insn-lgb-01.s new file mode 100644 index 000000000000..82b92f167272 --- /dev/null +++ b/test/MC/SystemZ/insn-lgb-01.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgb %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x77] +#CHECK: lgb %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x77] +#CHECK: lgb %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x77] +#CHECK: lgb %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x77] +#CHECK: lgb %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x77] +#CHECK: lgb %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x77] +#CHECK: lgb %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x77] +#CHECK: lgb %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x77] +#CHECK: lgb %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x77] +#CHECK: lgb %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x77] + + lgb %r0, -524288 + lgb %r0, -1 + lgb %r0, 0 + lgb %r0, 1 + lgb %r0, 524287 + lgb %r0, 0(%r1) + lgb %r0, 0(%r15) + lgb %r0, 524287(%r1,%r15) + lgb %r0, 524287(%r15,%r1) + lgb %r15, 0 + diff --git a/test/MC/SystemZ/insn-lgb-02.s b/test/MC/SystemZ/insn-lgb-02.s new file mode 100644 index 000000000000..7acc1762b51b --- /dev/null +++ b/test/MC/SystemZ/insn-lgb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lgb %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lgb %r0, 524288 + + lgb %r0, -524289 + lgb %r0, 524288 diff --git a/test/MC/SystemZ/insn-lgbr-01.s b/test/MC/SystemZ/insn-lgbr-01.s new file mode 100644 index 000000000000..ec2e6220091d --- /dev/null +++ b/test/MC/SystemZ/insn-lgbr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgbr %r0, %r15 # encoding: [0xb9,0x06,0x00,0x0f] +#CHECK: lgbr %r7, %r8 # encoding: [0xb9,0x06,0x00,0x78] +#CHECK: lgbr %r15, %r0 # encoding: [0xb9,0x06,0x00,0xf0] + + lgbr %r0, %r15 + lgbr %r7, %r8 + lgbr %r15, %r0 diff --git a/test/MC/SystemZ/insn-lgdr-01.s b/test/MC/SystemZ/insn-lgdr-01.s new file mode 100644 index 000000000000..56d1e035b425 --- /dev/null +++ b/test/MC/SystemZ/insn-lgdr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgdr %r0, %f0 # encoding: [0xb3,0xcd,0x00,0x00] +#CHECK: lgdr %r0, %f15 # encoding: [0xb3,0xcd,0x00,0x0f] +#CHECK: lgdr %r15, %f0 # encoding: [0xb3,0xcd,0x00,0xf0] +#CHECK: lgdr %r8, %f8 # encoding: [0xb3,0xcd,0x00,0x88] +#CHECK: lgdr %r15, %f15 # encoding: [0xb3,0xcd,0x00,0xff] + + lgdr %r0,%f0 + lgdr %r0,%f15 + lgdr %r15,%f0 + lgdr %r8,%f8 + lgdr %r15,%f15 diff --git a/test/MC/SystemZ/insn-lgdr-02.s b/test/MC/SystemZ/insn-lgdr-02.s new file mode 100644 index 000000000000..3bf014d90ec1 --- /dev/null +++ b/test/MC/SystemZ/insn-lgdr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lgdr %f0, %f0 +#CHECK: error: invalid register +#CHECK: lgdr %r0, %r0 +#CHECK: error: invalid register +#CHECK: lgdr %r0, %a0 +#CHECK: error: invalid register +#CHECK: lgdr %a0, %f0 + + lgdr %f0, %f0 + lgdr %r0, %r0 + lgdr %r0, %a0 + lgdr %a0, %f0 diff --git a/test/MC/SystemZ/insn-lgf-01.s b/test/MC/SystemZ/insn-lgf-01.s new file mode 100644 index 000000000000..9ed917228a8a --- /dev/null +++ b/test/MC/SystemZ/insn-lgf-01.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x14] +#CHECK: lgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x14] +#CHECK: lgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x14] +#CHECK: lgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x14] +#CHECK: lgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x14] +#CHECK: lgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x14] +#CHECK: lgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x14] +#CHECK: lgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x14] +#CHECK: lgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x14] +#CHECK: lgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x14] + + lgf %r0, -524288 + lgf %r0, -1 + lgf %r0, 0 + lgf %r0, 1 + lgf %r0, 524287 + lgf %r0, 0(%r1) + lgf %r0, 0(%r15) + lgf %r0, 524287(%r1,%r15) + lgf %r0, 524287(%r15,%r1) + lgf %r15, 0 + diff --git a/test/MC/SystemZ/insn-lgf-02.s b/test/MC/SystemZ/insn-lgf-02.s new file mode 100644 index 000000000000..32095a840936 --- /dev/null +++ b/test/MC/SystemZ/insn-lgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lgf %r0, 524288 + + lgf %r0, -524289 + lgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-lgfi-01.s b/test/MC/SystemZ/insn-lgfi-01.s new file mode 100644 index 000000000000..a5ca7a59b5d2 --- /dev/null +++ b/test/MC/SystemZ/insn-lgfi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgfi %r0, -2147483648 # encoding: [0xc0,0x01,0x80,0x00,0x00,0x00] +#CHECK: lgfi %r0, -1 # encoding: [0xc0,0x01,0xff,0xff,0xff,0xff] +#CHECK: lgfi %r0, 0 # encoding: [0xc0,0x01,0x00,0x00,0x00,0x00] +#CHECK: lgfi %r0, 1 # encoding: [0xc0,0x01,0x00,0x00,0x00,0x01] +#CHECK: lgfi %r0, 2147483647 # encoding: [0xc0,0x01,0x7f,0xff,0xff,0xff] +#CHECK: lgfi %r15, 0 # encoding: [0xc0,0xf1,0x00,0x00,0x00,0x00] + + lgfi %r0, -1 << 31 + lgfi %r0, -1 + lgfi %r0, 0 + lgfi %r0, 1 + lgfi %r0, (1 << 31) - 1 + lgfi %r15, 0 diff --git a/test/MC/SystemZ/insn-lgfi-02.s b/test/MC/SystemZ/insn-lgfi-02.s new file mode 100644 index 000000000000..a45cfeb46d05 --- /dev/null +++ b/test/MC/SystemZ/insn-lgfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lgfi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: lgfi %r0, (1 << 31) + + lgfi %r0, (-1 << 31) - 1 + lgfi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-lgfr-01.s b/test/MC/SystemZ/insn-lgfr-01.s new file mode 100644 index 000000000000..bc375a67b000 --- /dev/null +++ b/test/MC/SystemZ/insn-lgfr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgfr %r0, %r15 # encoding: [0xb9,0x14,0x00,0x0f] +#CHECK: lgfr %r7, %r8 # encoding: [0xb9,0x14,0x00,0x78] +#CHECK: lgfr %r15, %r0 # encoding: [0xb9,0x14,0x00,0xf0] + + lgfr %r0, %r15 + lgfr %r7, %r8 + lgfr %r15, %r0 diff --git a/test/MC/SystemZ/insn-lgfrl-01.s b/test/MC/SystemZ/insn-lgfrl-01.s new file mode 100644 index 000000000000..85c9ea764c8d --- /dev/null +++ b/test/MC/SystemZ/insn-lgfrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgfrl %r0, 2864434397 # encoding: [0xc4,0x0c,0x55,0x5d,0xe6,0x6e] +#CHECK: lgfrl %r15, 2864434397 # encoding: [0xc4,0xfc,0x55,0x5d,0xe6,0x6e] + + lgfrl %r0,0xaabbccdd + lgfrl %r15,0xaabbccdd + +#CHECK: lgfrl %r0, foo # encoding: [0xc4,0x0c,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: lgfrl %r15, foo # encoding: [0xc4,0xfc,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + lgfrl %r0,foo + lgfrl %r15,foo + +#CHECK: lgfrl %r3, bar+100 # encoding: [0xc4,0x3c,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: lgfrl %r4, bar+100 # encoding: [0xc4,0x4c,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + lgfrl %r3,bar+100 + lgfrl %r4,bar+100 + +#CHECK: lgfrl %r7, frob@PLT # encoding: [0xc4,0x7c,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: lgfrl %r8, frob@PLT # encoding: [0xc4,0x8c,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + lgfrl %r7,frob@PLT + lgfrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-lgh-01.s b/test/MC/SystemZ/insn-lgh-01.s new file mode 100644 index 000000000000..9dae6212b2c2 --- /dev/null +++ b/test/MC/SystemZ/insn-lgh-01.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x15] +#CHECK: lgh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x15] +#CHECK: lgh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x15] +#CHECK: lgh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x15] +#CHECK: lgh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x15] +#CHECK: lgh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x15] +#CHECK: lgh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x15] +#CHECK: lgh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x15] +#CHECK: lgh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x15] +#CHECK: lgh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x15] + + lgh %r0, -524288 + lgh %r0, -1 + lgh %r0, 0 + lgh %r0, 1 + lgh %r0, 524287 + lgh %r0, 0(%r1) + lgh %r0, 0(%r15) + lgh %r0, 524287(%r1,%r15) + lgh %r0, 524287(%r15,%r1) + lgh %r15, 0 + diff --git a/test/MC/SystemZ/insn-lgh-02.s b/test/MC/SystemZ/insn-lgh-02.s new file mode 100644 index 000000000000..62b7341d8276 --- /dev/null +++ b/test/MC/SystemZ/insn-lgh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lgh %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lgh %r0, 524288 + + lgh %r0, -524289 + lgh %r0, 524288 diff --git a/test/MC/SystemZ/insn-lghi-01.s b/test/MC/SystemZ/insn-lghi-01.s new file mode 100644 index 000000000000..d9d12ae1bb39 --- /dev/null +++ b/test/MC/SystemZ/insn-lghi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lghi %r0, -32768 # encoding: [0xa7,0x09,0x80,0x00] +#CHECK: lghi %r0, -1 # encoding: [0xa7,0x09,0xff,0xff] +#CHECK: lghi %r0, 0 # encoding: [0xa7,0x09,0x00,0x00] +#CHECK: lghi %r0, 1 # encoding: [0xa7,0x09,0x00,0x01] +#CHECK: lghi %r0, 32767 # encoding: [0xa7,0x09,0x7f,0xff] +#CHECK: lghi %r15, 0 # encoding: [0xa7,0xf9,0x00,0x00] + + lghi %r0, -32768 + lghi %r0, -1 + lghi %r0, 0 + lghi %r0, 1 + lghi %r0, 32767 + lghi %r15, 0 diff --git a/test/MC/SystemZ/insn-lghi-02.s b/test/MC/SystemZ/insn-lghi-02.s new file mode 100644 index 000000000000..b1af7a0c54ad --- /dev/null +++ b/test/MC/SystemZ/insn-lghi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lghi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: lghi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: lghi %r0, foo + + lghi %r0, -32769 + lghi %r0, 32768 + lghi %r0, foo diff --git a/test/MC/SystemZ/insn-lghr-01.s b/test/MC/SystemZ/insn-lghr-01.s new file mode 100644 index 000000000000..a1dc842339b4 --- /dev/null +++ b/test/MC/SystemZ/insn-lghr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lghr %r0, %r15 # encoding: [0xb9,0x07,0x00,0x0f] +#CHECK: lghr %r7, %r8 # encoding: [0xb9,0x07,0x00,0x78] +#CHECK: lghr %r15, %r0 # encoding: [0xb9,0x07,0x00,0xf0] + + lghr %r0, %r15 + lghr %r7, %r8 + lghr %r15, %r0 diff --git a/test/MC/SystemZ/insn-lghrl-01.s b/test/MC/SystemZ/insn-lghrl-01.s new file mode 100644 index 000000000000..34992e6ff26a --- /dev/null +++ b/test/MC/SystemZ/insn-lghrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lghrl %r0, 2864434397 # encoding: [0xc4,0x04,0x55,0x5d,0xe6,0x6e] +#CHECK: lghrl %r15, 2864434397 # encoding: [0xc4,0xf4,0x55,0x5d,0xe6,0x6e] + + lghrl %r0,0xaabbccdd + lghrl %r15,0xaabbccdd + +#CHECK: lghrl %r0, foo # encoding: [0xc4,0x04,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: lghrl %r15, foo # encoding: [0xc4,0xf4,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + lghrl %r0,foo + lghrl %r15,foo + +#CHECK: lghrl %r3, bar+100 # encoding: [0xc4,0x34,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: lghrl %r4, bar+100 # encoding: [0xc4,0x44,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + lghrl %r3,bar+100 + lghrl %r4,bar+100 + +#CHECK: lghrl %r7, frob@PLT # encoding: [0xc4,0x74,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: lghrl %r8, frob@PLT # encoding: [0xc4,0x84,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + lghrl %r7,frob@PLT + lghrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-lgr-01.s b/test/MC/SystemZ/insn-lgr-01.s new file mode 100644 index 000000000000..e50295682bd4 --- /dev/null +++ b/test/MC/SystemZ/insn-lgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgr %r0, %r9 # encoding: [0xb9,0x04,0x00,0x09] +#CHECK: lgr %r0, %r15 # encoding: [0xb9,0x04,0x00,0x0f] +#CHECK: lgr %r15, %r0 # encoding: [0xb9,0x04,0x00,0xf0] +#CHECK: lgr %r15, %r9 # encoding: [0xb9,0x04,0x00,0xf9] + + lgr %r0,%r9 + lgr %r0,%r15 + lgr %r15,%r0 + lgr %r15,%r9 diff --git a/test/MC/SystemZ/insn-lgrl-01.s b/test/MC/SystemZ/insn-lgrl-01.s new file mode 100644 index 000000000000..7a18908f9ab7 --- /dev/null +++ b/test/MC/SystemZ/insn-lgrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgrl %r0, 2864434397 # encoding: [0xc4,0x08,0x55,0x5d,0xe6,0x6e] +#CHECK: lgrl %r15, 2864434397 # encoding: [0xc4,0xf8,0x55,0x5d,0xe6,0x6e] + + lgrl %r0,0xaabbccdd + lgrl %r15,0xaabbccdd + +#CHECK: lgrl %r0, foo # encoding: [0xc4,0x08,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: lgrl %r15, foo # encoding: [0xc4,0xf8,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + lgrl %r0,foo + lgrl %r15,foo + +#CHECK: lgrl %r3, bar+100 # encoding: [0xc4,0x38,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: lgrl %r4, bar+100 # encoding: [0xc4,0x48,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + lgrl %r3,bar+100 + lgrl %r4,bar+100 + +#CHECK: lgrl %r7, frob@PLT # encoding: [0xc4,0x78,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: lgrl %r8, frob@PLT # encoding: [0xc4,0x88,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + lgrl %r7,frob@PLT + lgrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-lh-01.s b/test/MC/SystemZ/insn-lh-01.s new file mode 100644 index 000000000000..07be01275693 --- /dev/null +++ b/test/MC/SystemZ/insn-lh-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lh %r0, 0 # encoding: [0x48,0x00,0x00,0x00] +#CHECK: lh %r0, 4095 # encoding: [0x48,0x00,0x0f,0xff] +#CHECK: lh %r0, 0(%r1) # encoding: [0x48,0x00,0x10,0x00] +#CHECK: lh %r0, 0(%r15) # encoding: [0x48,0x00,0xf0,0x00] +#CHECK: lh %r0, 4095(%r1,%r15) # encoding: [0x48,0x01,0xff,0xff] +#CHECK: lh %r0, 4095(%r15,%r1) # encoding: [0x48,0x0f,0x1f,0xff] +#CHECK: lh %r15, 0 # encoding: [0x48,0xf0,0x00,0x00] + + lh %r0, 0 + lh %r0, 4095 + lh %r0, 0(%r1) + lh %r0, 0(%r15) + lh %r0, 4095(%r1,%r15) + lh %r0, 4095(%r15,%r1) + lh %r15, 0 diff --git a/test/MC/SystemZ/insn-lh-02.s b/test/MC/SystemZ/insn-lh-02.s new file mode 100644 index 000000000000..80566d8d37ef --- /dev/null +++ b/test/MC/SystemZ/insn-lh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lh %r0, -1 +#CHECK: error: invalid operand +#CHECK: lh %r0, 4096 + + lh %r0, -1 + lh %r0, 4096 diff --git a/test/MC/SystemZ/insn-lhi-01.s b/test/MC/SystemZ/insn-lhi-01.s new file mode 100644 index 000000000000..43b7df08f016 --- /dev/null +++ b/test/MC/SystemZ/insn-lhi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lhi %r0, -32768 # encoding: [0xa7,0x08,0x80,0x00] +#CHECK: lhi %r0, -1 # encoding: [0xa7,0x08,0xff,0xff] +#CHECK: lhi %r0, 0 # encoding: [0xa7,0x08,0x00,0x00] +#CHECK: lhi %r0, 1 # encoding: [0xa7,0x08,0x00,0x01] +#CHECK: lhi %r0, 32767 # encoding: [0xa7,0x08,0x7f,0xff] +#CHECK: lhi %r15, 0 # encoding: [0xa7,0xf8,0x00,0x00] + + lhi %r0, -32768 + lhi %r0, -1 + lhi %r0, 0 + lhi %r0, 1 + lhi %r0, 32767 + lhi %r15, 0 diff --git a/test/MC/SystemZ/insn-lhi-02.s b/test/MC/SystemZ/insn-lhi-02.s new file mode 100644 index 000000000000..8e38464b828f --- /dev/null +++ b/test/MC/SystemZ/insn-lhi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lhi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: lhi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: lhi %r0, foo + + lhi %r0, -32769 + lhi %r0, 32768 + lhi %r0, foo diff --git a/test/MC/SystemZ/insn-lhr-01.s b/test/MC/SystemZ/insn-lhr-01.s new file mode 100644 index 000000000000..a31cbc65f44d --- /dev/null +++ b/test/MC/SystemZ/insn-lhr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lhr %r0, %r15 # encoding: [0xb9,0x27,0x00,0x0f] +#CHECK: lhr %r7, %r8 # encoding: [0xb9,0x27,0x00,0x78] +#CHECK: lhr %r15, %r0 # encoding: [0xb9,0x27,0x00,0xf0] + + lhr %r0, %r15 + lhr %r7, %r8 + lhr %r15, %r0 diff --git a/test/MC/SystemZ/insn-lhrl-01.s b/test/MC/SystemZ/insn-lhrl-01.s new file mode 100644 index 000000000000..87925fe09870 --- /dev/null +++ b/test/MC/SystemZ/insn-lhrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lhrl %r0, 2864434397 # encoding: [0xc4,0x05,0x55,0x5d,0xe6,0x6e] +#CHECK: lhrl %r15, 2864434397 # encoding: [0xc4,0xf5,0x55,0x5d,0xe6,0x6e] + + lhrl %r0,0xaabbccdd + lhrl %r15,0xaabbccdd + +#CHECK: lhrl %r0, foo # encoding: [0xc4,0x05,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: lhrl %r15, foo # encoding: [0xc4,0xf5,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + lhrl %r0,foo + lhrl %r15,foo + +#CHECK: lhrl %r3, bar+100 # encoding: [0xc4,0x35,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: lhrl %r4, bar+100 # encoding: [0xc4,0x45,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + lhrl %r3,bar+100 + lhrl %r4,bar+100 + +#CHECK: lhrl %r7, frob@PLT # encoding: [0xc4,0x75,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: lhrl %r8, frob@PLT # encoding: [0xc4,0x85,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + lhrl %r7,frob@PLT + lhrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-lhy-01.s b/test/MC/SystemZ/insn-lhy-01.s new file mode 100644 index 000000000000..db811a41a4a5 --- /dev/null +++ b/test/MC/SystemZ/insn-lhy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lhy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x78] +#CHECK: lhy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x78] +#CHECK: lhy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x78] +#CHECK: lhy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x78] +#CHECK: lhy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x78] +#CHECK: lhy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x78] +#CHECK: lhy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x78] +#CHECK: lhy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x78] +#CHECK: lhy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x78] +#CHECK: lhy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x78] + + lhy %r0, -524288 + lhy %r0, -1 + lhy %r0, 0 + lhy %r0, 1 + lhy %r0, 524287 + lhy %r0, 0(%r1) + lhy %r0, 0(%r15) + lhy %r0, 524287(%r1,%r15) + lhy %r0, 524287(%r15,%r1) + lhy %r15, 0 diff --git a/test/MC/SystemZ/insn-lhy-02.s b/test/MC/SystemZ/insn-lhy-02.s new file mode 100644 index 000000000000..6f1caa59faf5 --- /dev/null +++ b/test/MC/SystemZ/insn-lhy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lhy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lhy %r0, 524288 + + lhy %r0, -524289 + lhy %r0, 524288 diff --git a/test/MC/SystemZ/insn-llc-01.s b/test/MC/SystemZ/insn-llc-01.s new file mode 100644 index 000000000000..74a819b2ee30 --- /dev/null +++ b/test/MC/SystemZ/insn-llc-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llc %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x94] +#CHECK: llc %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x94] +#CHECK: llc %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x94] +#CHECK: llc %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x94] +#CHECK: llc %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x94] +#CHECK: llc %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x94] +#CHECK: llc %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x94] +#CHECK: llc %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x94] +#CHECK: llc %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x94] +#CHECK: llc %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x94] + + llc %r0, -524288 + llc %r0, -1 + llc %r0, 0 + llc %r0, 1 + llc %r0, 524287 + llc %r0, 0(%r1) + llc %r0, 0(%r15) + llc %r0, 524287(%r1,%r15) + llc %r0, 524287(%r15,%r1) + llc %r15, 0 diff --git a/test/MC/SystemZ/insn-llc-02.s b/test/MC/SystemZ/insn-llc-02.s new file mode 100644 index 000000000000..4a65f6c55e78 --- /dev/null +++ b/test/MC/SystemZ/insn-llc-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llc %r0, -524289 +#CHECK: error: invalid operand +#CHECK: llc %r0, 524288 + + llc %r0, -524289 + llc %r0, 524288 diff --git a/test/MC/SystemZ/insn-llcr-01.s b/test/MC/SystemZ/insn-llcr-01.s new file mode 100644 index 000000000000..72a695ceffa7 --- /dev/null +++ b/test/MC/SystemZ/insn-llcr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llcr %r0, %r15 # encoding: [0xb9,0x94,0x00,0x0f] +#CHECK: llcr %r7, %r8 # encoding: [0xb9,0x94,0x00,0x78] +#CHECK: llcr %r15, %r0 # encoding: [0xb9,0x94,0x00,0xf0] + + llcr %r0, %r15 + llcr %r7, %r8 + llcr %r15, %r0 diff --git a/test/MC/SystemZ/insn-llgc-01.s b/test/MC/SystemZ/insn-llgc-01.s new file mode 100644 index 000000000000..297c6d62db4f --- /dev/null +++ b/test/MC/SystemZ/insn-llgc-01.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llgc %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x90] +#CHECK: llgc %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x90] +#CHECK: llgc %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x90] +#CHECK: llgc %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x90] +#CHECK: llgc %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x90] +#CHECK: llgc %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x90] +#CHECK: llgc %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x90] +#CHECK: llgc %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x90] +#CHECK: llgc %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x90] +#CHECK: llgc %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x90] + + llgc %r0, -524288 + llgc %r0, -1 + llgc %r0, 0 + llgc %r0, 1 + llgc %r0, 524287 + llgc %r0, 0(%r1) + llgc %r0, 0(%r15) + llgc %r0, 524287(%r1,%r15) + llgc %r0, 524287(%r15,%r1) + llgc %r15, 0 + diff --git a/test/MC/SystemZ/insn-llgc-02.s b/test/MC/SystemZ/insn-llgc-02.s new file mode 100644 index 000000000000..76fca0f2512f --- /dev/null +++ b/test/MC/SystemZ/insn-llgc-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llgc %r0, -524289 +#CHECK: error: invalid operand +#CHECK: llgc %r0, 524288 + + llgc %r0, -524289 + llgc %r0, 524288 diff --git a/test/MC/SystemZ/insn-llgcr-01.s b/test/MC/SystemZ/insn-llgcr-01.s new file mode 100644 index 000000000000..5d653bfff909 --- /dev/null +++ b/test/MC/SystemZ/insn-llgcr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llgcr %r0, %r15 # encoding: [0xb9,0x84,0x00,0x0f] +#CHECK: llgcr %r7, %r8 # encoding: [0xb9,0x84,0x00,0x78] +#CHECK: llgcr %r15, %r0 # encoding: [0xb9,0x84,0x00,0xf0] + + llgcr %r0, %r15 + llgcr %r7, %r8 + llgcr %r15, %r0 diff --git a/test/MC/SystemZ/insn-llgf-01.s b/test/MC/SystemZ/insn-llgf-01.s new file mode 100644 index 000000000000..0394140dab82 --- /dev/null +++ b/test/MC/SystemZ/insn-llgf-01.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x16] +#CHECK: llgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x16] +#CHECK: llgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x16] +#CHECK: llgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x16] +#CHECK: llgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x16] +#CHECK: llgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x16] +#CHECK: llgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x16] +#CHECK: llgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x16] +#CHECK: llgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x16] +#CHECK: llgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x16] + + llgf %r0, -524288 + llgf %r0, -1 + llgf %r0, 0 + llgf %r0, 1 + llgf %r0, 524287 + llgf %r0, 0(%r1) + llgf %r0, 0(%r15) + llgf %r0, 524287(%r1,%r15) + llgf %r0, 524287(%r15,%r1) + llgf %r15, 0 + diff --git a/test/MC/SystemZ/insn-llgf-02.s b/test/MC/SystemZ/insn-llgf-02.s new file mode 100644 index 000000000000..0b2fab033aad --- /dev/null +++ b/test/MC/SystemZ/insn-llgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: llgf %r0, 524288 + + llgf %r0, -524289 + llgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-llgfr-01.s b/test/MC/SystemZ/insn-llgfr-01.s new file mode 100644 index 000000000000..74f1074d150f --- /dev/null +++ b/test/MC/SystemZ/insn-llgfr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llgfr %r0, %r15 # encoding: [0xb9,0x16,0x00,0x0f] +#CHECK: llgfr %r7, %r8 # encoding: [0xb9,0x16,0x00,0x78] +#CHECK: llgfr %r15, %r0 # encoding: [0xb9,0x16,0x00,0xf0] + + llgfr %r0, %r15 + llgfr %r7, %r8 + llgfr %r15, %r0 diff --git a/test/MC/SystemZ/insn-llgfrl-01.s b/test/MC/SystemZ/insn-llgfrl-01.s new file mode 100644 index 000000000000..85fc9f4b3c3f --- /dev/null +++ b/test/MC/SystemZ/insn-llgfrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llgfrl %r0, 2864434397 # encoding: [0xc4,0x0e,0x55,0x5d,0xe6,0x6e] +#CHECK: llgfrl %r15, 2864434397 # encoding: [0xc4,0xfe,0x55,0x5d,0xe6,0x6e] + + llgfrl %r0,0xaabbccdd + llgfrl %r15,0xaabbccdd + +#CHECK: llgfrl %r0, foo # encoding: [0xc4,0x0e,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: llgfrl %r15, foo # encoding: [0xc4,0xfe,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + llgfrl %r0,foo + llgfrl %r15,foo + +#CHECK: llgfrl %r3, bar+100 # encoding: [0xc4,0x3e,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: llgfrl %r4, bar+100 # encoding: [0xc4,0x4e,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + llgfrl %r3,bar+100 + llgfrl %r4,bar+100 + +#CHECK: llgfrl %r7, frob@PLT # encoding: [0xc4,0x7e,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: llgfrl %r8, frob@PLT # encoding: [0xc4,0x8e,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + llgfrl %r7,frob@PLT + llgfrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-llgh-01.s b/test/MC/SystemZ/insn-llgh-01.s new file mode 100644 index 000000000000..acbab004382c --- /dev/null +++ b/test/MC/SystemZ/insn-llgh-01.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llgh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x91] +#CHECK: llgh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x91] +#CHECK: llgh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x91] +#CHECK: llgh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x91] +#CHECK: llgh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x91] +#CHECK: llgh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x91] +#CHECK: llgh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x91] +#CHECK: llgh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x91] +#CHECK: llgh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x91] +#CHECK: llgh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x91] + + llgh %r0, -524288 + llgh %r0, -1 + llgh %r0, 0 + llgh %r0, 1 + llgh %r0, 524287 + llgh %r0, 0(%r1) + llgh %r0, 0(%r15) + llgh %r0, 524287(%r1,%r15) + llgh %r0, 524287(%r15,%r1) + llgh %r15, 0 + diff --git a/test/MC/SystemZ/insn-llgh-02.s b/test/MC/SystemZ/insn-llgh-02.s new file mode 100644 index 000000000000..95b6b12c91e6 --- /dev/null +++ b/test/MC/SystemZ/insn-llgh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llgh %r0, -524289 +#CHECK: error: invalid operand +#CHECK: llgh %r0, 524288 + + llgh %r0, -524289 + llgh %r0, 524288 diff --git a/test/MC/SystemZ/insn-llghr-01.s b/test/MC/SystemZ/insn-llghr-01.s new file mode 100644 index 000000000000..3e2f6de2ae8f --- /dev/null +++ b/test/MC/SystemZ/insn-llghr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llghr %r0, %r15 # encoding: [0xb9,0x85,0x00,0x0f] +#CHECK: llghr %r7, %r8 # encoding: [0xb9,0x85,0x00,0x78] +#CHECK: llghr %r15, %r0 # encoding: [0xb9,0x85,0x00,0xf0] + + llghr %r0, %r15 + llghr %r7, %r8 + llghr %r15, %r0 diff --git a/test/MC/SystemZ/insn-llghrl-01.s b/test/MC/SystemZ/insn-llghrl-01.s new file mode 100644 index 000000000000..af3fa8b9d787 --- /dev/null +++ b/test/MC/SystemZ/insn-llghrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llghrl %r0, 2864434397 # encoding: [0xc4,0x06,0x55,0x5d,0xe6,0x6e] +#CHECK: llghrl %r15, 2864434397 # encoding: [0xc4,0xf6,0x55,0x5d,0xe6,0x6e] + + llghrl %r0,0xaabbccdd + llghrl %r15,0xaabbccdd + +#CHECK: llghrl %r0, foo # encoding: [0xc4,0x06,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: llghrl %r15, foo # encoding: [0xc4,0xf6,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + llghrl %r0,foo + llghrl %r15,foo + +#CHECK: llghrl %r3, bar+100 # encoding: [0xc4,0x36,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: llghrl %r4, bar+100 # encoding: [0xc4,0x46,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + llghrl %r3,bar+100 + llghrl %r4,bar+100 + +#CHECK: llghrl %r7, frob@PLT # encoding: [0xc4,0x76,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: llghrl %r8, frob@PLT # encoding: [0xc4,0x86,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + llghrl %r7,frob@PLT + llghrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-llh-01.s b/test/MC/SystemZ/insn-llh-01.s new file mode 100644 index 000000000000..7e15f3f6d601 --- /dev/null +++ b/test/MC/SystemZ/insn-llh-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llh %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x95] +#CHECK: llh %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x95] +#CHECK: llh %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x95] +#CHECK: llh %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x95] +#CHECK: llh %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x95] +#CHECK: llh %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x95] +#CHECK: llh %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x95] +#CHECK: llh %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x95] +#CHECK: llh %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x95] +#CHECK: llh %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x95] + + llh %r0, -524288 + llh %r0, -1 + llh %r0, 0 + llh %r0, 1 + llh %r0, 524287 + llh %r0, 0(%r1) + llh %r0, 0(%r15) + llh %r0, 524287(%r1,%r15) + llh %r0, 524287(%r15,%r1) + llh %r15, 0 diff --git a/test/MC/SystemZ/insn-llh-02.s b/test/MC/SystemZ/insn-llh-02.s new file mode 100644 index 000000000000..92c49bb59c29 --- /dev/null +++ b/test/MC/SystemZ/insn-llh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llh %r0, -524289 +#CHECK: error: invalid operand +#CHECK: llh %r0, 524288 + + llh %r0, -524289 + llh %r0, 524288 diff --git a/test/MC/SystemZ/insn-llhr-01.s b/test/MC/SystemZ/insn-llhr-01.s new file mode 100644 index 000000000000..bb1d3b5d32fb --- /dev/null +++ b/test/MC/SystemZ/insn-llhr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llhr %r0, %r15 # encoding: [0xb9,0x95,0x00,0x0f] +#CHECK: llhr %r7, %r8 # encoding: [0xb9,0x95,0x00,0x78] +#CHECK: llhr %r15, %r0 # encoding: [0xb9,0x95,0x00,0xf0] + + llhr %r0, %r15 + llhr %r7, %r8 + llhr %r15, %r0 diff --git a/test/MC/SystemZ/insn-llhrl-01.s b/test/MC/SystemZ/insn-llhrl-01.s new file mode 100644 index 000000000000..30ed4f90565c --- /dev/null +++ b/test/MC/SystemZ/insn-llhrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llhrl %r0, 2864434397 # encoding: [0xc4,0x02,0x55,0x5d,0xe6,0x6e] +#CHECK: llhrl %r15, 2864434397 # encoding: [0xc4,0xf2,0x55,0x5d,0xe6,0x6e] + + llhrl %r0,0xaabbccdd + llhrl %r15,0xaabbccdd + +#CHECK: llhrl %r0, foo # encoding: [0xc4,0x02,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: llhrl %r15, foo # encoding: [0xc4,0xf2,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + llhrl %r0,foo + llhrl %r15,foo + +#CHECK: llhrl %r3, bar+100 # encoding: [0xc4,0x32,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: llhrl %r4, bar+100 # encoding: [0xc4,0x42,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + llhrl %r3,bar+100 + llhrl %r4,bar+100 + +#CHECK: llhrl %r7, frob@PLT # encoding: [0xc4,0x72,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: llhrl %r8, frob@PLT # encoding: [0xc4,0x82,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + llhrl %r7,frob@PLT + llhrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-llihf-01.s b/test/MC/SystemZ/insn-llihf-01.s new file mode 100644 index 000000000000..6ddd29ffa370 --- /dev/null +++ b/test/MC/SystemZ/insn-llihf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llihf %r0, 0 # encoding: [0xc0,0x0e,0x00,0x00,0x00,0x00] +#CHECK: llihf %r0, 4294967295 # encoding: [0xc0,0x0e,0xff,0xff,0xff,0xff] +#CHECK: llihf %r15, 0 # encoding: [0xc0,0xfe,0x00,0x00,0x00,0x00] + + llihf %r0, 0 + llihf %r0, 0xffffffff + llihf %r15, 0 diff --git a/test/MC/SystemZ/insn-llihf-02.s b/test/MC/SystemZ/insn-llihf-02.s new file mode 100644 index 000000000000..e1b4537b02c8 --- /dev/null +++ b/test/MC/SystemZ/insn-llihf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llihf %r0, -1 +#CHECK: error: invalid operand +#CHECK: llihf %r0, 1 << 32 + + llihf %r0, -1 + llihf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-llihh-01.s b/test/MC/SystemZ/insn-llihh-01.s new file mode 100644 index 000000000000..06060765c740 --- /dev/null +++ b/test/MC/SystemZ/insn-llihh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llihh %r0, 0 # encoding: [0xa5,0x0c,0x00,0x00] +#CHECK: llihh %r0, 32768 # encoding: [0xa5,0x0c,0x80,0x00] +#CHECK: llihh %r0, 65535 # encoding: [0xa5,0x0c,0xff,0xff] +#CHECK: llihh %r15, 0 # encoding: [0xa5,0xfc,0x00,0x00] + + llihh %r0, 0 + llihh %r0, 0x8000 + llihh %r0, 0xffff + llihh %r15, 0 diff --git a/test/MC/SystemZ/insn-llihh-02.s b/test/MC/SystemZ/insn-llihh-02.s new file mode 100644 index 000000000000..1309f1440f59 --- /dev/null +++ b/test/MC/SystemZ/insn-llihh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llihh %r0, -1 +#CHECK: error: invalid operand +#CHECK: llihh %r0, 0x10000 + + llihh %r0, -1 + llihh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-llihl-01.s b/test/MC/SystemZ/insn-llihl-01.s new file mode 100644 index 000000000000..6353353321c3 --- /dev/null +++ b/test/MC/SystemZ/insn-llihl-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llihl %r0, 0 # encoding: [0xa5,0x0d,0x00,0x00] +#CHECK: llihl %r0, 32768 # encoding: [0xa5,0x0d,0x80,0x00] +#CHECK: llihl %r0, 65535 # encoding: [0xa5,0x0d,0xff,0xff] +#CHECK: llihl %r15, 0 # encoding: [0xa5,0xfd,0x00,0x00] + + llihl %r0, 0 + llihl %r0, 0x8000 + llihl %r0, 0xffff + llihl %r15, 0 diff --git a/test/MC/SystemZ/insn-llihl-02.s b/test/MC/SystemZ/insn-llihl-02.s new file mode 100644 index 000000000000..6891c4219624 --- /dev/null +++ b/test/MC/SystemZ/insn-llihl-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llihl %r0, -1 +#CHECK: error: invalid operand +#CHECK: llihl %r0, 0x10000 + + llihl %r0, -1 + llihl %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-llilf-01.s b/test/MC/SystemZ/insn-llilf-01.s new file mode 100644 index 000000000000..8166583a2c01 --- /dev/null +++ b/test/MC/SystemZ/insn-llilf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llilf %r0, 0 # encoding: [0xc0,0x0f,0x00,0x00,0x00,0x00] +#CHECK: llilf %r0, 4294967295 # encoding: [0xc0,0x0f,0xff,0xff,0xff,0xff] +#CHECK: llilf %r15, 0 # encoding: [0xc0,0xff,0x00,0x00,0x00,0x00] + + llilf %r0, 0 + llilf %r0, 0xffffffff + llilf %r15, 0 diff --git a/test/MC/SystemZ/insn-llilf-02.s b/test/MC/SystemZ/insn-llilf-02.s new file mode 100644 index 000000000000..dc10cc34ee00 --- /dev/null +++ b/test/MC/SystemZ/insn-llilf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llilf %r0, -1 +#CHECK: error: invalid operand +#CHECK: llilf %r0, 1 << 32 + + llilf %r0, -1 + llilf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-llilh-01.s b/test/MC/SystemZ/insn-llilh-01.s new file mode 100644 index 000000000000..2ec5a7952f08 --- /dev/null +++ b/test/MC/SystemZ/insn-llilh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llilh %r0, 0 # encoding: [0xa5,0x0e,0x00,0x00] +#CHECK: llilh %r0, 32768 # encoding: [0xa5,0x0e,0x80,0x00] +#CHECK: llilh %r0, 65535 # encoding: [0xa5,0x0e,0xff,0xff] +#CHECK: llilh %r15, 0 # encoding: [0xa5,0xfe,0x00,0x00] + + llilh %r0, 0 + llilh %r0, 0x8000 + llilh %r0, 0xffff + llilh %r15, 0 diff --git a/test/MC/SystemZ/insn-llilh-02.s b/test/MC/SystemZ/insn-llilh-02.s new file mode 100644 index 000000000000..bdfa1e77435a --- /dev/null +++ b/test/MC/SystemZ/insn-llilh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llilh %r0, -1 +#CHECK: error: invalid operand +#CHECK: llilh %r0, 0x10000 + + llilh %r0, -1 + llilh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-llill-01.s b/test/MC/SystemZ/insn-llill-01.s new file mode 100644 index 000000000000..b95841da4d01 --- /dev/null +++ b/test/MC/SystemZ/insn-llill-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: llill %r0, 0 # encoding: [0xa5,0x0f,0x00,0x00] +#CHECK: llill %r0, 32768 # encoding: [0xa5,0x0f,0x80,0x00] +#CHECK: llill %r0, 65535 # encoding: [0xa5,0x0f,0xff,0xff] +#CHECK: llill %r15, 0 # encoding: [0xa5,0xff,0x00,0x00] + + llill %r0, 0 + llill %r0, 0x8000 + llill %r0, 0xffff + llill %r15, 0 diff --git a/test/MC/SystemZ/insn-llill-02.s b/test/MC/SystemZ/insn-llill-02.s new file mode 100644 index 000000000000..2503b533317f --- /dev/null +++ b/test/MC/SystemZ/insn-llill-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: llill %r0, -1 +#CHECK: error: invalid operand +#CHECK: llill %r0, 0x10000 + + llill %r0, -1 + llill %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-lmg-01.s b/test/MC/SystemZ/insn-lmg-01.s new file mode 100644 index 000000000000..24a2768192c9 --- /dev/null +++ b/test/MC/SystemZ/insn-lmg-01.s @@ -0,0 +1,29 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lmg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x04] +#CHECK: lmg %r0, %r15, 0 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0x04] +#CHECK: lmg %r14, %r15, 0 # encoding: [0xeb,0xef,0x00,0x00,0x00,0x04] +#CHECK: lmg %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x04] +#CHECK: lmg %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x04] +#CHECK: lmg %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x04] +#CHECK: lmg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x04] +#CHECK: lmg %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x04] +#CHECK: lmg %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x04] +#CHECK: lmg %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x04] +#CHECK: lmg %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x04] +#CHECK: lmg %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x04] +#CHECK: lmg %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x04] + + lmg %r0,%r0,0 + lmg %r0,%r15,0 + lmg %r14,%r15,0 + lmg %r15,%r15,0 + lmg %r0,%r0,-524288 + lmg %r0,%r0,-1 + lmg %r0,%r0,0 + lmg %r0,%r0,1 + lmg %r0,%r0,524287 + lmg %r0,%r0,0(%r1) + lmg %r0,%r0,0(%r15) + lmg %r0,%r0,524287(%r1) + lmg %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-lmg-02.s b/test/MC/SystemZ/insn-lmg-02.s new file mode 100644 index 000000000000..9a67c08ee649 --- /dev/null +++ b/test/MC/SystemZ/insn-lmg-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lmg %r0, %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lmg %r0, %r0, 524288 +#CHECK: error: invalid use of indexed addressing +#CHECK: lmg %r0, %r0, 0(%r1,%r2) + + lmg %r0, %r0, -524289 + lmg %r0, %r0, 524288 + lmg %r0, %r0, 0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-lndbr-01.s b/test/MC/SystemZ/insn-lndbr-01.s new file mode 100644 index 000000000000..22786238ab59 --- /dev/null +++ b/test/MC/SystemZ/insn-lndbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lndbr %f0, %f9 # encoding: [0xb3,0x11,0x00,0x09] +#CHECK: lndbr %f0, %f15 # encoding: [0xb3,0x11,0x00,0x0f] +#CHECK: lndbr %f15, %f0 # encoding: [0xb3,0x11,0x00,0xf0] +#CHECK: lndbr %f15, %f9 # encoding: [0xb3,0x11,0x00,0xf9] + + lndbr %f0,%f9 + lndbr %f0,%f15 + lndbr %f15,%f0 + lndbr %f15,%f9 diff --git a/test/MC/SystemZ/insn-lnebr-01.s b/test/MC/SystemZ/insn-lnebr-01.s new file mode 100644 index 000000000000..cf32734ad21f --- /dev/null +++ b/test/MC/SystemZ/insn-lnebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lnebr %f0, %f9 # encoding: [0xb3,0x01,0x00,0x09] +#CHECK: lnebr %f0, %f15 # encoding: [0xb3,0x01,0x00,0x0f] +#CHECK: lnebr %f15, %f0 # encoding: [0xb3,0x01,0x00,0xf0] +#CHECK: lnebr %f15, %f9 # encoding: [0xb3,0x01,0x00,0xf9] + + lnebr %f0,%f9 + lnebr %f0,%f15 + lnebr %f15,%f0 + lnebr %f15,%f9 diff --git a/test/MC/SystemZ/insn-lnxbr-01.s b/test/MC/SystemZ/insn-lnxbr-01.s new file mode 100644 index 000000000000..bf3794859ed1 --- /dev/null +++ b/test/MC/SystemZ/insn-lnxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lnxbr %f0, %f8 # encoding: [0xb3,0x41,0x00,0x08] +#CHECK: lnxbr %f0, %f13 # encoding: [0xb3,0x41,0x00,0x0d] +#CHECK: lnxbr %f13, %f0 # encoding: [0xb3,0x41,0x00,0xd0] +#CHECK: lnxbr %f13, %f9 # encoding: [0xb3,0x41,0x00,0xd9] + + lnxbr %f0,%f8 + lnxbr %f0,%f13 + lnxbr %f13,%f0 + lnxbr %f13,%f9 diff --git a/test/MC/SystemZ/insn-lnxbr-02.s b/test/MC/SystemZ/insn-lnxbr-02.s new file mode 100644 index 000000000000..9a69f48a0638 --- /dev/null +++ b/test/MC/SystemZ/insn-lnxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lnxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: lnxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: lnxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: lnxbr %f14, %f0 + + lnxbr %f0, %f2 + lnxbr %f0, %f14 + lnxbr %f2, %f0 + lnxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-lpdbr-01.s b/test/MC/SystemZ/insn-lpdbr-01.s new file mode 100644 index 000000000000..869b0c9117e3 --- /dev/null +++ b/test/MC/SystemZ/insn-lpdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lpdbr %f0, %f9 # encoding: [0xb3,0x10,0x00,0x09] +#CHECK: lpdbr %f0, %f15 # encoding: [0xb3,0x10,0x00,0x0f] +#CHECK: lpdbr %f15, %f0 # encoding: [0xb3,0x10,0x00,0xf0] +#CHECK: lpdbr %f15, %f9 # encoding: [0xb3,0x10,0x00,0xf9] + + lpdbr %f0,%f9 + lpdbr %f0,%f15 + lpdbr %f15,%f0 + lpdbr %f15,%f9 diff --git a/test/MC/SystemZ/insn-lpebr-01.s b/test/MC/SystemZ/insn-lpebr-01.s new file mode 100644 index 000000000000..917f26e9aee5 --- /dev/null +++ b/test/MC/SystemZ/insn-lpebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lpebr %f0, %f9 # encoding: [0xb3,0x00,0x00,0x09] +#CHECK: lpebr %f0, %f15 # encoding: [0xb3,0x00,0x00,0x0f] +#CHECK: lpebr %f15, %f0 # encoding: [0xb3,0x00,0x00,0xf0] +#CHECK: lpebr %f15, %f9 # encoding: [0xb3,0x00,0x00,0xf9] + + lpebr %f0,%f9 + lpebr %f0,%f15 + lpebr %f15,%f0 + lpebr %f15,%f9 diff --git a/test/MC/SystemZ/insn-lpxbr-01.s b/test/MC/SystemZ/insn-lpxbr-01.s new file mode 100644 index 000000000000..56a628ab96c2 --- /dev/null +++ b/test/MC/SystemZ/insn-lpxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lpxbr %f0, %f8 # encoding: [0xb3,0x40,0x00,0x08] +#CHECK: lpxbr %f0, %f13 # encoding: [0xb3,0x40,0x00,0x0d] +#CHECK: lpxbr %f13, %f0 # encoding: [0xb3,0x40,0x00,0xd0] +#CHECK: lpxbr %f13, %f9 # encoding: [0xb3,0x40,0x00,0xd9] + + lpxbr %f0,%f8 + lpxbr %f0,%f13 + lpxbr %f13,%f0 + lpxbr %f13,%f9 diff --git a/test/MC/SystemZ/insn-lpxbr-02.s b/test/MC/SystemZ/insn-lpxbr-02.s new file mode 100644 index 000000000000..6fa3697111ea --- /dev/null +++ b/test/MC/SystemZ/insn-lpxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lpxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: lpxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: lpxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: lpxbr %f14, %f0 + + lpxbr %f0, %f2 + lpxbr %f0, %f14 + lpxbr %f2, %f0 + lpxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-lr-01.s b/test/MC/SystemZ/insn-lr-01.s new file mode 100644 index 000000000000..8ce4a00678d6 --- /dev/null +++ b/test/MC/SystemZ/insn-lr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lr %r0, %r9 # encoding: [0x18,0x09] +#CHECK: lr %r0, %r15 # encoding: [0x18,0x0f] +#CHECK: lr %r15, %r0 # encoding: [0x18,0xf0] +#CHECK: lr %r15, %r9 # encoding: [0x18,0xf9] + + lr %r0,%r9 + lr %r0,%r15 + lr %r15,%r0 + lr %r15,%r9 diff --git a/test/MC/SystemZ/insn-lrl-01.s b/test/MC/SystemZ/insn-lrl-01.s new file mode 100644 index 000000000000..32d0eeb2b848 --- /dev/null +++ b/test/MC/SystemZ/insn-lrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lrl %r0, 2864434397 # encoding: [0xc4,0x0d,0x55,0x5d,0xe6,0x6e] +#CHECK: lrl %r15, 2864434397 # encoding: [0xc4,0xfd,0x55,0x5d,0xe6,0x6e] + + lrl %r0,0xaabbccdd + lrl %r15,0xaabbccdd + +#CHECK: lrl %r0, foo # encoding: [0xc4,0x0d,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: lrl %r15, foo # encoding: [0xc4,0xfd,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + lrl %r0,foo + lrl %r15,foo + +#CHECK: lrl %r3, bar+100 # encoding: [0xc4,0x3d,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: lrl %r4, bar+100 # encoding: [0xc4,0x4d,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + lrl %r3,bar+100 + lrl %r4,bar+100 + +#CHECK: lrl %r7, frob@PLT # encoding: [0xc4,0x7d,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: lrl %r8, frob@PLT # encoding: [0xc4,0x8d,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + lrl %r7,frob@PLT + lrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-lrv-01.s b/test/MC/SystemZ/insn-lrv-01.s new file mode 100644 index 000000000000..75b973a22d0e --- /dev/null +++ b/test/MC/SystemZ/insn-lrv-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lrv %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1e] +#CHECK: lrv %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1e] +#CHECK: lrv %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1e] +#CHECK: lrv %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x1e] +#CHECK: lrv %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x1e] +#CHECK: lrv %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x1e] +#CHECK: lrv %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x1e] +#CHECK: lrv %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x1e] +#CHECK: lrv %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x1e] +#CHECK: lrv %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x1e] + + lrv %r0,-524288 + lrv %r0,-1 + lrv %r0,0 + lrv %r0,1 + lrv %r0,524287 + lrv %r0,0(%r1) + lrv %r0,0(%r15) + lrv %r0,524287(%r1,%r15) + lrv %r0,524287(%r15,%r1) + lrv %r15,0 diff --git a/test/MC/SystemZ/insn-lrv-02.s b/test/MC/SystemZ/insn-lrv-02.s new file mode 100644 index 000000000000..f2dcfa777a26 --- /dev/null +++ b/test/MC/SystemZ/insn-lrv-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lrv %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lrv %r0, 524288 + + lrv %r0, -524289 + lrv %r0, 524288 diff --git a/test/MC/SystemZ/insn-lrvg-01.s b/test/MC/SystemZ/insn-lrvg-01.s new file mode 100644 index 000000000000..d2d8b2db43d4 --- /dev/null +++ b/test/MC/SystemZ/insn-lrvg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lrvg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x0f] +#CHECK: lrvg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x0f] +#CHECK: lrvg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x0f] +#CHECK: lrvg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x0f] +#CHECK: lrvg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x0f] +#CHECK: lrvg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x0f] +#CHECK: lrvg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x0f] +#CHECK: lrvg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x0f] +#CHECK: lrvg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x0f] +#CHECK: lrvg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x0f] + + lrvg %r0,-524288 + lrvg %r0,-1 + lrvg %r0,0 + lrvg %r0,1 + lrvg %r0,524287 + lrvg %r0,0(%r1) + lrvg %r0,0(%r15) + lrvg %r0,524287(%r1,%r15) + lrvg %r0,524287(%r15,%r1) + lrvg %r15,0 diff --git a/test/MC/SystemZ/insn-lrvg-02.s b/test/MC/SystemZ/insn-lrvg-02.s new file mode 100644 index 000000000000..690fa1350092 --- /dev/null +++ b/test/MC/SystemZ/insn-lrvg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: lrvg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: lrvg %r0, 524288 + + lrvg %r0, -524289 + lrvg %r0, 524288 diff --git a/test/MC/SystemZ/insn-lrvgr-01.s b/test/MC/SystemZ/insn-lrvgr-01.s new file mode 100644 index 000000000000..1b6e8841ee2c --- /dev/null +++ b/test/MC/SystemZ/insn-lrvgr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lrvgr %r0, %r0 # encoding: [0xb9,0x0f,0x00,0x00] +#CHECK: lrvgr %r0, %r15 # encoding: [0xb9,0x0f,0x00,0x0f] +#CHECK: lrvgr %r15, %r0 # encoding: [0xb9,0x0f,0x00,0xf0] +#CHECK: lrvgr %r7, %r8 # encoding: [0xb9,0x0f,0x00,0x78] +#CHECK: lrvgr %r15, %r15 # encoding: [0xb9,0x0f,0x00,0xff] + + lrvgr %r0,%r0 + lrvgr %r0,%r15 + lrvgr %r15,%r0 + lrvgr %r7,%r8 + lrvgr %r15,%r15 diff --git a/test/MC/SystemZ/insn-lrvr-01.s b/test/MC/SystemZ/insn-lrvr-01.s new file mode 100644 index 000000000000..c0d5d895b8bc --- /dev/null +++ b/test/MC/SystemZ/insn-lrvr-01.s @@ -0,0 +1,13 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lrvr %r0, %r0 # encoding: [0xb9,0x1f,0x00,0x00] +#CHECK: lrvr %r0, %r15 # encoding: [0xb9,0x1f,0x00,0x0f] +#CHECK: lrvr %r15, %r0 # encoding: [0xb9,0x1f,0x00,0xf0] +#CHECK: lrvr %r7, %r8 # encoding: [0xb9,0x1f,0x00,0x78] +#CHECK: lrvr %r15, %r15 # encoding: [0xb9,0x1f,0x00,0xff] + + lrvr %r0,%r0 + lrvr %r0,%r15 + lrvr %r15,%r0 + lrvr %r7,%r8 + lrvr %r15,%r15 diff --git a/test/MC/SystemZ/insn-lxr-01.s b/test/MC/SystemZ/insn-lxr-01.s new file mode 100644 index 000000000000..a04cdf747285 --- /dev/null +++ b/test/MC/SystemZ/insn-lxr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lxr %f0, %f8 # encoding: [0xb3,0x65,0x00,0x08] +#CHECK: lxr %f0, %f13 # encoding: [0xb3,0x65,0x00,0x0d] +#CHECK: lxr %f13, %f0 # encoding: [0xb3,0x65,0x00,0xd0] +#CHECK: lxr %f13, %f9 # encoding: [0xb3,0x65,0x00,0xd9] + + lxr %f0,%f8 + lxr %f0,%f13 + lxr %f13,%f0 + lxr %f13,%f9 diff --git a/test/MC/SystemZ/insn-lxr-02.s b/test/MC/SystemZ/insn-lxr-02.s new file mode 100644 index 000000000000..b18ad756b125 --- /dev/null +++ b/test/MC/SystemZ/insn-lxr-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lxr %f2, %f0 +#CHECK: error: invalid register +#CHECK: lxr %f15, %f0 +#CHECK: error: invalid register +#CHECK: lxr %f0, %f2 +#CHECK: error: invalid register +#CHECK: lxr %f0, %f15 + + lxr %f2, %f0 + lxr %f15, %f0 + lxr %f0, %f2 + lxr %f0, %f15 diff --git a/test/MC/SystemZ/insn-ly-01.s b/test/MC/SystemZ/insn-ly-01.s new file mode 100644 index 000000000000..25bc3e8a34c4 --- /dev/null +++ b/test/MC/SystemZ/insn-ly-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ly %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x58] +#CHECK: ly %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x58] +#CHECK: ly %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x58] +#CHECK: ly %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x58] +#CHECK: ly %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x58] +#CHECK: ly %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x58] +#CHECK: ly %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x58] +#CHECK: ly %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x58] +#CHECK: ly %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x58] +#CHECK: ly %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x58] + + ly %r0, -524288 + ly %r0, -1 + ly %r0, 0 + ly %r0, 1 + ly %r0, 524287 + ly %r0, 0(%r1) + ly %r0, 0(%r15) + ly %r0, 524287(%r1,%r15) + ly %r0, 524287(%r15,%r1) + ly %r15, 0 diff --git a/test/MC/SystemZ/insn-ly-02.s b/test/MC/SystemZ/insn-ly-02.s new file mode 100644 index 000000000000..b2d424e1152e --- /dev/null +++ b/test/MC/SystemZ/insn-ly-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ly %r0, -524289 +#CHECK: error: invalid operand +#CHECK: ly %r0, 524288 + + ly %r0, -524289 + ly %r0, 524288 diff --git a/test/MC/SystemZ/insn-lzdr-01.s b/test/MC/SystemZ/insn-lzdr-01.s new file mode 100644 index 000000000000..c95082f47b75 --- /dev/null +++ b/test/MC/SystemZ/insn-lzdr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lzdr %f0 # encoding: [0xb3,0x75,0x00,0x00] +#CHECK: lzdr %f7 # encoding: [0xb3,0x75,0x00,0x70] +#CHECK: lzdr %f15 # encoding: [0xb3,0x75,0x00,0xf0] + + lzdr %f0 + lzdr %f7 + lzdr %f15 diff --git a/test/MC/SystemZ/insn-lzer-01.s b/test/MC/SystemZ/insn-lzer-01.s new file mode 100644 index 000000000000..0944047a5ba6 --- /dev/null +++ b/test/MC/SystemZ/insn-lzer-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lzer %f0 # encoding: [0xb3,0x74,0x00,0x00] +#CHECK: lzer %f7 # encoding: [0xb3,0x74,0x00,0x70] +#CHECK: lzer %f15 # encoding: [0xb3,0x74,0x00,0xf0] + + lzer %f0 + lzer %f7 + lzer %f15 diff --git a/test/MC/SystemZ/insn-lzxr-01.s b/test/MC/SystemZ/insn-lzxr-01.s new file mode 100644 index 000000000000..bd5a5c2ea13c --- /dev/null +++ b/test/MC/SystemZ/insn-lzxr-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lzxr %f0 # encoding: [0xb3,0x76,0x00,0x00] +#CHECK: lzxr %f8 # encoding: [0xb3,0x76,0x00,0x80] +#CHECK: lzxr %f13 # encoding: [0xb3,0x76,0x00,0xd0] + + lzxr %f0 + lzxr %f8 + lzxr %f13 diff --git a/test/MC/SystemZ/insn-lzxr-02.s b/test/MC/SystemZ/insn-lzxr-02.s new file mode 100644 index 000000000000..4ce2ad04bc6e --- /dev/null +++ b/test/MC/SystemZ/insn-lzxr-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lzxr %f2 +#CHECK: error: invalid register +#CHECK: lzxr %f14 +#CHECK: error: invalid register +#CHECK: lzxr %f15 + + lzxr %f2 + lzxr %f14 + lzxr %f15 diff --git a/test/MC/SystemZ/insn-madb-01.s b/test/MC/SystemZ/insn-madb-01.s new file mode 100644 index 000000000000..6eec4beb37a2 --- /dev/null +++ b/test/MC/SystemZ/insn-madb-01.s @@ -0,0 +1,21 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: madb %f0, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x1e] +#CHECK: madb %f0, %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x1e] +#CHECK: madb %f0, %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x1e] +#CHECK: madb %f0, %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x1e] +#CHECK: madb %f0, %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x1e] +#CHECK: madb %f0, %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x1e] +#CHECK: madb %f0, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x1e] +#CHECK: madb %f15, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0xf0,0x1e] +#CHECK: madb %f15, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0xf0,0x1e] + + madb %f0, %f0, 0 + madb %f0, %f0, 4095 + madb %f0, %f0, 0(%r1) + madb %f0, %f0, 0(%r15) + madb %f0, %f0, 4095(%r1,%r15) + madb %f0, %f0, 4095(%r15,%r1) + madb %f0, %f15, 0 + madb %f15, %f0, 0 + madb %f15, %f15, 0 diff --git a/test/MC/SystemZ/insn-madb-02.s b/test/MC/SystemZ/insn-madb-02.s new file mode 100644 index 000000000000..f7fdee978e13 --- /dev/null +++ b/test/MC/SystemZ/insn-madb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: madb %f0, %f0, -1 +#CHECK: error: invalid operand +#CHECK: madb %f0, %f0, 4096 + + madb %f0, %f0, -1 + madb %f0, %f0, 4096 diff --git a/test/MC/SystemZ/insn-madbr-01.s b/test/MC/SystemZ/insn-madbr-01.s new file mode 100644 index 000000000000..42142be99e5a --- /dev/null +++ b/test/MC/SystemZ/insn-madbr-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: madbr %f0, %f0, %f0 # encoding: [0xb3,0x1e,0x00,0x00] +#CHECK: madbr %f0, %f0, %f15 # encoding: [0xb3,0x1e,0x00,0x0f] +#CHECK: madbr %f0, %f15, %f0 # encoding: [0xb3,0x1e,0x00,0xf0] +#CHECK: madbr %f15, %f0, %f0 # encoding: [0xb3,0x1e,0xf0,0x00] +#CHECK: madbr %f7, %f8, %f9 # encoding: [0xb3,0x1e,0x70,0x89] +#CHECK: madbr %f15, %f15, %f15 # encoding: [0xb3,0x1e,0xf0,0xff] + + madbr %f0, %f0, %f0 + madbr %f0, %f0, %f15 + madbr %f0, %f15, %f0 + madbr %f15, %f0, %f0 + madbr %f7, %f8, %f9 + madbr %f15, %f15, %f15 diff --git a/test/MC/SystemZ/insn-maeb-01.s b/test/MC/SystemZ/insn-maeb-01.s new file mode 100644 index 000000000000..7a998fd79ff9 --- /dev/null +++ b/test/MC/SystemZ/insn-maeb-01.s @@ -0,0 +1,21 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: maeb %f0, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x0e] +#CHECK: maeb %f0, %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x0e] +#CHECK: maeb %f0, %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x0e] +#CHECK: maeb %f0, %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x0e] +#CHECK: maeb %f0, %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x0e] +#CHECK: maeb %f0, %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x0e] +#CHECK: maeb %f0, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x0e] +#CHECK: maeb %f15, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0xf0,0x0e] +#CHECK: maeb %f15, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0xf0,0x0e] + + maeb %f0, %f0, 0 + maeb %f0, %f0, 4095 + maeb %f0, %f0, 0(%r1) + maeb %f0, %f0, 0(%r15) + maeb %f0, %f0, 4095(%r1,%r15) + maeb %f0, %f0, 4095(%r15,%r1) + maeb %f0, %f15, 0 + maeb %f15, %f0, 0 + maeb %f15, %f15, 0 diff --git a/test/MC/SystemZ/insn-maeb-02.s b/test/MC/SystemZ/insn-maeb-02.s new file mode 100644 index 000000000000..e12407acc2d0 --- /dev/null +++ b/test/MC/SystemZ/insn-maeb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: maeb %f0, %f0, -1 +#CHECK: error: invalid operand +#CHECK: maeb %f0, %f0, 4096 + + maeb %f0, %f0, -1 + maeb %f0, %f0, 4096 diff --git a/test/MC/SystemZ/insn-maebr-01.s b/test/MC/SystemZ/insn-maebr-01.s new file mode 100644 index 000000000000..be92aaf87483 --- /dev/null +++ b/test/MC/SystemZ/insn-maebr-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: maebr %f0, %f0, %f0 # encoding: [0xb3,0x0e,0x00,0x00] +#CHECK: maebr %f0, %f0, %f15 # encoding: [0xb3,0x0e,0x00,0x0f] +#CHECK: maebr %f0, %f15, %f0 # encoding: [0xb3,0x0e,0x00,0xf0] +#CHECK: maebr %f15, %f0, %f0 # encoding: [0xb3,0x0e,0xf0,0x00] +#CHECK: maebr %f7, %f8, %f9 # encoding: [0xb3,0x0e,0x70,0x89] +#CHECK: maebr %f15, %f15, %f15 # encoding: [0xb3,0x0e,0xf0,0xff] + + maebr %f0, %f0, %f0 + maebr %f0, %f0, %f15 + maebr %f0, %f15, %f0 + maebr %f15, %f0, %f0 + maebr %f7, %f8, %f9 + maebr %f15, %f15, %f15 diff --git a/test/MC/SystemZ/insn-mdb-01.s b/test/MC/SystemZ/insn-mdb-01.s new file mode 100644 index 000000000000..58be9779fc56 --- /dev/null +++ b/test/MC/SystemZ/insn-mdb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mdb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x1c] +#CHECK: mdb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x1c] +#CHECK: mdb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x1c] +#CHECK: mdb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x1c] +#CHECK: mdb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x1c] +#CHECK: mdb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x1c] +#CHECK: mdb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x1c] + + mdb %f0, 0 + mdb %f0, 4095 + mdb %f0, 0(%r1) + mdb %f0, 0(%r15) + mdb %f0, 4095(%r1,%r15) + mdb %f0, 4095(%r15,%r1) + mdb %f15, 0 diff --git a/test/MC/SystemZ/insn-mdb-02.s b/test/MC/SystemZ/insn-mdb-02.s new file mode 100644 index 000000000000..f1bdab015f1c --- /dev/null +++ b/test/MC/SystemZ/insn-mdb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mdb %f0, -1 +#CHECK: error: invalid operand +#CHECK: mdb %f0, 4096 + + mdb %f0, -1 + mdb %f0, 4096 diff --git a/test/MC/SystemZ/insn-mdbr-01.s b/test/MC/SystemZ/insn-mdbr-01.s new file mode 100644 index 000000000000..4ff16b9c0b36 --- /dev/null +++ b/test/MC/SystemZ/insn-mdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mdbr %f0, %f0 # encoding: [0xb3,0x1c,0x00,0x00] +#CHECK: mdbr %f0, %f15 # encoding: [0xb3,0x1c,0x00,0x0f] +#CHECK: mdbr %f7, %f8 # encoding: [0xb3,0x1c,0x00,0x78] +#CHECK: mdbr %f15, %f0 # encoding: [0xb3,0x1c,0x00,0xf0] + + mdbr %f0, %f0 + mdbr %f0, %f15 + mdbr %f7, %f8 + mdbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-mdeb-01.s b/test/MC/SystemZ/insn-mdeb-01.s new file mode 100644 index 000000000000..5d85c079db1f --- /dev/null +++ b/test/MC/SystemZ/insn-mdeb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mdeb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x0c] +#CHECK: mdeb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x0c] +#CHECK: mdeb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x0c] +#CHECK: mdeb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x0c] +#CHECK: mdeb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x0c] +#CHECK: mdeb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x0c] +#CHECK: mdeb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x0c] + + mdeb %f0, 0 + mdeb %f0, 4095 + mdeb %f0, 0(%r1) + mdeb %f0, 0(%r15) + mdeb %f0, 4095(%r1,%r15) + mdeb %f0, 4095(%r15,%r1) + mdeb %f15, 0 diff --git a/test/MC/SystemZ/insn-mdeb-02.s b/test/MC/SystemZ/insn-mdeb-02.s new file mode 100644 index 000000000000..87ec6767d4e1 --- /dev/null +++ b/test/MC/SystemZ/insn-mdeb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mdeb %f0, -1 +#CHECK: error: invalid operand +#CHECK: mdeb %f0, 4096 + + mdeb %f0, -1 + mdeb %f0, 4096 diff --git a/test/MC/SystemZ/insn-mdebr-01.s b/test/MC/SystemZ/insn-mdebr-01.s new file mode 100644 index 000000000000..17c495581d34 --- /dev/null +++ b/test/MC/SystemZ/insn-mdebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mdebr %f0, %f0 # encoding: [0xb3,0x0c,0x00,0x00] +#CHECK: mdebr %f0, %f15 # encoding: [0xb3,0x0c,0x00,0x0f] +#CHECK: mdebr %f7, %f8 # encoding: [0xb3,0x0c,0x00,0x78] +#CHECK: mdebr %f15, %f0 # encoding: [0xb3,0x0c,0x00,0xf0] + + mdebr %f0, %f0 + mdebr %f0, %f15 + mdebr %f7, %f8 + mdebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-meeb-01.s b/test/MC/SystemZ/insn-meeb-01.s new file mode 100644 index 000000000000..bb14d0435577 --- /dev/null +++ b/test/MC/SystemZ/insn-meeb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: meeb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x17] +#CHECK: meeb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x17] +#CHECK: meeb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x17] +#CHECK: meeb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x17] +#CHECK: meeb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x17] +#CHECK: meeb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x17] +#CHECK: meeb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x17] + + meeb %f0, 0 + meeb %f0, 4095 + meeb %f0, 0(%r1) + meeb %f0, 0(%r15) + meeb %f0, 4095(%r1,%r15) + meeb %f0, 4095(%r15,%r1) + meeb %f15, 0 diff --git a/test/MC/SystemZ/insn-meeb-02.s b/test/MC/SystemZ/insn-meeb-02.s new file mode 100644 index 000000000000..ba5e3b28e3c8 --- /dev/null +++ b/test/MC/SystemZ/insn-meeb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: meeb %f0, -1 +#CHECK: error: invalid operand +#CHECK: meeb %f0, 4096 + + meeb %f0, -1 + meeb %f0, 4096 diff --git a/test/MC/SystemZ/insn-meebr-01.s b/test/MC/SystemZ/insn-meebr-01.s new file mode 100644 index 000000000000..99cd8a38e000 --- /dev/null +++ b/test/MC/SystemZ/insn-meebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: meebr %f0, %f0 # encoding: [0xb3,0x17,0x00,0x00] +#CHECK: meebr %f0, %f15 # encoding: [0xb3,0x17,0x00,0x0f] +#CHECK: meebr %f7, %f8 # encoding: [0xb3,0x17,0x00,0x78] +#CHECK: meebr %f15, %f0 # encoding: [0xb3,0x17,0x00,0xf0] + + meebr %f0, %f0 + meebr %f0, %f15 + meebr %f7, %f8 + meebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-mghi-01.s b/test/MC/SystemZ/insn-mghi-01.s new file mode 100644 index 000000000000..d07278f20a14 --- /dev/null +++ b/test/MC/SystemZ/insn-mghi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mghi %r0, -32768 # encoding: [0xa7,0x0d,0x80,0x00] +#CHECK: mghi %r0, -1 # encoding: [0xa7,0x0d,0xff,0xff] +#CHECK: mghi %r0, 0 # encoding: [0xa7,0x0d,0x00,0x00] +#CHECK: mghi %r0, 1 # encoding: [0xa7,0x0d,0x00,0x01] +#CHECK: mghi %r0, 32767 # encoding: [0xa7,0x0d,0x7f,0xff] +#CHECK: mghi %r15, 0 # encoding: [0xa7,0xfd,0x00,0x00] + + mghi %r0, -32768 + mghi %r0, -1 + mghi %r0, 0 + mghi %r0, 1 + mghi %r0, 32767 + mghi %r15, 0 diff --git a/test/MC/SystemZ/insn-mghi-02.s b/test/MC/SystemZ/insn-mghi-02.s new file mode 100644 index 000000000000..860fa3b78754 --- /dev/null +++ b/test/MC/SystemZ/insn-mghi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mghi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: mghi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: mghi %r0, foo + + mghi %r0, -32769 + mghi %r0, 32768 + mghi %r0, foo diff --git a/test/MC/SystemZ/insn-mh-01.s b/test/MC/SystemZ/insn-mh-01.s new file mode 100644 index 000000000000..59d5515438a0 --- /dev/null +++ b/test/MC/SystemZ/insn-mh-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mh %r0, 0 # encoding: [0x4c,0x00,0x00,0x00] +#CHECK: mh %r0, 4095 # encoding: [0x4c,0x00,0x0f,0xff] +#CHECK: mh %r0, 0(%r1) # encoding: [0x4c,0x00,0x10,0x00] +#CHECK: mh %r0, 0(%r15) # encoding: [0x4c,0x00,0xf0,0x00] +#CHECK: mh %r0, 4095(%r1,%r15) # encoding: [0x4c,0x01,0xff,0xff] +#CHECK: mh %r0, 4095(%r15,%r1) # encoding: [0x4c,0x0f,0x1f,0xff] +#CHECK: mh %r15, 0 # encoding: [0x4c,0xf0,0x00,0x00] + + mh %r0, 0 + mh %r0, 4095 + mh %r0, 0(%r1) + mh %r0, 0(%r15) + mh %r0, 4095(%r1,%r15) + mh %r0, 4095(%r15,%r1) + mh %r15, 0 diff --git a/test/MC/SystemZ/insn-mh-02.s b/test/MC/SystemZ/insn-mh-02.s new file mode 100644 index 000000000000..4ea35fca5916 --- /dev/null +++ b/test/MC/SystemZ/insn-mh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mh %r0, -1 +#CHECK: error: invalid operand +#CHECK: mh %r0, 4096 + + mh %r0, -1 + mh %r0, 4096 diff --git a/test/MC/SystemZ/insn-mhi-01.s b/test/MC/SystemZ/insn-mhi-01.s new file mode 100644 index 000000000000..adf42ae7346c --- /dev/null +++ b/test/MC/SystemZ/insn-mhi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mhi %r0, -32768 # encoding: [0xa7,0x0c,0x80,0x00] +#CHECK: mhi %r0, -1 # encoding: [0xa7,0x0c,0xff,0xff] +#CHECK: mhi %r0, 0 # encoding: [0xa7,0x0c,0x00,0x00] +#CHECK: mhi %r0, 1 # encoding: [0xa7,0x0c,0x00,0x01] +#CHECK: mhi %r0, 32767 # encoding: [0xa7,0x0c,0x7f,0xff] +#CHECK: mhi %r15, 0 # encoding: [0xa7,0xfc,0x00,0x00] + + mhi %r0, -32768 + mhi %r0, -1 + mhi %r0, 0 + mhi %r0, 1 + mhi %r0, 32767 + mhi %r15, 0 diff --git a/test/MC/SystemZ/insn-mhi-02.s b/test/MC/SystemZ/insn-mhi-02.s new file mode 100644 index 000000000000..74e83576e91b --- /dev/null +++ b/test/MC/SystemZ/insn-mhi-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mhi %r0, -32769 +#CHECK: error: invalid operand +#CHECK: mhi %r0, 32768 +#CHECK: error: invalid operand +#CHECK: mhi %r0, foo + + mhi %r0, -32769 + mhi %r0, 32768 + mhi %r0, foo diff --git a/test/MC/SystemZ/insn-mhy-01.s b/test/MC/SystemZ/insn-mhy-01.s new file mode 100644 index 000000000000..89c394bd81ed --- /dev/null +++ b/test/MC/SystemZ/insn-mhy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mhy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x7c] +#CHECK: mhy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x7c] +#CHECK: mhy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x7c] +#CHECK: mhy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x7c] +#CHECK: mhy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x7c] +#CHECK: mhy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x7c] +#CHECK: mhy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x7c] +#CHECK: mhy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x7c] +#CHECK: mhy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x7c] +#CHECK: mhy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x7c] + + mhy %r0, -524288 + mhy %r0, -1 + mhy %r0, 0 + mhy %r0, 1 + mhy %r0, 524287 + mhy %r0, 0(%r1) + mhy %r0, 0(%r15) + mhy %r0, 524287(%r1,%r15) + mhy %r0, 524287(%r15,%r1) + mhy %r15, 0 diff --git a/test/MC/SystemZ/insn-mhy-02.s b/test/MC/SystemZ/insn-mhy-02.s new file mode 100644 index 000000000000..bce62f096c18 --- /dev/null +++ b/test/MC/SystemZ/insn-mhy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mhy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: mhy %r0, 524288 + + mhy %r0, -524289 + mhy %r0, 524288 diff --git a/test/MC/SystemZ/insn-mlg-01.s b/test/MC/SystemZ/insn-mlg-01.s new file mode 100644 index 000000000000..e9bd6510fc68 --- /dev/null +++ b/test/MC/SystemZ/insn-mlg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mlg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x86] +#CHECK: mlg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x86] +#CHECK: mlg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x86] +#CHECK: mlg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x86] +#CHECK: mlg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x86] +#CHECK: mlg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x86] +#CHECK: mlg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x86] +#CHECK: mlg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x86] +#CHECK: mlg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x86] +#CHECK: mlg %r14, 0 # encoding: [0xe3,0xe0,0x00,0x00,0x00,0x86] + + mlg %r0, -524288 + mlg %r0, -1 + mlg %r0, 0 + mlg %r0, 1 + mlg %r0, 524287 + mlg %r0, 0(%r1) + mlg %r0, 0(%r15) + mlg %r0, 524287(%r1,%r15) + mlg %r0, 524287(%r15,%r1) + mlg %r14, 0 diff --git a/test/MC/SystemZ/insn-mlg-02.s b/test/MC/SystemZ/insn-mlg-02.s new file mode 100644 index 000000000000..7174bc50c2f1 --- /dev/null +++ b/test/MC/SystemZ/insn-mlg-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mlg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: mlg %r0, 524288 +#CHECK: error: invalid register +#CHECK: mlg %r1, 0 +#CHECK: error: invalid register +#CHECK: mlg %r15, 0 + + mlg %r0, -524289 + mlg %r0, 524288 + mlg %r1, 0 + mlg %r15, 0 diff --git a/test/MC/SystemZ/insn-mlgr-01.s b/test/MC/SystemZ/insn-mlgr-01.s new file mode 100644 index 000000000000..215bde099151 --- /dev/null +++ b/test/MC/SystemZ/insn-mlgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mlgr %r0, %r0 # encoding: [0xb9,0x86,0x00,0x00] +#CHECK: mlgr %r0, %r15 # encoding: [0xb9,0x86,0x00,0x0f] +#CHECK: mlgr %r14, %r0 # encoding: [0xb9,0x86,0x00,0xe0] +#CHECK: mlgr %r6, %r9 # encoding: [0xb9,0x86,0x00,0x69] + + mlgr %r0,%r0 + mlgr %r0,%r15 + mlgr %r14,%r0 + mlgr %r6,%r9 diff --git a/test/MC/SystemZ/insn-mlgr-02.s b/test/MC/SystemZ/insn-mlgr-02.s new file mode 100644 index 000000000000..30f4259031bb --- /dev/null +++ b/test/MC/SystemZ/insn-mlgr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: mlgr %r1, %r0 +#CHECK: error: invalid register +#CHECK: mlgr %r15, %r0 + + mlgr %r1, %r0 + mlgr %r15, %r0 diff --git a/test/MC/SystemZ/insn-ms-01.s b/test/MC/SystemZ/insn-ms-01.s new file mode 100644 index 000000000000..e104e09a1bf4 --- /dev/null +++ b/test/MC/SystemZ/insn-ms-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ms %r0, 0 # encoding: [0x71,0x00,0x00,0x00] +#CHECK: ms %r0, 4095 # encoding: [0x71,0x00,0x0f,0xff] +#CHECK: ms %r0, 0(%r1) # encoding: [0x71,0x00,0x10,0x00] +#CHECK: ms %r0, 0(%r15) # encoding: [0x71,0x00,0xf0,0x00] +#CHECK: ms %r0, 4095(%r1,%r15) # encoding: [0x71,0x01,0xff,0xff] +#CHECK: ms %r0, 4095(%r15,%r1) # encoding: [0x71,0x0f,0x1f,0xff] +#CHECK: ms %r15, 0 # encoding: [0x71,0xf0,0x00,0x00] + + ms %r0, 0 + ms %r0, 4095 + ms %r0, 0(%r1) + ms %r0, 0(%r15) + ms %r0, 4095(%r1,%r15) + ms %r0, 4095(%r15,%r1) + ms %r15, 0 diff --git a/test/MC/SystemZ/insn-ms-02.s b/test/MC/SystemZ/insn-ms-02.s new file mode 100644 index 000000000000..9cc7ecda3402 --- /dev/null +++ b/test/MC/SystemZ/insn-ms-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ms %r0, -1 +#CHECK: error: invalid operand +#CHECK: ms %r0, 4096 + + ms %r0, -1 + ms %r0, 4096 diff --git a/test/MC/SystemZ/insn-msdb-01.s b/test/MC/SystemZ/insn-msdb-01.s new file mode 100644 index 000000000000..50ef45bfc42f --- /dev/null +++ b/test/MC/SystemZ/insn-msdb-01.s @@ -0,0 +1,21 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msdb %f0, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x1f] +#CHECK: msdb %f0, %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x1f] +#CHECK: msdb %f0, %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x1f] +#CHECK: msdb %f0, %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x1f] +#CHECK: msdb %f0, %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x1f] +#CHECK: msdb %f0, %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x1f] +#CHECK: msdb %f0, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x1f] +#CHECK: msdb %f15, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0xf0,0x1f] +#CHECK: msdb %f15, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0xf0,0x1f] + + msdb %f0, %f0, 0 + msdb %f0, %f0, 4095 + msdb %f0, %f0, 0(%r1) + msdb %f0, %f0, 0(%r15) + msdb %f0, %f0, 4095(%r1,%r15) + msdb %f0, %f0, 4095(%r15,%r1) + msdb %f0, %f15, 0 + msdb %f15, %f0, 0 + msdb %f15, %f15, 0 diff --git a/test/MC/SystemZ/insn-msdb-02.s b/test/MC/SystemZ/insn-msdb-02.s new file mode 100644 index 000000000000..552fc72223dd --- /dev/null +++ b/test/MC/SystemZ/insn-msdb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: msdb %f0, %f0, -1 +#CHECK: error: invalid operand +#CHECK: msdb %f0, %f0, 4096 + + msdb %f0, %f0, -1 + msdb %f0, %f0, 4096 diff --git a/test/MC/SystemZ/insn-msdbr-01.s b/test/MC/SystemZ/insn-msdbr-01.s new file mode 100644 index 000000000000..0c816578a2a9 --- /dev/null +++ b/test/MC/SystemZ/insn-msdbr-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msdbr %f0, %f0, %f0 # encoding: [0xb3,0x1f,0x00,0x00] +#CHECK: msdbr %f0, %f0, %f15 # encoding: [0xb3,0x1f,0x00,0x0f] +#CHECK: msdbr %f0, %f15, %f0 # encoding: [0xb3,0x1f,0x00,0xf0] +#CHECK: msdbr %f15, %f0, %f0 # encoding: [0xb3,0x1f,0xf0,0x00] +#CHECK: msdbr %f7, %f8, %f9 # encoding: [0xb3,0x1f,0x70,0x89] +#CHECK: msdbr %f15, %f15, %f15 # encoding: [0xb3,0x1f,0xf0,0xff] + + msdbr %f0, %f0, %f0 + msdbr %f0, %f0, %f15 + msdbr %f0, %f15, %f0 + msdbr %f15, %f0, %f0 + msdbr %f7, %f8, %f9 + msdbr %f15, %f15, %f15 diff --git a/test/MC/SystemZ/insn-mseb-01.s b/test/MC/SystemZ/insn-mseb-01.s new file mode 100644 index 000000000000..4464cfb803ca --- /dev/null +++ b/test/MC/SystemZ/insn-mseb-01.s @@ -0,0 +1,21 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mseb %f0, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x0f] +#CHECK: mseb %f0, %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x0f] +#CHECK: mseb %f0, %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x0f] +#CHECK: mseb %f0, %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x0f] +#CHECK: mseb %f0, %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x0f] +#CHECK: mseb %f0, %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x0f] +#CHECK: mseb %f0, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x0f] +#CHECK: mseb %f15, %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0xf0,0x0f] +#CHECK: mseb %f15, %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0xf0,0x0f] + + mseb %f0, %f0, 0 + mseb %f0, %f0, 4095 + mseb %f0, %f0, 0(%r1) + mseb %f0, %f0, 0(%r15) + mseb %f0, %f0, 4095(%r1,%r15) + mseb %f0, %f0, 4095(%r15,%r1) + mseb %f0, %f15, 0 + mseb %f15, %f0, 0 + mseb %f15, %f15, 0 diff --git a/test/MC/SystemZ/insn-mseb-02.s b/test/MC/SystemZ/insn-mseb-02.s new file mode 100644 index 000000000000..03aaa0fb8a6b --- /dev/null +++ b/test/MC/SystemZ/insn-mseb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mseb %f0, %f0, -1 +#CHECK: error: invalid operand +#CHECK: mseb %f0, %f0, 4096 + + mseb %f0, %f0, -1 + mseb %f0, %f0, 4096 diff --git a/test/MC/SystemZ/insn-msebr-01.s b/test/MC/SystemZ/insn-msebr-01.s new file mode 100644 index 000000000000..f936cb632529 --- /dev/null +++ b/test/MC/SystemZ/insn-msebr-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msebr %f0, %f0, %f0 # encoding: [0xb3,0x0f,0x00,0x00] +#CHECK: msebr %f0, %f0, %f15 # encoding: [0xb3,0x0f,0x00,0x0f] +#CHECK: msebr %f0, %f15, %f0 # encoding: [0xb3,0x0f,0x00,0xf0] +#CHECK: msebr %f15, %f0, %f0 # encoding: [0xb3,0x0f,0xf0,0x00] +#CHECK: msebr %f7, %f8, %f9 # encoding: [0xb3,0x0f,0x70,0x89] +#CHECK: msebr %f15, %f15, %f15 # encoding: [0xb3,0x0f,0xf0,0xff] + + msebr %f0, %f0, %f0 + msebr %f0, %f0, %f15 + msebr %f0, %f15, %f0 + msebr %f15, %f0, %f0 + msebr %f7, %f8, %f9 + msebr %f15, %f15, %f15 diff --git a/test/MC/SystemZ/insn-msfi-01.s b/test/MC/SystemZ/insn-msfi-01.s new file mode 100644 index 000000000000..629260e42060 --- /dev/null +++ b/test/MC/SystemZ/insn-msfi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msfi %r0, -2147483648 # encoding: [0xc2,0x01,0x80,0x00,0x00,0x00] +#CHECK: msfi %r0, -1 # encoding: [0xc2,0x01,0xff,0xff,0xff,0xff] +#CHECK: msfi %r0, 0 # encoding: [0xc2,0x01,0x00,0x00,0x00,0x00] +#CHECK: msfi %r0, 1 # encoding: [0xc2,0x01,0x00,0x00,0x00,0x01] +#CHECK: msfi %r0, 2147483647 # encoding: [0xc2,0x01,0x7f,0xff,0xff,0xff] +#CHECK: msfi %r15, 0 # encoding: [0xc2,0xf1,0x00,0x00,0x00,0x00] + + msfi %r0, -1 << 31 + msfi %r0, -1 + msfi %r0, 0 + msfi %r0, 1 + msfi %r0, (1 << 31) - 1 + msfi %r15, 0 diff --git a/test/MC/SystemZ/insn-msfi-02.s b/test/MC/SystemZ/insn-msfi-02.s new file mode 100644 index 000000000000..2700ce78b8e3 --- /dev/null +++ b/test/MC/SystemZ/insn-msfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: msfi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: msfi %r0, (1 << 31) + + msfi %r0, (-1 << 31) - 1 + msfi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-msg-01.s b/test/MC/SystemZ/insn-msg-01.s new file mode 100644 index 000000000000..298811c1e965 --- /dev/null +++ b/test/MC/SystemZ/insn-msg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x0c] +#CHECK: msg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x0c] +#CHECK: msg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x0c] +#CHECK: msg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x0c] +#CHECK: msg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x0c] +#CHECK: msg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x0c] +#CHECK: msg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x0c] +#CHECK: msg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x0c] +#CHECK: msg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x0c] +#CHECK: msg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x0c] + + msg %r0, -524288 + msg %r0, -1 + msg %r0, 0 + msg %r0, 1 + msg %r0, 524287 + msg %r0, 0(%r1) + msg %r0, 0(%r15) + msg %r0, 524287(%r1,%r15) + msg %r0, 524287(%r15,%r1) + msg %r15, 0 diff --git a/test/MC/SystemZ/insn-msg-02.s b/test/MC/SystemZ/insn-msg-02.s new file mode 100644 index 000000000000..3326f40e56aa --- /dev/null +++ b/test/MC/SystemZ/insn-msg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: msg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: msg %r0, 524288 + + msg %r0, -524289 + msg %r0, 524288 diff --git a/test/MC/SystemZ/insn-msgf-01.s b/test/MC/SystemZ/insn-msgf-01.s new file mode 100644 index 000000000000..9812bcc9cb47 --- /dev/null +++ b/test/MC/SystemZ/insn-msgf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1c] +#CHECK: msgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1c] +#CHECK: msgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1c] +#CHECK: msgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x1c] +#CHECK: msgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x1c] +#CHECK: msgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x1c] +#CHECK: msgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x1c] +#CHECK: msgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x1c] +#CHECK: msgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x1c] +#CHECK: msgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x1c] + + msgf %r0, -524288 + msgf %r0, -1 + msgf %r0, 0 + msgf %r0, 1 + msgf %r0, 524287 + msgf %r0, 0(%r1) + msgf %r0, 0(%r15) + msgf %r0, 524287(%r1,%r15) + msgf %r0, 524287(%r15,%r1) + msgf %r15, 0 diff --git a/test/MC/SystemZ/insn-msgf-02.s b/test/MC/SystemZ/insn-msgf-02.s new file mode 100644 index 000000000000..03983b305f07 --- /dev/null +++ b/test/MC/SystemZ/insn-msgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: msgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: msgf %r0, 524288 + + msgf %r0, -524289 + msgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-msgfi-01.s b/test/MC/SystemZ/insn-msgfi-01.s new file mode 100644 index 000000000000..802ad143a503 --- /dev/null +++ b/test/MC/SystemZ/insn-msgfi-01.s @@ -0,0 +1,15 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msgfi %r0, -2147483648 # encoding: [0xc2,0x00,0x80,0x00,0x00,0x00] +#CHECK: msgfi %r0, -1 # encoding: [0xc2,0x00,0xff,0xff,0xff,0xff] +#CHECK: msgfi %r0, 0 # encoding: [0xc2,0x00,0x00,0x00,0x00,0x00] +#CHECK: msgfi %r0, 1 # encoding: [0xc2,0x00,0x00,0x00,0x00,0x01] +#CHECK: msgfi %r0, 2147483647 # encoding: [0xc2,0x00,0x7f,0xff,0xff,0xff] +#CHECK: msgfi %r15, 0 # encoding: [0xc2,0xf0,0x00,0x00,0x00,0x00] + + msgfi %r0, -1 << 31 + msgfi %r0, -1 + msgfi %r0, 0 + msgfi %r0, 1 + msgfi %r0, (1 << 31) - 1 + msgfi %r15, 0 diff --git a/test/MC/SystemZ/insn-msgfi-02.s b/test/MC/SystemZ/insn-msgfi-02.s new file mode 100644 index 000000000000..82e1f8f9b44c --- /dev/null +++ b/test/MC/SystemZ/insn-msgfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: msgfi %r0, (-1 << 31) - 1 +#CHECK: error: invalid operand +#CHECK: msgfi %r0, (1 << 31) + + msgfi %r0, (-1 << 31) - 1 + msgfi %r0, (1 << 31) diff --git a/test/MC/SystemZ/insn-msgfr-01.s b/test/MC/SystemZ/insn-msgfr-01.s new file mode 100644 index 000000000000..e25f6302ac62 --- /dev/null +++ b/test/MC/SystemZ/insn-msgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msgfr %r0, %r0 # encoding: [0xb9,0x1c,0x00,0x00] +#CHECK: msgfr %r0, %r15 # encoding: [0xb9,0x1c,0x00,0x0f] +#CHECK: msgfr %r15, %r0 # encoding: [0xb9,0x1c,0x00,0xf0] +#CHECK: msgfr %r7, %r8 # encoding: [0xb9,0x1c,0x00,0x78] + + msgfr %r0,%r0 + msgfr %r0,%r15 + msgfr %r15,%r0 + msgfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-msgr-01.s b/test/MC/SystemZ/insn-msgr-01.s new file mode 100644 index 000000000000..0b9cd360c8fe --- /dev/null +++ b/test/MC/SystemZ/insn-msgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msgr %r0, %r0 # encoding: [0xb9,0x0c,0x00,0x00] +#CHECK: msgr %r0, %r15 # encoding: [0xb9,0x0c,0x00,0x0f] +#CHECK: msgr %r15, %r0 # encoding: [0xb9,0x0c,0x00,0xf0] +#CHECK: msgr %r7, %r8 # encoding: [0xb9,0x0c,0x00,0x78] + + msgr %r0,%r0 + msgr %r0,%r15 + msgr %r15,%r0 + msgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-msr-01.s b/test/MC/SystemZ/insn-msr-01.s new file mode 100644 index 000000000000..6f7d917a16ce --- /dev/null +++ b/test/MC/SystemZ/insn-msr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msr %r0, %r0 # encoding: [0xb2,0x52,0x00,0x00] +#CHECK: msr %r0, %r15 # encoding: [0xb2,0x52,0x00,0x0f] +#CHECK: msr %r15, %r0 # encoding: [0xb2,0x52,0x00,0xf0] +#CHECK: msr %r7, %r8 # encoding: [0xb2,0x52,0x00,0x78] + + msr %r0,%r0 + msr %r0,%r15 + msr %r15,%r0 + msr %r7,%r8 diff --git a/test/MC/SystemZ/insn-msy-01.s b/test/MC/SystemZ/insn-msy-01.s new file mode 100644 index 000000000000..aed9318a8a56 --- /dev/null +++ b/test/MC/SystemZ/insn-msy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: msy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x51] +#CHECK: msy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x51] +#CHECK: msy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x51] +#CHECK: msy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x51] +#CHECK: msy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x51] +#CHECK: msy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x51] +#CHECK: msy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x51] +#CHECK: msy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x51] +#CHECK: msy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x51] +#CHECK: msy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x51] + + msy %r0, -524288 + msy %r0, -1 + msy %r0, 0 + msy %r0, 1 + msy %r0, 524287 + msy %r0, 0(%r1) + msy %r0, 0(%r15) + msy %r0, 524287(%r1,%r15) + msy %r0, 524287(%r15,%r1) + msy %r15, 0 diff --git a/test/MC/SystemZ/insn-msy-02.s b/test/MC/SystemZ/insn-msy-02.s new file mode 100644 index 000000000000..6f10069ae704 --- /dev/null +++ b/test/MC/SystemZ/insn-msy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: msy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: msy %r0, 524288 + + msy %r0, -524289 + msy %r0, 524288 diff --git a/test/MC/SystemZ/insn-mvghi-01.s b/test/MC/SystemZ/insn-mvghi-01.s new file mode 100644 index 000000000000..191aa49cd854 --- /dev/null +++ b/test/MC/SystemZ/insn-mvghi-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mvghi 0, 0 # encoding: [0xe5,0x48,0x00,0x00,0x00,0x00] +#CHECK: mvghi 4095, 0 # encoding: [0xe5,0x48,0x0f,0xff,0x00,0x00] +#CHECK: mvghi 0, -32768 # encoding: [0xe5,0x48,0x00,0x00,0x80,0x00] +#CHECK: mvghi 0, -1 # encoding: [0xe5,0x48,0x00,0x00,0xff,0xff] +#CHECK: mvghi 0, 0 # encoding: [0xe5,0x48,0x00,0x00,0x00,0x00] +#CHECK: mvghi 0, 1 # encoding: [0xe5,0x48,0x00,0x00,0x00,0x01] +#CHECK: mvghi 0, 32767 # encoding: [0xe5,0x48,0x00,0x00,0x7f,0xff] +#CHECK: mvghi 0(%r1), 42 # encoding: [0xe5,0x48,0x10,0x00,0x00,0x2a] +#CHECK: mvghi 0(%r15), 42 # encoding: [0xe5,0x48,0xf0,0x00,0x00,0x2a] +#CHECK: mvghi 4095(%r1), 42 # encoding: [0xe5,0x48,0x1f,0xff,0x00,0x2a] +#CHECK: mvghi 4095(%r15), 42 # encoding: [0xe5,0x48,0xff,0xff,0x00,0x2a] + + mvghi 0, 0 + mvghi 4095, 0 + mvghi 0, -32768 + mvghi 0, -1 + mvghi 0, 0 + mvghi 0, 1 + mvghi 0, 32767 + mvghi 0(%r1), 42 + mvghi 0(%r15), 42 + mvghi 4095(%r1), 42 + mvghi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-mvghi-02.s b/test/MC/SystemZ/insn-mvghi-02.s new file mode 100644 index 000000000000..38b38a517a0b --- /dev/null +++ b/test/MC/SystemZ/insn-mvghi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mvghi -1, 0 +#CHECK: error: invalid operand +#CHECK: mvghi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: mvghi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: mvghi 0, -32769 +#CHECK: error: invalid operand +#CHECK: mvghi 0, 32768 + + mvghi -1, 0 + mvghi 4096, 0 + mvghi 0(%r1,%r2), 0 + mvghi 0, -32769 + mvghi 0, 32768 diff --git a/test/MC/SystemZ/insn-mvhhi-01.s b/test/MC/SystemZ/insn-mvhhi-01.s new file mode 100644 index 000000000000..63574a487f93 --- /dev/null +++ b/test/MC/SystemZ/insn-mvhhi-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mvhhi 0, 0 # encoding: [0xe5,0x44,0x00,0x00,0x00,0x00] +#CHECK: mvhhi 4095, 0 # encoding: [0xe5,0x44,0x0f,0xff,0x00,0x00] +#CHECK: mvhhi 0, -32768 # encoding: [0xe5,0x44,0x00,0x00,0x80,0x00] +#CHECK: mvhhi 0, -1 # encoding: [0xe5,0x44,0x00,0x00,0xff,0xff] +#CHECK: mvhhi 0, 0 # encoding: [0xe5,0x44,0x00,0x00,0x00,0x00] +#CHECK: mvhhi 0, 1 # encoding: [0xe5,0x44,0x00,0x00,0x00,0x01] +#CHECK: mvhhi 0, 32767 # encoding: [0xe5,0x44,0x00,0x00,0x7f,0xff] +#CHECK: mvhhi 0(%r1), 42 # encoding: [0xe5,0x44,0x10,0x00,0x00,0x2a] +#CHECK: mvhhi 0(%r15), 42 # encoding: [0xe5,0x44,0xf0,0x00,0x00,0x2a] +#CHECK: mvhhi 4095(%r1), 42 # encoding: [0xe5,0x44,0x1f,0xff,0x00,0x2a] +#CHECK: mvhhi 4095(%r15), 42 # encoding: [0xe5,0x44,0xff,0xff,0x00,0x2a] + + mvhhi 0, 0 + mvhhi 4095, 0 + mvhhi 0, -32768 + mvhhi 0, -1 + mvhhi 0, 0 + mvhhi 0, 1 + mvhhi 0, 32767 + mvhhi 0(%r1), 42 + mvhhi 0(%r15), 42 + mvhhi 4095(%r1), 42 + mvhhi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-mvhhi-02.s b/test/MC/SystemZ/insn-mvhhi-02.s new file mode 100644 index 000000000000..58abb025ebd6 --- /dev/null +++ b/test/MC/SystemZ/insn-mvhhi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mvhhi -1, 0 +#CHECK: error: invalid operand +#CHECK: mvhhi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: mvhhi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: mvhhi 0, -32769 +#CHECK: error: invalid operand +#CHECK: mvhhi 0, 32768 + + mvhhi -1, 0 + mvhhi 4096, 0 + mvhhi 0(%r1,%r2), 0 + mvhhi 0, -32769 + mvhhi 0, 32768 diff --git a/test/MC/SystemZ/insn-mvhi-01.s b/test/MC/SystemZ/insn-mvhi-01.s new file mode 100644 index 000000000000..5bf9fd312167 --- /dev/null +++ b/test/MC/SystemZ/insn-mvhi-01.s @@ -0,0 +1,25 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mvhi 0, 0 # encoding: [0xe5,0x4c,0x00,0x00,0x00,0x00] +#CHECK: mvhi 4095, 0 # encoding: [0xe5,0x4c,0x0f,0xff,0x00,0x00] +#CHECK: mvhi 0, -32768 # encoding: [0xe5,0x4c,0x00,0x00,0x80,0x00] +#CHECK: mvhi 0, -1 # encoding: [0xe5,0x4c,0x00,0x00,0xff,0xff] +#CHECK: mvhi 0, 0 # encoding: [0xe5,0x4c,0x00,0x00,0x00,0x00] +#CHECK: mvhi 0, 1 # encoding: [0xe5,0x4c,0x00,0x00,0x00,0x01] +#CHECK: mvhi 0, 32767 # encoding: [0xe5,0x4c,0x00,0x00,0x7f,0xff] +#CHECK: mvhi 0(%r1), 42 # encoding: [0xe5,0x4c,0x10,0x00,0x00,0x2a] +#CHECK: mvhi 0(%r15), 42 # encoding: [0xe5,0x4c,0xf0,0x00,0x00,0x2a] +#CHECK: mvhi 4095(%r1), 42 # encoding: [0xe5,0x4c,0x1f,0xff,0x00,0x2a] +#CHECK: mvhi 4095(%r15), 42 # encoding: [0xe5,0x4c,0xff,0xff,0x00,0x2a] + + mvhi 0, 0 + mvhi 4095, 0 + mvhi 0, -32768 + mvhi 0, -1 + mvhi 0, 0 + mvhi 0, 1 + mvhi 0, 32767 + mvhi 0(%r1), 42 + mvhi 0(%r15), 42 + mvhi 4095(%r1), 42 + mvhi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-mvhi-02.s b/test/MC/SystemZ/insn-mvhi-02.s new file mode 100644 index 000000000000..517301c51356 --- /dev/null +++ b/test/MC/SystemZ/insn-mvhi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mvhi -1, 0 +#CHECK: error: invalid operand +#CHECK: mvhi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: mvhi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: mvhi 0, -32769 +#CHECK: error: invalid operand +#CHECK: mvhi 0, 32768 + + mvhi -1, 0 + mvhi 4096, 0 + mvhi 0(%r1,%r2), 0 + mvhi 0, -32769 + mvhi 0, 32768 diff --git a/test/MC/SystemZ/insn-mvi-01.s b/test/MC/SystemZ/insn-mvi-01.s new file mode 100644 index 000000000000..83e30900ac3a --- /dev/null +++ b/test/MC/SystemZ/insn-mvi-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mvi 0, 0 # encoding: [0x92,0x00,0x00,0x00] +#CHECK: mvi 4095, 0 # encoding: [0x92,0x00,0x0f,0xff] +#CHECK: mvi 0, 255 # encoding: [0x92,0xff,0x00,0x00] +#CHECK: mvi 0(%r1), 42 # encoding: [0x92,0x2a,0x10,0x00] +#CHECK: mvi 0(%r15), 42 # encoding: [0x92,0x2a,0xf0,0x00] +#CHECK: mvi 4095(%r1), 42 # encoding: [0x92,0x2a,0x1f,0xff] +#CHECK: mvi 4095(%r15), 42 # encoding: [0x92,0x2a,0xff,0xff] + + mvi 0, 0 + mvi 4095, 0 + mvi 0, 255 + mvi 0(%r1), 42 + mvi 0(%r15), 42 + mvi 4095(%r1), 42 + mvi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-mvi-02.s b/test/MC/SystemZ/insn-mvi-02.s new file mode 100644 index 000000000000..ddd5909d459c --- /dev/null +++ b/test/MC/SystemZ/insn-mvi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mvi -1, 0 +#CHECK: error: invalid operand +#CHECK: mvi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: mvi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: mvi 0, -1 +#CHECK: error: invalid operand +#CHECK: mvi 0, 256 + + mvi -1, 0 + mvi 4096, 0 + mvi 0(%r1,%r2), 0 + mvi 0, -1 + mvi 0, 256 diff --git a/test/MC/SystemZ/insn-mviy-01.s b/test/MC/SystemZ/insn-mviy-01.s new file mode 100644 index 000000000000..8bd6979b81ee --- /dev/null +++ b/test/MC/SystemZ/insn-mviy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mviy -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x52] +#CHECK: mviy -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x52] +#CHECK: mviy 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x52] +#CHECK: mviy 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x52] +#CHECK: mviy 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x52] +#CHECK: mviy 0, 255 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x52] +#CHECK: mviy 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x52] +#CHECK: mviy 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x52] +#CHECK: mviy 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x52] +#CHECK: mviy 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x52] + + mviy -524288, 0 + mviy -1, 0 + mviy 0, 0 + mviy 1, 0 + mviy 524287, 0 + mviy 0, 255 + mviy 0(%r1), 42 + mviy 0(%r15), 42 + mviy 524287(%r1), 42 + mviy 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-mviy-02.s b/test/MC/SystemZ/insn-mviy-02.s new file mode 100644 index 000000000000..ab78dab5c971 --- /dev/null +++ b/test/MC/SystemZ/insn-mviy-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: mviy -524289, 0 +#CHECK: error: invalid operand +#CHECK: mviy 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: mviy 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: mviy 0, -1 +#CHECK: error: invalid operand +#CHECK: mviy 0, 256 + + mviy -524289, 0 + mviy 524288, 0 + mviy 0(%r1,%r2), 0 + mviy 0, -1 + mviy 0, 256 diff --git a/test/MC/SystemZ/insn-mxbr-01.s b/test/MC/SystemZ/insn-mxbr-01.s new file mode 100644 index 000000000000..60c8ebadfba3 --- /dev/null +++ b/test/MC/SystemZ/insn-mxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mxbr %f0, %f0 # encoding: [0xb3,0x4c,0x00,0x00] +#CHECK: mxbr %f0, %f13 # encoding: [0xb3,0x4c,0x00,0x0d] +#CHECK: mxbr %f8, %f5 # encoding: [0xb3,0x4c,0x00,0x85] +#CHECK: mxbr %f13, %f13 # encoding: [0xb3,0x4c,0x00,0xdd] + + mxbr %f0, %f0 + mxbr %f0, %f13 + mxbr %f8, %f5 + mxbr %f13, %f13 diff --git a/test/MC/SystemZ/insn-mxbr-02.s b/test/MC/SystemZ/insn-mxbr-02.s new file mode 100644 index 000000000000..92820234139a --- /dev/null +++ b/test/MC/SystemZ/insn-mxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: mxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: mxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: mxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: mxbr %f14, %f0 + + mxbr %f0, %f2 + mxbr %f0, %f14 + mxbr %f2, %f0 + mxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-mxdb-01.s b/test/MC/SystemZ/insn-mxdb-01.s new file mode 100644 index 000000000000..46a723e8426f --- /dev/null +++ b/test/MC/SystemZ/insn-mxdb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mxdb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x07] +#CHECK: mxdb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x07] +#CHECK: mxdb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x07] +#CHECK: mxdb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x07] +#CHECK: mxdb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x07] +#CHECK: mxdb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x07] +#CHECK: mxdb %f13, 0 # encoding: [0xed,0xd0,0x00,0x00,0x00,0x07] + + mxdb %f0, 0 + mxdb %f0, 4095 + mxdb %f0, 0(%r1) + mxdb %f0, 0(%r15) + mxdb %f0, 4095(%r1,%r15) + mxdb %f0, 4095(%r15,%r1) + mxdb %f13, 0 diff --git a/test/MC/SystemZ/insn-mxdb-02.s b/test/MC/SystemZ/insn-mxdb-02.s new file mode 100644 index 000000000000..44c821cad039 --- /dev/null +++ b/test/MC/SystemZ/insn-mxdb-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: mxdb %f2, 0 +#CHECK: error: invalid register +#CHECK: mxdb %f15, 0 +#CHECK: error: invalid operand +#CHECK: mxdb %f0, -1 +#CHECK: error: invalid operand +#CHECK: mxdb %f0, 4096 + + mxdb %f2, 0 + mxdb %f15, 0 + mxdb %f0, -1 + mxdb %f0, 4096 diff --git a/test/MC/SystemZ/insn-mxdbr-01.s b/test/MC/SystemZ/insn-mxdbr-01.s new file mode 100644 index 000000000000..dfb898fbdaf6 --- /dev/null +++ b/test/MC/SystemZ/insn-mxdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: mxdbr %f0, %f0 # encoding: [0xb3,0x07,0x00,0x00] +#CHECK: mxdbr %f0, %f15 # encoding: [0xb3,0x07,0x00,0x0f] +#CHECK: mxdbr %f8, %f8 # encoding: [0xb3,0x07,0x00,0x88] +#CHECK: mxdbr %f13, %f0 # encoding: [0xb3,0x07,0x00,0xd0] + + mxdbr %f0, %f0 + mxdbr %f0, %f15 + mxdbr %f8, %f8 + mxdbr %f13, %f0 diff --git a/test/MC/SystemZ/insn-mxdbr-02.s b/test/MC/SystemZ/insn-mxdbr-02.s new file mode 100644 index 000000000000..90260481f2a7 --- /dev/null +++ b/test/MC/SystemZ/insn-mxdbr-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: mxdbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: mxdbr %f15, %f0 + + mxdbr %f2, %f0 + mxdbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-n-01.s b/test/MC/SystemZ/insn-n-01.s new file mode 100644 index 000000000000..75fa141e2c86 --- /dev/null +++ b/test/MC/SystemZ/insn-n-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: n %r0, 0 # encoding: [0x54,0x00,0x00,0x00] +#CHECK: n %r0, 4095 # encoding: [0x54,0x00,0x0f,0xff] +#CHECK: n %r0, 0(%r1) # encoding: [0x54,0x00,0x10,0x00] +#CHECK: n %r0, 0(%r15) # encoding: [0x54,0x00,0xf0,0x00] +#CHECK: n %r0, 4095(%r1,%r15) # encoding: [0x54,0x01,0xff,0xff] +#CHECK: n %r0, 4095(%r15,%r1) # encoding: [0x54,0x0f,0x1f,0xff] +#CHECK: n %r15, 0 # encoding: [0x54,0xf0,0x00,0x00] + + n %r0, 0 + n %r0, 4095 + n %r0, 0(%r1) + n %r0, 0(%r15) + n %r0, 4095(%r1,%r15) + n %r0, 4095(%r15,%r1) + n %r15, 0 diff --git a/test/MC/SystemZ/insn-n-02.s b/test/MC/SystemZ/insn-n-02.s new file mode 100644 index 000000000000..7c14b1fe1c0e --- /dev/null +++ b/test/MC/SystemZ/insn-n-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: n %r0, -1 +#CHECK: error: invalid operand +#CHECK: n %r0, 4096 + + n %r0, -1 + n %r0, 4096 diff --git a/test/MC/SystemZ/insn-ng-01.s b/test/MC/SystemZ/insn-ng-01.s new file mode 100644 index 000000000000..bf71a2183f45 --- /dev/null +++ b/test/MC/SystemZ/insn-ng-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ng %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x80] +#CHECK: ng %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x80] +#CHECK: ng %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x80] +#CHECK: ng %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x80] +#CHECK: ng %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x80] +#CHECK: ng %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x80] +#CHECK: ng %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x80] +#CHECK: ng %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x80] +#CHECK: ng %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x80] +#CHECK: ng %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x80] + + ng %r0, -524288 + ng %r0, -1 + ng %r0, 0 + ng %r0, 1 + ng %r0, 524287 + ng %r0, 0(%r1) + ng %r0, 0(%r15) + ng %r0, 524287(%r1,%r15) + ng %r0, 524287(%r15,%r1) + ng %r15, 0 diff --git a/test/MC/SystemZ/insn-ng-02.s b/test/MC/SystemZ/insn-ng-02.s new file mode 100644 index 000000000000..a6f326052683 --- /dev/null +++ b/test/MC/SystemZ/insn-ng-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ng %r0, -524289 +#CHECK: error: invalid operand +#CHECK: ng %r0, 524288 + + ng %r0, -524289 + ng %r0, 524288 diff --git a/test/MC/SystemZ/insn-ngr-01.s b/test/MC/SystemZ/insn-ngr-01.s new file mode 100644 index 000000000000..714b9fa71292 --- /dev/null +++ b/test/MC/SystemZ/insn-ngr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ngr %r0, %r0 # encoding: [0xb9,0x80,0x00,0x00] +#CHECK: ngr %r0, %r15 # encoding: [0xb9,0x80,0x00,0x0f] +#CHECK: ngr %r15, %r0 # encoding: [0xb9,0x80,0x00,0xf0] +#CHECK: ngr %r7, %r8 # encoding: [0xb9,0x80,0x00,0x78] + + ngr %r0,%r0 + ngr %r0,%r15 + ngr %r15,%r0 + ngr %r7,%r8 diff --git a/test/MC/SystemZ/insn-ni-01.s b/test/MC/SystemZ/insn-ni-01.s new file mode 100644 index 000000000000..d075674feaa3 --- /dev/null +++ b/test/MC/SystemZ/insn-ni-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ni 0, 0 # encoding: [0x94,0x00,0x00,0x00] +#CHECK: ni 4095, 0 # encoding: [0x94,0x00,0x0f,0xff] +#CHECK: ni 0, 255 # encoding: [0x94,0xff,0x00,0x00] +#CHECK: ni 0(%r1), 42 # encoding: [0x94,0x2a,0x10,0x00] +#CHECK: ni 0(%r15), 42 # encoding: [0x94,0x2a,0xf0,0x00] +#CHECK: ni 4095(%r1), 42 # encoding: [0x94,0x2a,0x1f,0xff] +#CHECK: ni 4095(%r15), 42 # encoding: [0x94,0x2a,0xff,0xff] + + ni 0, 0 + ni 4095, 0 + ni 0, 255 + ni 0(%r1), 42 + ni 0(%r15), 42 + ni 4095(%r1), 42 + ni 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-ni-02.s b/test/MC/SystemZ/insn-ni-02.s new file mode 100644 index 000000000000..1b9a6a748de2 --- /dev/null +++ b/test/MC/SystemZ/insn-ni-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ni -1, 0 +#CHECK: error: invalid operand +#CHECK: ni 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: ni 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: ni 0, -1 +#CHECK: error: invalid operand +#CHECK: ni 0, 256 + + ni -1, 0 + ni 4096, 0 + ni 0(%r1,%r2), 0 + ni 0, -1 + ni 0, 256 diff --git a/test/MC/SystemZ/insn-nihf-01.s b/test/MC/SystemZ/insn-nihf-01.s new file mode 100644 index 000000000000..dceb8d1297c2 --- /dev/null +++ b/test/MC/SystemZ/insn-nihf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nihf %r0, 0 # encoding: [0xc0,0x0a,0x00,0x00,0x00,0x00] +#CHECK: nihf %r0, 4294967295 # encoding: [0xc0,0x0a,0xff,0xff,0xff,0xff] +#CHECK: nihf %r15, 0 # encoding: [0xc0,0xfa,0x00,0x00,0x00,0x00] + + nihf %r0, 0 + nihf %r0, 0xffffffff + nihf %r15, 0 diff --git a/test/MC/SystemZ/insn-nihf-02.s b/test/MC/SystemZ/insn-nihf-02.s new file mode 100644 index 000000000000..5f7f10a6b3f0 --- /dev/null +++ b/test/MC/SystemZ/insn-nihf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: nihf %r0, -1 +#CHECK: error: invalid operand +#CHECK: nihf %r0, 1 << 32 + + nihf %r0, -1 + nihf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-nihh-01.s b/test/MC/SystemZ/insn-nihh-01.s new file mode 100644 index 000000000000..a87540d04c08 --- /dev/null +++ b/test/MC/SystemZ/insn-nihh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nihh %r0, 0 # encoding: [0xa5,0x04,0x00,0x00] +#CHECK: nihh %r0, 32768 # encoding: [0xa5,0x04,0x80,0x00] +#CHECK: nihh %r0, 65535 # encoding: [0xa5,0x04,0xff,0xff] +#CHECK: nihh %r15, 0 # encoding: [0xa5,0xf4,0x00,0x00] + + nihh %r0, 0 + nihh %r0, 0x8000 + nihh %r0, 0xffff + nihh %r15, 0 diff --git a/test/MC/SystemZ/insn-nihh-02.s b/test/MC/SystemZ/insn-nihh-02.s new file mode 100644 index 000000000000..3df88e40a281 --- /dev/null +++ b/test/MC/SystemZ/insn-nihh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: nihh %r0, -1 +#CHECK: error: invalid operand +#CHECK: nihh %r0, 0x10000 + + nihh %r0, -1 + nihh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-nihl-01.s b/test/MC/SystemZ/insn-nihl-01.s new file mode 100644 index 000000000000..6eab58c7e7bf --- /dev/null +++ b/test/MC/SystemZ/insn-nihl-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nihl %r0, 0 # encoding: [0xa5,0x05,0x00,0x00] +#CHECK: nihl %r0, 32768 # encoding: [0xa5,0x05,0x80,0x00] +#CHECK: nihl %r0, 65535 # encoding: [0xa5,0x05,0xff,0xff] +#CHECK: nihl %r15, 0 # encoding: [0xa5,0xf5,0x00,0x00] + + nihl %r0, 0 + nihl %r0, 0x8000 + nihl %r0, 0xffff + nihl %r15, 0 diff --git a/test/MC/SystemZ/insn-nihl-02.s b/test/MC/SystemZ/insn-nihl-02.s new file mode 100644 index 000000000000..6e2d52f5a91a --- /dev/null +++ b/test/MC/SystemZ/insn-nihl-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: nihl %r0, -1 +#CHECK: error: invalid operand +#CHECK: nihl %r0, 0x10000 + + nihl %r0, -1 + nihl %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-nilf-01.s b/test/MC/SystemZ/insn-nilf-01.s new file mode 100644 index 000000000000..0b3a13e752cf --- /dev/null +++ b/test/MC/SystemZ/insn-nilf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nilf %r0, 0 # encoding: [0xc0,0x0b,0x00,0x00,0x00,0x00] +#CHECK: nilf %r0, 4294967295 # encoding: [0xc0,0x0b,0xff,0xff,0xff,0xff] +#CHECK: nilf %r15, 0 # encoding: [0xc0,0xfb,0x00,0x00,0x00,0x00] + + nilf %r0, 0 + nilf %r0, 0xffffffff + nilf %r15, 0 diff --git a/test/MC/SystemZ/insn-nilf-02.s b/test/MC/SystemZ/insn-nilf-02.s new file mode 100644 index 000000000000..87b65e46fe96 --- /dev/null +++ b/test/MC/SystemZ/insn-nilf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: nilf %r0, -1 +#CHECK: error: invalid operand +#CHECK: nilf %r0, 1 << 32 + + nilf %r0, -1 + nilf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-nilh-01.s b/test/MC/SystemZ/insn-nilh-01.s new file mode 100644 index 000000000000..4bc9353dd284 --- /dev/null +++ b/test/MC/SystemZ/insn-nilh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nilh %r0, 0 # encoding: [0xa5,0x06,0x00,0x00] +#CHECK: nilh %r0, 32768 # encoding: [0xa5,0x06,0x80,0x00] +#CHECK: nilh %r0, 65535 # encoding: [0xa5,0x06,0xff,0xff] +#CHECK: nilh %r15, 0 # encoding: [0xa5,0xf6,0x00,0x00] + + nilh %r0, 0 + nilh %r0, 0x8000 + nilh %r0, 0xffff + nilh %r15, 0 diff --git a/test/MC/SystemZ/insn-nilh-02.s b/test/MC/SystemZ/insn-nilh-02.s new file mode 100644 index 000000000000..ae5a852a6c69 --- /dev/null +++ b/test/MC/SystemZ/insn-nilh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: nilh %r0, -1 +#CHECK: error: invalid operand +#CHECK: nilh %r0, 0x10000 + + nilh %r0, -1 + nilh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-nill-01.s b/test/MC/SystemZ/insn-nill-01.s new file mode 100644 index 000000000000..5f4f87785bf3 --- /dev/null +++ b/test/MC/SystemZ/insn-nill-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nill %r0, 0 # encoding: [0xa5,0x07,0x00,0x00] +#CHECK: nill %r0, 32768 # encoding: [0xa5,0x07,0x80,0x00] +#CHECK: nill %r0, 65535 # encoding: [0xa5,0x07,0xff,0xff] +#CHECK: nill %r15, 0 # encoding: [0xa5,0xf7,0x00,0x00] + + nill %r0, 0 + nill %r0, 0x8000 + nill %r0, 0xffff + nill %r15, 0 diff --git a/test/MC/SystemZ/insn-nill-02.s b/test/MC/SystemZ/insn-nill-02.s new file mode 100644 index 000000000000..27fbc4a50658 --- /dev/null +++ b/test/MC/SystemZ/insn-nill-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: nill %r0, -1 +#CHECK: error: invalid operand +#CHECK: nill %r0, 0x10000 + + nill %r0, -1 + nill %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-niy-01.s b/test/MC/SystemZ/insn-niy-01.s new file mode 100644 index 000000000000..4c007e917295 --- /dev/null +++ b/test/MC/SystemZ/insn-niy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: niy -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x54] +#CHECK: niy -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x54] +#CHECK: niy 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x54] +#CHECK: niy 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x54] +#CHECK: niy 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x54] +#CHECK: niy 0, 255 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x54] +#CHECK: niy 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x54] +#CHECK: niy 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x54] +#CHECK: niy 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x54] +#CHECK: niy 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x54] + + niy -524288, 0 + niy -1, 0 + niy 0, 0 + niy 1, 0 + niy 524287, 0 + niy 0, 255 + niy 0(%r1), 42 + niy 0(%r15), 42 + niy 524287(%r1), 42 + niy 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-niy-02.s b/test/MC/SystemZ/insn-niy-02.s new file mode 100644 index 000000000000..ca398e6fca86 --- /dev/null +++ b/test/MC/SystemZ/insn-niy-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: niy -524289, 0 +#CHECK: error: invalid operand +#CHECK: niy 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: niy 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: niy 0, -1 +#CHECK: error: invalid operand +#CHECK: niy 0, 256 + + niy -524289, 0 + niy 524288, 0 + niy 0(%r1,%r2), 0 + niy 0, -1 + niy 0, 256 diff --git a/test/MC/SystemZ/insn-nr-01.s b/test/MC/SystemZ/insn-nr-01.s new file mode 100644 index 000000000000..c10216d68f41 --- /dev/null +++ b/test/MC/SystemZ/insn-nr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: nr %r0, %r0 # encoding: [0x14,0x00] +#CHECK: nr %r0, %r15 # encoding: [0x14,0x0f] +#CHECK: nr %r15, %r0 # encoding: [0x14,0xf0] +#CHECK: nr %r7, %r8 # encoding: [0x14,0x78] + + nr %r0,%r0 + nr %r0,%r15 + nr %r15,%r0 + nr %r7,%r8 diff --git a/test/MC/SystemZ/insn-ny-01.s b/test/MC/SystemZ/insn-ny-01.s new file mode 100644 index 000000000000..a12bb67e2b03 --- /dev/null +++ b/test/MC/SystemZ/insn-ny-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ny %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x54] +#CHECK: ny %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x54] +#CHECK: ny %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x54] +#CHECK: ny %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x54] +#CHECK: ny %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x54] +#CHECK: ny %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x54] +#CHECK: ny %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x54] +#CHECK: ny %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x54] +#CHECK: ny %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x54] +#CHECK: ny %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x54] + + ny %r0, -524288 + ny %r0, -1 + ny %r0, 0 + ny %r0, 1 + ny %r0, 524287 + ny %r0, 0(%r1) + ny %r0, 0(%r15) + ny %r0, 524287(%r1,%r15) + ny %r0, 524287(%r15,%r1) + ny %r15, 0 diff --git a/test/MC/SystemZ/insn-ny-02.s b/test/MC/SystemZ/insn-ny-02.s new file mode 100644 index 000000000000..5f53ebd3e114 --- /dev/null +++ b/test/MC/SystemZ/insn-ny-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ny %r0, -524289 +#CHECK: error: invalid operand +#CHECK: ny %r0, 524288 + + ny %r0, -524289 + ny %r0, 524288 diff --git a/test/MC/SystemZ/insn-o-01.s b/test/MC/SystemZ/insn-o-01.s new file mode 100644 index 000000000000..0c74e9ccc6dc --- /dev/null +++ b/test/MC/SystemZ/insn-o-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: o %r0, 0 # encoding: [0x56,0x00,0x00,0x00] +#CHECK: o %r0, 4095 # encoding: [0x56,0x00,0x0f,0xff] +#CHECK: o %r0, 0(%r1) # encoding: [0x56,0x00,0x10,0x00] +#CHECK: o %r0, 0(%r15) # encoding: [0x56,0x00,0xf0,0x00] +#CHECK: o %r0, 4095(%r1,%r15) # encoding: [0x56,0x01,0xff,0xff] +#CHECK: o %r0, 4095(%r15,%r1) # encoding: [0x56,0x0f,0x1f,0xff] +#CHECK: o %r15, 0 # encoding: [0x56,0xf0,0x00,0x00] + + o %r0, 0 + o %r0, 4095 + o %r0, 0(%r1) + o %r0, 0(%r15) + o %r0, 4095(%r1,%r15) + o %r0, 4095(%r15,%r1) + o %r15, 0 diff --git a/test/MC/SystemZ/insn-o-02.s b/test/MC/SystemZ/insn-o-02.s new file mode 100644 index 000000000000..34b741803b42 --- /dev/null +++ b/test/MC/SystemZ/insn-o-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: o %r0, -1 +#CHECK: error: invalid operand +#CHECK: o %r0, 4096 + + o %r0, -1 + o %r0, 4096 diff --git a/test/MC/SystemZ/insn-og-01.s b/test/MC/SystemZ/insn-og-01.s new file mode 100644 index 000000000000..3c9811b008a6 --- /dev/null +++ b/test/MC/SystemZ/insn-og-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: og %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x81] +#CHECK: og %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x81] +#CHECK: og %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x81] +#CHECK: og %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x81] +#CHECK: og %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x81] +#CHECK: og %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x81] +#CHECK: og %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x81] +#CHECK: og %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x81] +#CHECK: og %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x81] +#CHECK: og %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x81] + + og %r0, -524288 + og %r0, -1 + og %r0, 0 + og %r0, 1 + og %r0, 524287 + og %r0, 0(%r1) + og %r0, 0(%r15) + og %r0, 524287(%r1,%r15) + og %r0, 524287(%r15,%r1) + og %r15, 0 diff --git a/test/MC/SystemZ/insn-og-02.s b/test/MC/SystemZ/insn-og-02.s new file mode 100644 index 000000000000..7f4e45328be7 --- /dev/null +++ b/test/MC/SystemZ/insn-og-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: og %r0, -524289 +#CHECK: error: invalid operand +#CHECK: og %r0, 524288 + + og %r0, -524289 + og %r0, 524288 diff --git a/test/MC/SystemZ/insn-ogr-01.s b/test/MC/SystemZ/insn-ogr-01.s new file mode 100644 index 000000000000..25ba913ac557 --- /dev/null +++ b/test/MC/SystemZ/insn-ogr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ogr %r0, %r0 # encoding: [0xb9,0x81,0x00,0x00] +#CHECK: ogr %r0, %r15 # encoding: [0xb9,0x81,0x00,0x0f] +#CHECK: ogr %r15, %r0 # encoding: [0xb9,0x81,0x00,0xf0] +#CHECK: ogr %r7, %r8 # encoding: [0xb9,0x81,0x00,0x78] + + ogr %r0,%r0 + ogr %r0,%r15 + ogr %r15,%r0 + ogr %r7,%r8 diff --git a/test/MC/SystemZ/insn-oi-01.s b/test/MC/SystemZ/insn-oi-01.s new file mode 100644 index 000000000000..5d52fd2500bd --- /dev/null +++ b/test/MC/SystemZ/insn-oi-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oi 0, 0 # encoding: [0x96,0x00,0x00,0x00] +#CHECK: oi 4095, 0 # encoding: [0x96,0x00,0x0f,0xff] +#CHECK: oi 0, 255 # encoding: [0x96,0xff,0x00,0x00] +#CHECK: oi 0(%r1), 42 # encoding: [0x96,0x2a,0x10,0x00] +#CHECK: oi 0(%r15), 42 # encoding: [0x96,0x2a,0xf0,0x00] +#CHECK: oi 4095(%r1), 42 # encoding: [0x96,0x2a,0x1f,0xff] +#CHECK: oi 4095(%r15), 42 # encoding: [0x96,0x2a,0xff,0xff] + + oi 0, 0 + oi 4095, 0 + oi 0, 255 + oi 0(%r1), 42 + oi 0(%r15), 42 + oi 4095(%r1), 42 + oi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-oi-02.s b/test/MC/SystemZ/insn-oi-02.s new file mode 100644 index 000000000000..330a290aa365 --- /dev/null +++ b/test/MC/SystemZ/insn-oi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oi -1, 0 +#CHECK: error: invalid operand +#CHECK: oi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: oi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: oi 0, -1 +#CHECK: error: invalid operand +#CHECK: oi 0, 256 + + oi -1, 0 + oi 4096, 0 + oi 0(%r1,%r2), 0 + oi 0, -1 + oi 0, 256 diff --git a/test/MC/SystemZ/insn-oihf-01.s b/test/MC/SystemZ/insn-oihf-01.s new file mode 100644 index 000000000000..627820d31dcb --- /dev/null +++ b/test/MC/SystemZ/insn-oihf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oihf %r0, 0 # encoding: [0xc0,0x0c,0x00,0x00,0x00,0x00] +#CHECK: oihf %r0, 4294967295 # encoding: [0xc0,0x0c,0xff,0xff,0xff,0xff] +#CHECK: oihf %r15, 0 # encoding: [0xc0,0xfc,0x00,0x00,0x00,0x00] + + oihf %r0, 0 + oihf %r0, 0xffffffff + oihf %r15, 0 diff --git a/test/MC/SystemZ/insn-oihf-02.s b/test/MC/SystemZ/insn-oihf-02.s new file mode 100644 index 000000000000..a944cb013cd4 --- /dev/null +++ b/test/MC/SystemZ/insn-oihf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oihf %r0, -1 +#CHECK: error: invalid operand +#CHECK: oihf %r0, 1 << 32 + + oihf %r0, -1 + oihf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-oihh-01.s b/test/MC/SystemZ/insn-oihh-01.s new file mode 100644 index 000000000000..f62f61f03f88 --- /dev/null +++ b/test/MC/SystemZ/insn-oihh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oihh %r0, 0 # encoding: [0xa5,0x08,0x00,0x00] +#CHECK: oihh %r0, 32768 # encoding: [0xa5,0x08,0x80,0x00] +#CHECK: oihh %r0, 65535 # encoding: [0xa5,0x08,0xff,0xff] +#CHECK: oihh %r15, 0 # encoding: [0xa5,0xf8,0x00,0x00] + + oihh %r0, 0 + oihh %r0, 0x8000 + oihh %r0, 0xffff + oihh %r15, 0 diff --git a/test/MC/SystemZ/insn-oihh-02.s b/test/MC/SystemZ/insn-oihh-02.s new file mode 100644 index 000000000000..6bf7e237e039 --- /dev/null +++ b/test/MC/SystemZ/insn-oihh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oihh %r0, -1 +#CHECK: error: invalid operand +#CHECK: oihh %r0, 0x10000 + + oihh %r0, -1 + oihh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-oihl-01.s b/test/MC/SystemZ/insn-oihl-01.s new file mode 100644 index 000000000000..437b15c39c17 --- /dev/null +++ b/test/MC/SystemZ/insn-oihl-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oihl %r0, 0 # encoding: [0xa5,0x09,0x00,0x00] +#CHECK: oihl %r0, 32768 # encoding: [0xa5,0x09,0x80,0x00] +#CHECK: oihl %r0, 65535 # encoding: [0xa5,0x09,0xff,0xff] +#CHECK: oihl %r15, 0 # encoding: [0xa5,0xf9,0x00,0x00] + + oihl %r0, 0 + oihl %r0, 0x8000 + oihl %r0, 0xffff + oihl %r15, 0 diff --git a/test/MC/SystemZ/insn-oihl-02.s b/test/MC/SystemZ/insn-oihl-02.s new file mode 100644 index 000000000000..f4f7a59b774c --- /dev/null +++ b/test/MC/SystemZ/insn-oihl-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oihl %r0, -1 +#CHECK: error: invalid operand +#CHECK: oihl %r0, 0x10000 + + oihl %r0, -1 + oihl %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-oilf-01.s b/test/MC/SystemZ/insn-oilf-01.s new file mode 100644 index 000000000000..6f0c0717bd0e --- /dev/null +++ b/test/MC/SystemZ/insn-oilf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oilf %r0, 0 # encoding: [0xc0,0x0d,0x00,0x00,0x00,0x00] +#CHECK: oilf %r0, 4294967295 # encoding: [0xc0,0x0d,0xff,0xff,0xff,0xff] +#CHECK: oilf %r15, 0 # encoding: [0xc0,0xfd,0x00,0x00,0x00,0x00] + + oilf %r0, 0 + oilf %r0, 0xffffffff + oilf %r15, 0 diff --git a/test/MC/SystemZ/insn-oilf-02.s b/test/MC/SystemZ/insn-oilf-02.s new file mode 100644 index 000000000000..5501724d54c1 --- /dev/null +++ b/test/MC/SystemZ/insn-oilf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oilf %r0, -1 +#CHECK: error: invalid operand +#CHECK: oilf %r0, 1 << 32 + + oilf %r0, -1 + oilf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-oilh-01.s b/test/MC/SystemZ/insn-oilh-01.s new file mode 100644 index 000000000000..0140500e340f --- /dev/null +++ b/test/MC/SystemZ/insn-oilh-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oilh %r0, 0 # encoding: [0xa5,0x0a,0x00,0x00] +#CHECK: oilh %r0, 32768 # encoding: [0xa5,0x0a,0x80,0x00] +#CHECK: oilh %r0, 65535 # encoding: [0xa5,0x0a,0xff,0xff] +#CHECK: oilh %r15, 0 # encoding: [0xa5,0xfa,0x00,0x00] + + oilh %r0, 0 + oilh %r0, 0x8000 + oilh %r0, 0xffff + oilh %r15, 0 diff --git a/test/MC/SystemZ/insn-oilh-02.s b/test/MC/SystemZ/insn-oilh-02.s new file mode 100644 index 000000000000..d2f180d6abd3 --- /dev/null +++ b/test/MC/SystemZ/insn-oilh-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oilh %r0, -1 +#CHECK: error: invalid operand +#CHECK: oilh %r0, 0x10000 + + oilh %r0, -1 + oilh %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-oill-01.s b/test/MC/SystemZ/insn-oill-01.s new file mode 100644 index 000000000000..ef95d2d90f52 --- /dev/null +++ b/test/MC/SystemZ/insn-oill-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oill %r0, 0 # encoding: [0xa5,0x0b,0x00,0x00] +#CHECK: oill %r0, 32768 # encoding: [0xa5,0x0b,0x80,0x00] +#CHECK: oill %r0, 65535 # encoding: [0xa5,0x0b,0xff,0xff] +#CHECK: oill %r15, 0 # encoding: [0xa5,0xfb,0x00,0x00] + + oill %r0, 0 + oill %r0, 0x8000 + oill %r0, 0xffff + oill %r15, 0 diff --git a/test/MC/SystemZ/insn-oill-02.s b/test/MC/SystemZ/insn-oill-02.s new file mode 100644 index 000000000000..01321db30937 --- /dev/null +++ b/test/MC/SystemZ/insn-oill-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oill %r0, -1 +#CHECK: error: invalid operand +#CHECK: oill %r0, 0x10000 + + oill %r0, -1 + oill %r0, 0x10000 diff --git a/test/MC/SystemZ/insn-oiy-01.s b/test/MC/SystemZ/insn-oiy-01.s new file mode 100644 index 000000000000..ba060cad1efa --- /dev/null +++ b/test/MC/SystemZ/insn-oiy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oiy -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x56] +#CHECK: oiy -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x56] +#CHECK: oiy 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x56] +#CHECK: oiy 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x56] +#CHECK: oiy 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x56] +#CHECK: oiy 0, 255 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x56] +#CHECK: oiy 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x56] +#CHECK: oiy 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x56] +#CHECK: oiy 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x56] +#CHECK: oiy 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x56] + + oiy -524288, 0 + oiy -1, 0 + oiy 0, 0 + oiy 1, 0 + oiy 524287, 0 + oiy 0, 255 + oiy 0(%r1), 42 + oiy 0(%r15), 42 + oiy 524287(%r1), 42 + oiy 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-oiy-02.s b/test/MC/SystemZ/insn-oiy-02.s new file mode 100644 index 000000000000..c1c556931da1 --- /dev/null +++ b/test/MC/SystemZ/insn-oiy-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oiy -524289, 0 +#CHECK: error: invalid operand +#CHECK: oiy 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: oiy 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: oiy 0, -1 +#CHECK: error: invalid operand +#CHECK: oiy 0, 256 + + oiy -524289, 0 + oiy 524288, 0 + oiy 0(%r1,%r2), 0 + oiy 0, -1 + oiy 0, 256 diff --git a/test/MC/SystemZ/insn-or-01.s b/test/MC/SystemZ/insn-or-01.s new file mode 100644 index 000000000000..8ac366d32ac0 --- /dev/null +++ b/test/MC/SystemZ/insn-or-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: or %r0, %r0 # encoding: [0x16,0x00] +#CHECK: or %r0, %r15 # encoding: [0x16,0x0f] +#CHECK: or %r15, %r0 # encoding: [0x16,0xf0] +#CHECK: or %r7, %r8 # encoding: [0x16,0x78] + + or %r0,%r0 + or %r0,%r15 + or %r15,%r0 + or %r7,%r8 diff --git a/test/MC/SystemZ/insn-oy-01.s b/test/MC/SystemZ/insn-oy-01.s new file mode 100644 index 000000000000..58013d0cabbd --- /dev/null +++ b/test/MC/SystemZ/insn-oy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: oy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x56] +#CHECK: oy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x56] +#CHECK: oy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x56] +#CHECK: oy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x56] +#CHECK: oy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x56] +#CHECK: oy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x56] +#CHECK: oy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x56] +#CHECK: oy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x56] +#CHECK: oy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x56] +#CHECK: oy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x56] + + oy %r0, -524288 + oy %r0, -1 + oy %r0, 0 + oy %r0, 1 + oy %r0, 524287 + oy %r0, 0(%r1) + oy %r0, 0(%r15) + oy %r0, 524287(%r1,%r15) + oy %r0, 524287(%r15,%r1) + oy %r15, 0 diff --git a/test/MC/SystemZ/insn-oy-02.s b/test/MC/SystemZ/insn-oy-02.s new file mode 100644 index 000000000000..a9ae5b23954a --- /dev/null +++ b/test/MC/SystemZ/insn-oy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: oy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: oy %r0, 524288 + + oy %r0, -524289 + oy %r0, 524288 diff --git a/test/MC/SystemZ/insn-risbg-01.s b/test/MC/SystemZ/insn-risbg-01.s new file mode 100644 index 000000000000..b50fbe7f96bd --- /dev/null +++ b/test/MC/SystemZ/insn-risbg-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: risbg %r0, %r0, 0, 0, 0 # encoding: [0xec,0x00,0x00,0x00,0x00,0x55] +#CHECK: risbg %r0, %r0, 0, 0, 63 # encoding: [0xec,0x00,0x00,0x00,0x3f,0x55] +#CHECK: risbg %r0, %r0, 0, 63, 0 # encoding: [0xec,0x00,0x00,0x3f,0x00,0x55] +#CHECK: risbg %r0, %r0, 63, 0, 0 # encoding: [0xec,0x00,0x3f,0x00,0x00,0x55] +#CHECK: risbg %r0, %r15, 0, 0, 0 # encoding: [0xec,0x0f,0x00,0x00,0x00,0x55] +#CHECK: risbg %r15, %r0, 0, 0, 0 # encoding: [0xec,0xf0,0x00,0x00,0x00,0x55] +#CHECK: risbg %r4, %r5, 6, 7, 8 # encoding: [0xec,0x45,0x06,0x07,0x08,0x55] + + risbg %r0,%r0,0,0,0 + risbg %r0,%r0,0,0,63 + risbg %r0,%r0,0,63,0 + risbg %r0,%r0,63,0,0 + risbg %r0,%r15,0,0,0 + risbg %r15,%r0,0,0,0 + risbg %r4,%r5,6,7,8 diff --git a/test/MC/SystemZ/insn-risbg-02.s b/test/MC/SystemZ/insn-risbg-02.s new file mode 100644 index 000000000000..781cb563c847 --- /dev/null +++ b/test/MC/SystemZ/insn-risbg-02.s @@ -0,0 +1,22 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: risbg %r0,%r0,0,0,-1 +#CHECK: error: invalid operand +#CHECK: risbg %r0,%r0,0,0,64 +#CHECK: error: invalid operand +#CHECK: risbg %r0,%r0,0,-1,0 +#CHECK: error: invalid operand +#CHECK: risbg %r0,%r0,0,64,0 +#CHECK: error: invalid operand +#CHECK: risbg %r0,%r0,-1,0,0 +#CHECK: error: invalid operand +#CHECK: risbg %r0,%r0,64,0,0 + + risbg %r0,%r0,0,0,-1 + risbg %r0,%r0,0,0,64 + risbg %r0,%r0,0,-1,0 + risbg %r0,%r0,0,64,0 + risbg %r0,%r0,-1,0,0 + risbg %r0,%r0,64,0,0 diff --git a/test/MC/SystemZ/insn-rll-01.s b/test/MC/SystemZ/insn-rll-01.s new file mode 100644 index 000000000000..06e3774786c9 --- /dev/null +++ b/test/MC/SystemZ/insn-rll-01.s @@ -0,0 +1,27 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: rll %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x1d] +#CHECK: rll %r15, %r1, 0 # encoding: [0xeb,0xf1,0x00,0x00,0x00,0x1d] +#CHECK: rll %r1, %r15, 0 # encoding: [0xeb,0x1f,0x00,0x00,0x00,0x1d] +#CHECK: rll %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x1d] +#CHECK: rll %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x1d] +#CHECK: rll %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x1d] +#CHECK: rll %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x1d] +#CHECK: rll %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x1d] +#CHECK: rll %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x1d] +#CHECK: rll %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x1d] +#CHECK: rll %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x1d] +#CHECK: rll %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x1d] + + rll %r0,%r0,0 + rll %r15,%r1,0 + rll %r1,%r15,0 + rll %r15,%r15,0 + rll %r0,%r0,-524288 + rll %r0,%r0,-1 + rll %r0,%r0,1 + rll %r0,%r0,524287 + rll %r0,%r0,0(%r1) + rll %r0,%r0,0(%r15) + rll %r0,%r0,524287(%r1) + rll %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-rll-02.s b/test/MC/SystemZ/insn-rll-02.s new file mode 100644 index 000000000000..baf160700fcb --- /dev/null +++ b/test/MC/SystemZ/insn-rll-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: rll %r0,%r0,-524289 +#CHECK: error: invalid operand +#CHECK: rll %r0,%r0,524288 +#CHECK: error: %r0 used in an address +#CHECK: rll %r0,%r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: rll %r0,%r0,0(%r1,%r2) + + rll %r0,%r0,-524289 + rll %r0,%r0,524288 + rll %r0,%r0,0(%r0) + rll %r0,%r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-rllg-01.s b/test/MC/SystemZ/insn-rllg-01.s new file mode 100644 index 000000000000..c36dc6daf20b --- /dev/null +++ b/test/MC/SystemZ/insn-rllg-01.s @@ -0,0 +1,27 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: rllg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x1c] +#CHECK: rllg %r15, %r1, 0 # encoding: [0xeb,0xf1,0x00,0x00,0x00,0x1c] +#CHECK: rllg %r1, %r15, 0 # encoding: [0xeb,0x1f,0x00,0x00,0x00,0x1c] +#CHECK: rllg %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x1c] +#CHECK: rllg %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x1c] +#CHECK: rllg %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x1c] +#CHECK: rllg %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x1c] +#CHECK: rllg %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x1c] +#CHECK: rllg %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x1c] +#CHECK: rllg %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x1c] +#CHECK: rllg %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x1c] +#CHECK: rllg %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x1c] + + rllg %r0,%r0,0 + rllg %r15,%r1,0 + rllg %r1,%r15,0 + rllg %r15,%r15,0 + rllg %r0,%r0,-524288 + rllg %r0,%r0,-1 + rllg %r0,%r0,1 + rllg %r0,%r0,524287 + rllg %r0,%r0,0(%r1) + rllg %r0,%r0,0(%r15) + rllg %r0,%r0,524287(%r1) + rllg %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-rllg-02.s b/test/MC/SystemZ/insn-rllg-02.s new file mode 100644 index 000000000000..7f82845aa646 --- /dev/null +++ b/test/MC/SystemZ/insn-rllg-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: rllg %r0,%r0,-524289 +#CHECK: error: invalid operand +#CHECK: rllg %r0,%r0,524288 +#CHECK: error: %r0 used in an address +#CHECK: rllg %r0,%r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: rllg %r0,%r0,0(%r1,%r2) + + rllg %r0,%r0,-524289 + rllg %r0,%r0,524288 + rllg %r0,%r0,0(%r0) + rllg %r0,%r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-s-01.s b/test/MC/SystemZ/insn-s-01.s new file mode 100644 index 000000000000..2effedbc6c88 --- /dev/null +++ b/test/MC/SystemZ/insn-s-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: s %r0, 0 # encoding: [0x5b,0x00,0x00,0x00] +#CHECK: s %r0, 4095 # encoding: [0x5b,0x00,0x0f,0xff] +#CHECK: s %r0, 0(%r1) # encoding: [0x5b,0x00,0x10,0x00] +#CHECK: s %r0, 0(%r15) # encoding: [0x5b,0x00,0xf0,0x00] +#CHECK: s %r0, 4095(%r1,%r15) # encoding: [0x5b,0x01,0xff,0xff] +#CHECK: s %r0, 4095(%r15,%r1) # encoding: [0x5b,0x0f,0x1f,0xff] +#CHECK: s %r15, 0 # encoding: [0x5b,0xf0,0x00,0x00] + + s %r0, 0 + s %r0, 4095 + s %r0, 0(%r1) + s %r0, 0(%r15) + s %r0, 4095(%r1,%r15) + s %r0, 4095(%r15,%r1) + s %r15, 0 diff --git a/test/MC/SystemZ/insn-s-02.s b/test/MC/SystemZ/insn-s-02.s new file mode 100644 index 000000000000..f0b4a137ec74 --- /dev/null +++ b/test/MC/SystemZ/insn-s-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: s %r0, -1 +#CHECK: error: invalid operand +#CHECK: s %r0, 4096 + + s %r0, -1 + s %r0, 4096 diff --git a/test/MC/SystemZ/insn-sdb-01.s b/test/MC/SystemZ/insn-sdb-01.s new file mode 100644 index 000000000000..9267796ece45 --- /dev/null +++ b/test/MC/SystemZ/insn-sdb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sdb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x1b] +#CHECK: sdb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x1b] +#CHECK: sdb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x1b] +#CHECK: sdb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x1b] +#CHECK: sdb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x1b] +#CHECK: sdb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x1b] +#CHECK: sdb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x1b] + + sdb %f0, 0 + sdb %f0, 4095 + sdb %f0, 0(%r1) + sdb %f0, 0(%r15) + sdb %f0, 4095(%r1,%r15) + sdb %f0, 4095(%r15,%r1) + sdb %f15, 0 diff --git a/test/MC/SystemZ/insn-sdb-02.s b/test/MC/SystemZ/insn-sdb-02.s new file mode 100644 index 000000000000..c77284fb9a8c --- /dev/null +++ b/test/MC/SystemZ/insn-sdb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sdb %f0, -1 +#CHECK: error: invalid operand +#CHECK: sdb %f0, 4096 + + sdb %f0, -1 + sdb %f0, 4096 diff --git a/test/MC/SystemZ/insn-sdbr-01.s b/test/MC/SystemZ/insn-sdbr-01.s new file mode 100644 index 000000000000..b07f5f2cd8fd --- /dev/null +++ b/test/MC/SystemZ/insn-sdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sdbr %f0, %f0 # encoding: [0xb3,0x1b,0x00,0x00] +#CHECK: sdbr %f0, %f15 # encoding: [0xb3,0x1b,0x00,0x0f] +#CHECK: sdbr %f7, %f8 # encoding: [0xb3,0x1b,0x00,0x78] +#CHECK: sdbr %f15, %f0 # encoding: [0xb3,0x1b,0x00,0xf0] + + sdbr %f0, %f0 + sdbr %f0, %f15 + sdbr %f7, %f8 + sdbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-seb-01.s b/test/MC/SystemZ/insn-seb-01.s new file mode 100644 index 000000000000..4bf5cfa06271 --- /dev/null +++ b/test/MC/SystemZ/insn-seb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: seb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x0b] +#CHECK: seb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x0b] +#CHECK: seb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x0b] +#CHECK: seb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x0b] +#CHECK: seb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x0b] +#CHECK: seb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x0b] +#CHECK: seb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x0b] + + seb %f0, 0 + seb %f0, 4095 + seb %f0, 0(%r1) + seb %f0, 0(%r15) + seb %f0, 4095(%r1,%r15) + seb %f0, 4095(%r15,%r1) + seb %f15, 0 diff --git a/test/MC/SystemZ/insn-seb-02.s b/test/MC/SystemZ/insn-seb-02.s new file mode 100644 index 000000000000..e185a20fdc20 --- /dev/null +++ b/test/MC/SystemZ/insn-seb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: seb %f0, -1 +#CHECK: error: invalid operand +#CHECK: seb %f0, 4096 + + seb %f0, -1 + seb %f0, 4096 diff --git a/test/MC/SystemZ/insn-sebr-01.s b/test/MC/SystemZ/insn-sebr-01.s new file mode 100644 index 000000000000..467b57cabe01 --- /dev/null +++ b/test/MC/SystemZ/insn-sebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sebr %f0, %f0 # encoding: [0xb3,0x0b,0x00,0x00] +#CHECK: sebr %f0, %f15 # encoding: [0xb3,0x0b,0x00,0x0f] +#CHECK: sebr %f7, %f8 # encoding: [0xb3,0x0b,0x00,0x78] +#CHECK: sebr %f15, %f0 # encoding: [0xb3,0x0b,0x00,0xf0] + + sebr %f0, %f0 + sebr %f0, %f15 + sebr %f7, %f8 + sebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-sg-01.s b/test/MC/SystemZ/insn-sg-01.s new file mode 100644 index 000000000000..153df1ae2d67 --- /dev/null +++ b/test/MC/SystemZ/insn-sg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x09] +#CHECK: sg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x09] +#CHECK: sg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x09] +#CHECK: sg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x09] +#CHECK: sg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x09] +#CHECK: sg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x09] +#CHECK: sg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x09] +#CHECK: sg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x09] +#CHECK: sg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x09] +#CHECK: sg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x09] + + sg %r0, -524288 + sg %r0, -1 + sg %r0, 0 + sg %r0, 1 + sg %r0, 524287 + sg %r0, 0(%r1) + sg %r0, 0(%r15) + sg %r0, 524287(%r1,%r15) + sg %r0, 524287(%r15,%r1) + sg %r15, 0 diff --git a/test/MC/SystemZ/insn-sg-02.s b/test/MC/SystemZ/insn-sg-02.s new file mode 100644 index 000000000000..f183e58f7b74 --- /dev/null +++ b/test/MC/SystemZ/insn-sg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: sg %r0, 524288 + + sg %r0, -524289 + sg %r0, 524288 diff --git a/test/MC/SystemZ/insn-sgf-01.s b/test/MC/SystemZ/insn-sgf-01.s new file mode 100644 index 000000000000..844c09998d38 --- /dev/null +++ b/test/MC/SystemZ/insn-sgf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x19] +#CHECK: sgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x19] +#CHECK: sgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x19] +#CHECK: sgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x19] +#CHECK: sgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x19] +#CHECK: sgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x19] +#CHECK: sgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x19] +#CHECK: sgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x19] +#CHECK: sgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x19] +#CHECK: sgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x19] + + sgf %r0, -524288 + sgf %r0, -1 + sgf %r0, 0 + sgf %r0, 1 + sgf %r0, 524287 + sgf %r0, 0(%r1) + sgf %r0, 0(%r15) + sgf %r0, 524287(%r1,%r15) + sgf %r0, 524287(%r15,%r1) + sgf %r15, 0 diff --git a/test/MC/SystemZ/insn-sgf-02.s b/test/MC/SystemZ/insn-sgf-02.s new file mode 100644 index 000000000000..7eba3abe2c3f --- /dev/null +++ b/test/MC/SystemZ/insn-sgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: sgf %r0, 524288 + + sgf %r0, -524289 + sgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-sgfr-01.s b/test/MC/SystemZ/insn-sgfr-01.s new file mode 100644 index 000000000000..49a1412f8814 --- /dev/null +++ b/test/MC/SystemZ/insn-sgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sgfr %r0, %r0 # encoding: [0xb9,0x19,0x00,0x00] +#CHECK: sgfr %r0, %r15 # encoding: [0xb9,0x19,0x00,0x0f] +#CHECK: sgfr %r15, %r0 # encoding: [0xb9,0x19,0x00,0xf0] +#CHECK: sgfr %r7, %r8 # encoding: [0xb9,0x19,0x00,0x78] + + sgfr %r0,%r0 + sgfr %r0,%r15 + sgfr %r15,%r0 + sgfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-sgr-01.s b/test/MC/SystemZ/insn-sgr-01.s new file mode 100644 index 000000000000..86c59a145254 --- /dev/null +++ b/test/MC/SystemZ/insn-sgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sgr %r0, %r0 # encoding: [0xb9,0x09,0x00,0x00] +#CHECK: sgr %r0, %r15 # encoding: [0xb9,0x09,0x00,0x0f] +#CHECK: sgr %r15, %r0 # encoding: [0xb9,0x09,0x00,0xf0] +#CHECK: sgr %r7, %r8 # encoding: [0xb9,0x09,0x00,0x78] + + sgr %r0,%r0 + sgr %r0,%r15 + sgr %r15,%r0 + sgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-sl-01.s b/test/MC/SystemZ/insn-sl-01.s new file mode 100644 index 000000000000..c2186da486cf --- /dev/null +++ b/test/MC/SystemZ/insn-sl-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sl %r0, 0 # encoding: [0x5f,0x00,0x00,0x00] +#CHECK: sl %r0, 4095 # encoding: [0x5f,0x00,0x0f,0xff] +#CHECK: sl %r0, 0(%r1) # encoding: [0x5f,0x00,0x10,0x00] +#CHECK: sl %r0, 0(%r15) # encoding: [0x5f,0x00,0xf0,0x00] +#CHECK: sl %r0, 4095(%r1,%r15) # encoding: [0x5f,0x01,0xff,0xff] +#CHECK: sl %r0, 4095(%r15,%r1) # encoding: [0x5f,0x0f,0x1f,0xff] +#CHECK: sl %r15, 0 # encoding: [0x5f,0xf0,0x00,0x00] + + sl %r0, 0 + sl %r0, 4095 + sl %r0, 0(%r1) + sl %r0, 0(%r15) + sl %r0, 4095(%r1,%r15) + sl %r0, 4095(%r15,%r1) + sl %r15, 0 diff --git a/test/MC/SystemZ/insn-sl-02.s b/test/MC/SystemZ/insn-sl-02.s new file mode 100644 index 000000000000..8abd99d23514 --- /dev/null +++ b/test/MC/SystemZ/insn-sl-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sl %r0, -1 +#CHECK: error: invalid operand +#CHECK: sl %r0, 4096 + + sl %r0, -1 + sl %r0, 4096 diff --git a/test/MC/SystemZ/insn-slb-01.s b/test/MC/SystemZ/insn-slb-01.s new file mode 100644 index 000000000000..4bc79f6746a9 --- /dev/null +++ b/test/MC/SystemZ/insn-slb-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slb %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x99] +#CHECK: slb %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x99] +#CHECK: slb %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x99] +#CHECK: slb %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x99] +#CHECK: slb %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x99] +#CHECK: slb %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x99] +#CHECK: slb %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x99] +#CHECK: slb %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x99] +#CHECK: slb %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x99] +#CHECK: slb %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x99] + + slb %r0, -524288 + slb %r0, -1 + slb %r0, 0 + slb %r0, 1 + slb %r0, 524287 + slb %r0, 0(%r1) + slb %r0, 0(%r15) + slb %r0, 524287(%r1,%r15) + slb %r0, 524287(%r15,%r1) + slb %r15, 0 diff --git a/test/MC/SystemZ/insn-slb-02.s b/test/MC/SystemZ/insn-slb-02.s new file mode 100644 index 000000000000..ac87128ffc4d --- /dev/null +++ b/test/MC/SystemZ/insn-slb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: slb %r0, -524289 +#CHECK: error: invalid operand +#CHECK: slb %r0, 524288 + + slb %r0, -524289 + slb %r0, 524288 diff --git a/test/MC/SystemZ/insn-slbg-01.s b/test/MC/SystemZ/insn-slbg-01.s new file mode 100644 index 000000000000..8878aeda5edc --- /dev/null +++ b/test/MC/SystemZ/insn-slbg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slbg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x89] +#CHECK: slbg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x89] +#CHECK: slbg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x89] +#CHECK: slbg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x89] +#CHECK: slbg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x89] +#CHECK: slbg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x89] +#CHECK: slbg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x89] +#CHECK: slbg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x89] +#CHECK: slbg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x89] +#CHECK: slbg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x89] + + slbg %r0, -524288 + slbg %r0, -1 + slbg %r0, 0 + slbg %r0, 1 + slbg %r0, 524287 + slbg %r0, 0(%r1) + slbg %r0, 0(%r15) + slbg %r0, 524287(%r1,%r15) + slbg %r0, 524287(%r15,%r1) + slbg %r15, 0 diff --git a/test/MC/SystemZ/insn-slbg-02.s b/test/MC/SystemZ/insn-slbg-02.s new file mode 100644 index 000000000000..ce09c8a9de51 --- /dev/null +++ b/test/MC/SystemZ/insn-slbg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: slbg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: slbg %r0, 524288 + + slbg %r0, -524289 + slbg %r0, 524288 diff --git a/test/MC/SystemZ/insn-slbgr-01.s b/test/MC/SystemZ/insn-slbgr-01.s new file mode 100644 index 000000000000..bcc2b535ba7b --- /dev/null +++ b/test/MC/SystemZ/insn-slbgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slbgr %r0, %r0 # encoding: [0xb9,0x89,0x00,0x00] +#CHECK: slbgr %r0, %r15 # encoding: [0xb9,0x89,0x00,0x0f] +#CHECK: slbgr %r15, %r0 # encoding: [0xb9,0x89,0x00,0xf0] +#CHECK: slbgr %r7, %r8 # encoding: [0xb9,0x89,0x00,0x78] + + slbgr %r0,%r0 + slbgr %r0,%r15 + slbgr %r15,%r0 + slbgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-slbr-01.s b/test/MC/SystemZ/insn-slbr-01.s new file mode 100644 index 000000000000..9c10dbd02106 --- /dev/null +++ b/test/MC/SystemZ/insn-slbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slbr %r0, %r0 # encoding: [0xb9,0x99,0x00,0x00] +#CHECK: slbr %r0, %r15 # encoding: [0xb9,0x99,0x00,0x0f] +#CHECK: slbr %r15, %r0 # encoding: [0xb9,0x99,0x00,0xf0] +#CHECK: slbr %r7, %r8 # encoding: [0xb9,0x99,0x00,0x78] + + slbr %r0,%r0 + slbr %r0,%r15 + slbr %r15,%r0 + slbr %r7,%r8 diff --git a/test/MC/SystemZ/insn-slfi-01.s b/test/MC/SystemZ/insn-slfi-01.s new file mode 100644 index 000000000000..4c8e5b4a84d7 --- /dev/null +++ b/test/MC/SystemZ/insn-slfi-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slfi %r0, 0 # encoding: [0xc2,0x05,0x00,0x00,0x00,0x00] +#CHECK: slfi %r0, 4294967295 # encoding: [0xc2,0x05,0xff,0xff,0xff,0xff] +#CHECK: slfi %r15, 0 # encoding: [0xc2,0xf5,0x00,0x00,0x00,0x00] + + slfi %r0, 0 + slfi %r0, (1 << 32) - 1 + slfi %r15, 0 diff --git a/test/MC/SystemZ/insn-slfi-02.s b/test/MC/SystemZ/insn-slfi-02.s new file mode 100644 index 000000000000..12e14f6164b0 --- /dev/null +++ b/test/MC/SystemZ/insn-slfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: slfi %r0, -1 +#CHECK: error: invalid operand +#CHECK: slfi %r0, (1 << 32) + + slfi %r0, -1 + slfi %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-slg-01.s b/test/MC/SystemZ/insn-slg-01.s new file mode 100644 index 000000000000..0b4f99e2e139 --- /dev/null +++ b/test/MC/SystemZ/insn-slg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x0b] +#CHECK: slg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x0b] +#CHECK: slg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x0b] +#CHECK: slg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x0b] +#CHECK: slg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x0b] +#CHECK: slg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x0b] +#CHECK: slg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x0b] +#CHECK: slg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x0b] +#CHECK: slg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x0b] +#CHECK: slg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x0b] + + slg %r0, -524288 + slg %r0, -1 + slg %r0, 0 + slg %r0, 1 + slg %r0, 524287 + slg %r0, 0(%r1) + slg %r0, 0(%r15) + slg %r0, 524287(%r1,%r15) + slg %r0, 524287(%r15,%r1) + slg %r15, 0 diff --git a/test/MC/SystemZ/insn-slg-02.s b/test/MC/SystemZ/insn-slg-02.s new file mode 100644 index 000000000000..1ad04c6111d0 --- /dev/null +++ b/test/MC/SystemZ/insn-slg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: slg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: slg %r0, 524288 + + slg %r0, -524289 + slg %r0, 524288 diff --git a/test/MC/SystemZ/insn-slgf-01.s b/test/MC/SystemZ/insn-slgf-01.s new file mode 100644 index 000000000000..bca480ecd77a --- /dev/null +++ b/test/MC/SystemZ/insn-slgf-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slgf %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x1b] +#CHECK: slgf %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x1b] +#CHECK: slgf %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x1b] +#CHECK: slgf %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x1b] +#CHECK: slgf %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x1b] +#CHECK: slgf %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x1b] +#CHECK: slgf %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x1b] +#CHECK: slgf %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x1b] +#CHECK: slgf %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x1b] +#CHECK: slgf %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x1b] + + slgf %r0, -524288 + slgf %r0, -1 + slgf %r0, 0 + slgf %r0, 1 + slgf %r0, 524287 + slgf %r0, 0(%r1) + slgf %r0, 0(%r15) + slgf %r0, 524287(%r1,%r15) + slgf %r0, 524287(%r15,%r1) + slgf %r15, 0 diff --git a/test/MC/SystemZ/insn-slgf-02.s b/test/MC/SystemZ/insn-slgf-02.s new file mode 100644 index 000000000000..71a9aa7812e5 --- /dev/null +++ b/test/MC/SystemZ/insn-slgf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: slgf %r0, -524289 +#CHECK: error: invalid operand +#CHECK: slgf %r0, 524288 + + slgf %r0, -524289 + slgf %r0, 524288 diff --git a/test/MC/SystemZ/insn-slgfi-01.s b/test/MC/SystemZ/insn-slgfi-01.s new file mode 100644 index 000000000000..c9fef187f5ad --- /dev/null +++ b/test/MC/SystemZ/insn-slgfi-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slgfi %r0, 0 # encoding: [0xc2,0x04,0x00,0x00,0x00,0x00] +#CHECK: slgfi %r0, 4294967295 # encoding: [0xc2,0x04,0xff,0xff,0xff,0xff] +#CHECK: slgfi %r15, 0 # encoding: [0xc2,0xf4,0x00,0x00,0x00,0x00] + + slgfi %r0, 0 + slgfi %r0, (1 << 32) - 1 + slgfi %r15, 0 diff --git a/test/MC/SystemZ/insn-slgfi-02.s b/test/MC/SystemZ/insn-slgfi-02.s new file mode 100644 index 000000000000..696408d377e3 --- /dev/null +++ b/test/MC/SystemZ/insn-slgfi-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: slgfi %r0, -1 +#CHECK: error: invalid operand +#CHECK: slgfi %r0, (1 << 32) + + slgfi %r0, -1 + slgfi %r0, (1 << 32) diff --git a/test/MC/SystemZ/insn-slgfr-01.s b/test/MC/SystemZ/insn-slgfr-01.s new file mode 100644 index 000000000000..94c10edcd3b6 --- /dev/null +++ b/test/MC/SystemZ/insn-slgfr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slgfr %r0, %r0 # encoding: [0xb9,0x1b,0x00,0x00] +#CHECK: slgfr %r0, %r15 # encoding: [0xb9,0x1b,0x00,0x0f] +#CHECK: slgfr %r15, %r0 # encoding: [0xb9,0x1b,0x00,0xf0] +#CHECK: slgfr %r7, %r8 # encoding: [0xb9,0x1b,0x00,0x78] + + slgfr %r0,%r0 + slgfr %r0,%r15 + slgfr %r15,%r0 + slgfr %r7,%r8 diff --git a/test/MC/SystemZ/insn-slgr-01.s b/test/MC/SystemZ/insn-slgr-01.s new file mode 100644 index 000000000000..4d226be83e6e --- /dev/null +++ b/test/MC/SystemZ/insn-slgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slgr %r0, %r0 # encoding: [0xb9,0x0b,0x00,0x00] +#CHECK: slgr %r0, %r15 # encoding: [0xb9,0x0b,0x00,0x0f] +#CHECK: slgr %r15, %r0 # encoding: [0xb9,0x0b,0x00,0xf0] +#CHECK: slgr %r7, %r8 # encoding: [0xb9,0x0b,0x00,0x78] + + slgr %r0,%r0 + slgr %r0,%r15 + slgr %r15,%r0 + slgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-sll-01.s b/test/MC/SystemZ/insn-sll-01.s new file mode 100644 index 000000000000..5bc112856d70 --- /dev/null +++ b/test/MC/SystemZ/insn-sll-01.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sll %r0, 0 # encoding: [0x89,0x00,0x00,0x00] +#CHECK: sll %r7, 0 # encoding: [0x89,0x70,0x00,0x00] +#CHECK: sll %r15, 0 # encoding: [0x89,0xf0,0x00,0x00] +#CHECK: sll %r0, 4095 # encoding: [0x89,0x00,0x0f,0xff] +#CHECK: sll %r0, 0(%r1) # encoding: [0x89,0x00,0x10,0x00] +#CHECK: sll %r0, 0(%r15) # encoding: [0x89,0x00,0xf0,0x00] +#CHECK: sll %r0, 4095(%r1) # encoding: [0x89,0x00,0x1f,0xff] +#CHECK: sll %r0, 4095(%r15) # encoding: [0x89,0x00,0xff,0xff] + + sll %r0,0 + sll %r7,0 + sll %r15,0 + sll %r0,4095 + sll %r0,0(%r1) + sll %r0,0(%r15) + sll %r0,4095(%r1) + sll %r0,4095(%r15) diff --git a/test/MC/SystemZ/insn-sll-02.s b/test/MC/SystemZ/insn-sll-02.s new file mode 100644 index 000000000000..1b951be02c27 --- /dev/null +++ b/test/MC/SystemZ/insn-sll-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sll %r0,-1 +#CHECK: error: invalid operand +#CHECK: sll %r0,4096 +#CHECK: error: %r0 used in an address +#CHECK: sll %r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: sll %r0,0(%r1,%r2) + + sll %r0,-1 + sll %r0,4096 + sll %r0,0(%r0) + sll %r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-sllg-01.s b/test/MC/SystemZ/insn-sllg-01.s new file mode 100644 index 000000000000..1b0f0094676f --- /dev/null +++ b/test/MC/SystemZ/insn-sllg-01.s @@ -0,0 +1,27 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sllg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x0d] +#CHECK: sllg %r15, %r1, 0 # encoding: [0xeb,0xf1,0x00,0x00,0x00,0x0d] +#CHECK: sllg %r1, %r15, 0 # encoding: [0xeb,0x1f,0x00,0x00,0x00,0x0d] +#CHECK: sllg %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x0d] +#CHECK: sllg %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x0d] +#CHECK: sllg %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x0d] +#CHECK: sllg %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x0d] +#CHECK: sllg %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x0d] +#CHECK: sllg %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x0d] +#CHECK: sllg %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x0d] +#CHECK: sllg %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x0d] +#CHECK: sllg %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x0d] + + sllg %r0,%r0,0 + sllg %r15,%r1,0 + sllg %r1,%r15,0 + sllg %r15,%r15,0 + sllg %r0,%r0,-524288 + sllg %r0,%r0,-1 + sllg %r0,%r0,1 + sllg %r0,%r0,524287 + sllg %r0,%r0,0(%r1) + sllg %r0,%r0,0(%r15) + sllg %r0,%r0,524287(%r1) + sllg %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-sllg-02.s b/test/MC/SystemZ/insn-sllg-02.s new file mode 100644 index 000000000000..68c3d1da29f4 --- /dev/null +++ b/test/MC/SystemZ/insn-sllg-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sllg %r0,%r0,-524289 +#CHECK: error: invalid operand +#CHECK: sllg %r0,%r0,524288 +#CHECK: error: %r0 used in an address +#CHECK: sllg %r0,%r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: sllg %r0,%r0,0(%r1,%r2) + + sllg %r0,%r0,-524289 + sllg %r0,%r0,524288 + sllg %r0,%r0,0(%r0) + sllg %r0,%r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-slr-01.s b/test/MC/SystemZ/insn-slr-01.s new file mode 100644 index 000000000000..c142407cff64 --- /dev/null +++ b/test/MC/SystemZ/insn-slr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: slr %r0, %r0 # encoding: [0x1f,0x00] +#CHECK: slr %r0, %r15 # encoding: [0x1f,0x0f] +#CHECK: slr %r15, %r0 # encoding: [0x1f,0xf0] +#CHECK: slr %r7, %r8 # encoding: [0x1f,0x78] + + slr %r0,%r0 + slr %r0,%r15 + slr %r15,%r0 + slr %r7,%r8 diff --git a/test/MC/SystemZ/insn-sly-01.s b/test/MC/SystemZ/insn-sly-01.s new file mode 100644 index 000000000000..59d2907a4d8c --- /dev/null +++ b/test/MC/SystemZ/insn-sly-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sly %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x5f] +#CHECK: sly %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x5f] +#CHECK: sly %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x5f] +#CHECK: sly %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x5f] +#CHECK: sly %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x5f] +#CHECK: sly %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x5f] +#CHECK: sly %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x5f] +#CHECK: sly %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x5f] +#CHECK: sly %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x5f] +#CHECK: sly %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x5f] + + sly %r0, -524288 + sly %r0, -1 + sly %r0, 0 + sly %r0, 1 + sly %r0, 524287 + sly %r0, 0(%r1) + sly %r0, 0(%r15) + sly %r0, 524287(%r1,%r15) + sly %r0, 524287(%r15,%r1) + sly %r15, 0 diff --git a/test/MC/SystemZ/insn-sly-02.s b/test/MC/SystemZ/insn-sly-02.s new file mode 100644 index 000000000000..9abd53e1ab1e --- /dev/null +++ b/test/MC/SystemZ/insn-sly-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sly %r0, -524289 +#CHECK: error: invalid operand +#CHECK: sly %r0, 524288 + + sly %r0, -524289 + sly %r0, 524288 diff --git a/test/MC/SystemZ/insn-sqdb-01.s b/test/MC/SystemZ/insn-sqdb-01.s new file mode 100644 index 000000000000..b79aae144429 --- /dev/null +++ b/test/MC/SystemZ/insn-sqdb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sqdb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x15] +#CHECK: sqdb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x15] +#CHECK: sqdb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x15] +#CHECK: sqdb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x15] +#CHECK: sqdb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x15] +#CHECK: sqdb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x15] +#CHECK: sqdb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x15] + + sqdb %f0, 0 + sqdb %f0, 4095 + sqdb %f0, 0(%r1) + sqdb %f0, 0(%r15) + sqdb %f0, 4095(%r1,%r15) + sqdb %f0, 4095(%r15,%r1) + sqdb %f15, 0 diff --git a/test/MC/SystemZ/insn-sqdb-02.s b/test/MC/SystemZ/insn-sqdb-02.s new file mode 100644 index 000000000000..68df26777045 --- /dev/null +++ b/test/MC/SystemZ/insn-sqdb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sqdb %f0, -1 +#CHECK: error: invalid operand +#CHECK: sqdb %f0, 4096 + + sqdb %f0, -1 + sqdb %f0, 4096 diff --git a/test/MC/SystemZ/insn-sqdbr-01.s b/test/MC/SystemZ/insn-sqdbr-01.s new file mode 100644 index 000000000000..d66415fa0523 --- /dev/null +++ b/test/MC/SystemZ/insn-sqdbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sqdbr %f0, %f0 # encoding: [0xb3,0x15,0x00,0x00] +#CHECK: sqdbr %f0, %f15 # encoding: [0xb3,0x15,0x00,0x0f] +#CHECK: sqdbr %f7, %f8 # encoding: [0xb3,0x15,0x00,0x78] +#CHECK: sqdbr %f15, %f0 # encoding: [0xb3,0x15,0x00,0xf0] + + sqdbr %f0, %f0 + sqdbr %f0, %f15 + sqdbr %f7, %f8 + sqdbr %f15, %f0 diff --git a/test/MC/SystemZ/insn-sqeb-01.s b/test/MC/SystemZ/insn-sqeb-01.s new file mode 100644 index 000000000000..60f6e9063572 --- /dev/null +++ b/test/MC/SystemZ/insn-sqeb-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sqeb %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x14] +#CHECK: sqeb %f0, 4095 # encoding: [0xed,0x00,0x0f,0xff,0x00,0x14] +#CHECK: sqeb %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x14] +#CHECK: sqeb %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x14] +#CHECK: sqeb %f0, 4095(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x00,0x14] +#CHECK: sqeb %f0, 4095(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x00,0x14] +#CHECK: sqeb %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x14] + + sqeb %f0, 0 + sqeb %f0, 4095 + sqeb %f0, 0(%r1) + sqeb %f0, 0(%r15) + sqeb %f0, 4095(%r1,%r15) + sqeb %f0, 4095(%r15,%r1) + sqeb %f15, 0 diff --git a/test/MC/SystemZ/insn-sqeb-02.s b/test/MC/SystemZ/insn-sqeb-02.s new file mode 100644 index 000000000000..efb09fcfbc75 --- /dev/null +++ b/test/MC/SystemZ/insn-sqeb-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sqeb %f0, -1 +#CHECK: error: invalid operand +#CHECK: sqeb %f0, 4096 + + sqeb %f0, -1 + sqeb %f0, 4096 diff --git a/test/MC/SystemZ/insn-sqebr-01.s b/test/MC/SystemZ/insn-sqebr-01.s new file mode 100644 index 000000000000..2d13dbeb2654 --- /dev/null +++ b/test/MC/SystemZ/insn-sqebr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sqebr %f0, %f0 # encoding: [0xb3,0x14,0x00,0x00] +#CHECK: sqebr %f0, %f15 # encoding: [0xb3,0x14,0x00,0x0f] +#CHECK: sqebr %f7, %f8 # encoding: [0xb3,0x14,0x00,0x78] +#CHECK: sqebr %f15, %f0 # encoding: [0xb3,0x14,0x00,0xf0] + + sqebr %f0, %f0 + sqebr %f0, %f15 + sqebr %f7, %f8 + sqebr %f15, %f0 diff --git a/test/MC/SystemZ/insn-sqxbr-01.s b/test/MC/SystemZ/insn-sqxbr-01.s new file mode 100644 index 000000000000..78ba908d5af0 --- /dev/null +++ b/test/MC/SystemZ/insn-sqxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sqxbr %f0, %f0 # encoding: [0xb3,0x16,0x00,0x00] +#CHECK: sqxbr %f0, %f13 # encoding: [0xb3,0x16,0x00,0x0d] +#CHECK: sqxbr %f8, %f8 # encoding: [0xb3,0x16,0x00,0x88] +#CHECK: sqxbr %f13, %f0 # encoding: [0xb3,0x16,0x00,0xd0] + + sqxbr %f0, %f0 + sqxbr %f0, %f13 + sqxbr %f8, %f8 + sqxbr %f13, %f0 diff --git a/test/MC/SystemZ/insn-sqxbr-02.s b/test/MC/SystemZ/insn-sqxbr-02.s new file mode 100644 index 000000000000..e51e552fb70d --- /dev/null +++ b/test/MC/SystemZ/insn-sqxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: sqxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: sqxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: sqxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: sqxbr %f14, %f0 + + sqxbr %f0, %f2 + sqxbr %f0, %f14 + sqxbr %f2, %f0 + sqxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-sr-01.s b/test/MC/SystemZ/insn-sr-01.s new file mode 100644 index 000000000000..856bef5eac99 --- /dev/null +++ b/test/MC/SystemZ/insn-sr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sr %r0, %r0 # encoding: [0x1b,0x00] +#CHECK: sr %r0, %r15 # encoding: [0x1b,0x0f] +#CHECK: sr %r15, %r0 # encoding: [0x1b,0xf0] +#CHECK: sr %r7, %r8 # encoding: [0x1b,0x78] + + sr %r0,%r0 + sr %r0,%r15 + sr %r15,%r0 + sr %r7,%r8 diff --git a/test/MC/SystemZ/insn-sra-01.s b/test/MC/SystemZ/insn-sra-01.s new file mode 100644 index 000000000000..fcdaf5de1625 --- /dev/null +++ b/test/MC/SystemZ/insn-sra-01.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sra %r0, 0 # encoding: [0x8a,0x00,0x00,0x00] +#CHECK: sra %r7, 0 # encoding: [0x8a,0x70,0x00,0x00] +#CHECK: sra %r15, 0 # encoding: [0x8a,0xf0,0x00,0x00] +#CHECK: sra %r0, 4095 # encoding: [0x8a,0x00,0x0f,0xff] +#CHECK: sra %r0, 0(%r1) # encoding: [0x8a,0x00,0x10,0x00] +#CHECK: sra %r0, 0(%r15) # encoding: [0x8a,0x00,0xf0,0x00] +#CHECK: sra %r0, 4095(%r1) # encoding: [0x8a,0x00,0x1f,0xff] +#CHECK: sra %r0, 4095(%r15) # encoding: [0x8a,0x00,0xff,0xff] + + sra %r0,0 + sra %r7,0 + sra %r15,0 + sra %r0,4095 + sra %r0,0(%r1) + sra %r0,0(%r15) + sra %r0,4095(%r1) + sra %r0,4095(%r15) diff --git a/test/MC/SystemZ/insn-sra-02.s b/test/MC/SystemZ/insn-sra-02.s new file mode 100644 index 000000000000..7a84f1774331 --- /dev/null +++ b/test/MC/SystemZ/insn-sra-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sra %r0,-1 +#CHECK: error: invalid operand +#CHECK: sra %r0,4096 +#CHECK: error: %r0 used in an address +#CHECK: sra %r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: sra %r0,0(%r1,%r2) + + sra %r0,-1 + sra %r0,4096 + sra %r0,0(%r0) + sra %r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-srag-01.s b/test/MC/SystemZ/insn-srag-01.s new file mode 100644 index 000000000000..9271db237d99 --- /dev/null +++ b/test/MC/SystemZ/insn-srag-01.s @@ -0,0 +1,27 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: srag %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x0a] +#CHECK: srag %r15, %r1, 0 # encoding: [0xeb,0xf1,0x00,0x00,0x00,0x0a] +#CHECK: srag %r1, %r15, 0 # encoding: [0xeb,0x1f,0x00,0x00,0x00,0x0a] +#CHECK: srag %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x0a] +#CHECK: srag %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x0a] +#CHECK: srag %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x0a] +#CHECK: srag %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x0a] +#CHECK: srag %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x0a] +#CHECK: srag %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x0a] +#CHECK: srag %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x0a] +#CHECK: srag %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x0a] +#CHECK: srag %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x0a] + + srag %r0,%r0,0 + srag %r15,%r1,0 + srag %r1,%r15,0 + srag %r15,%r15,0 + srag %r0,%r0,-524288 + srag %r0,%r0,-1 + srag %r0,%r0,1 + srag %r0,%r0,524287 + srag %r0,%r0,0(%r1) + srag %r0,%r0,0(%r15) + srag %r0,%r0,524287(%r1) + srag %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-srag-02.s b/test/MC/SystemZ/insn-srag-02.s new file mode 100644 index 000000000000..7413cbaf9fc3 --- /dev/null +++ b/test/MC/SystemZ/insn-srag-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: srag %r0,%r0,-524289 +#CHECK: error: invalid operand +#CHECK: srag %r0,%r0,524288 +#CHECK: error: %r0 used in an address +#CHECK: srag %r0,%r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: srag %r0,%r0,0(%r1,%r2) + + srag %r0,%r0,-524289 + srag %r0,%r0,524288 + srag %r0,%r0,0(%r0) + srag %r0,%r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-srl-01.s b/test/MC/SystemZ/insn-srl-01.s new file mode 100644 index 000000000000..a3a5df8a2bce --- /dev/null +++ b/test/MC/SystemZ/insn-srl-01.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: srl %r0, 0 # encoding: [0x88,0x00,0x00,0x00] +#CHECK: srl %r7, 0 # encoding: [0x88,0x70,0x00,0x00] +#CHECK: srl %r15, 0 # encoding: [0x88,0xf0,0x00,0x00] +#CHECK: srl %r0, 4095 # encoding: [0x88,0x00,0x0f,0xff] +#CHECK: srl %r0, 0(%r1) # encoding: [0x88,0x00,0x10,0x00] +#CHECK: srl %r0, 0(%r15) # encoding: [0x88,0x00,0xf0,0x00] +#CHECK: srl %r0, 4095(%r1) # encoding: [0x88,0x00,0x1f,0xff] +#CHECK: srl %r0, 4095(%r15) # encoding: [0x88,0x00,0xff,0xff] + + srl %r0,0 + srl %r7,0 + srl %r15,0 + srl %r0,4095 + srl %r0,0(%r1) + srl %r0,0(%r15) + srl %r0,4095(%r1) + srl %r0,4095(%r15) diff --git a/test/MC/SystemZ/insn-srl-02.s b/test/MC/SystemZ/insn-srl-02.s new file mode 100644 index 000000000000..212d16bd8d56 --- /dev/null +++ b/test/MC/SystemZ/insn-srl-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: srl %r0,-1 +#CHECK: error: invalid operand +#CHECK: srl %r0,4096 +#CHECK: error: %r0 used in an address +#CHECK: srl %r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: srl %r0,0(%r1,%r2) + + srl %r0,-1 + srl %r0,4096 + srl %r0,0(%r0) + srl %r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-srlg-01.s b/test/MC/SystemZ/insn-srlg-01.s new file mode 100644 index 000000000000..0087fefd9285 --- /dev/null +++ b/test/MC/SystemZ/insn-srlg-01.s @@ -0,0 +1,27 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: srlg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x0c] +#CHECK: srlg %r15, %r1, 0 # encoding: [0xeb,0xf1,0x00,0x00,0x00,0x0c] +#CHECK: srlg %r1, %r15, 0 # encoding: [0xeb,0x1f,0x00,0x00,0x00,0x0c] +#CHECK: srlg %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x0c] +#CHECK: srlg %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x0c] +#CHECK: srlg %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x0c] +#CHECK: srlg %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x0c] +#CHECK: srlg %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x0c] +#CHECK: srlg %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x0c] +#CHECK: srlg %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x0c] +#CHECK: srlg %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x0c] +#CHECK: srlg %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x0c] + + srlg %r0,%r0,0 + srlg %r15,%r1,0 + srlg %r1,%r15,0 + srlg %r15,%r15,0 + srlg %r0,%r0,-524288 + srlg %r0,%r0,-1 + srlg %r0,%r0,1 + srlg %r0,%r0,524287 + srlg %r0,%r0,0(%r1) + srlg %r0,%r0,0(%r15) + srlg %r0,%r0,524287(%r1) + srlg %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-srlg-02.s b/test/MC/SystemZ/insn-srlg-02.s new file mode 100644 index 000000000000..1e24d0e407f3 --- /dev/null +++ b/test/MC/SystemZ/insn-srlg-02.s @@ -0,0 +1,16 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: srlg %r0,%r0,-524289 +#CHECK: error: invalid operand +#CHECK: srlg %r0,%r0,524288 +#CHECK: error: %r0 used in an address +#CHECK: srlg %r0,%r0,0(%r0) +#CHECK: error: invalid use of indexed addressing +#CHECK: srlg %r0,%r0,0(%r1,%r2) + + srlg %r0,%r0,-524289 + srlg %r0,%r0,524288 + srlg %r0,%r0,0(%r0) + srlg %r0,%r0,0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-st-01.s b/test/MC/SystemZ/insn-st-01.s new file mode 100644 index 000000000000..0b5fdb682c68 --- /dev/null +++ b/test/MC/SystemZ/insn-st-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: st %r0, 0 # encoding: [0x50,0x00,0x00,0x00] +#CHECK: st %r0, 4095 # encoding: [0x50,0x00,0x0f,0xff] +#CHECK: st %r0, 0(%r1) # encoding: [0x50,0x00,0x10,0x00] +#CHECK: st %r0, 0(%r15) # encoding: [0x50,0x00,0xf0,0x00] +#CHECK: st %r0, 4095(%r1,%r15) # encoding: [0x50,0x01,0xff,0xff] +#CHECK: st %r0, 4095(%r15,%r1) # encoding: [0x50,0x0f,0x1f,0xff] +#CHECK: st %r15, 0 # encoding: [0x50,0xf0,0x00,0x00] + + st %r0, 0 + st %r0, 4095 + st %r0, 0(%r1) + st %r0, 0(%r15) + st %r0, 4095(%r1,%r15) + st %r0, 4095(%r15,%r1) + st %r15, 0 diff --git a/test/MC/SystemZ/insn-st-02.s b/test/MC/SystemZ/insn-st-02.s new file mode 100644 index 000000000000..63e547a92bc4 --- /dev/null +++ b/test/MC/SystemZ/insn-st-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: st %r0, -1 +#CHECK: error: invalid operand +#CHECK: st %r0, 4096 + + st %r0, -1 + st %r0, 4096 diff --git a/test/MC/SystemZ/insn-stc-01.s b/test/MC/SystemZ/insn-stc-01.s new file mode 100644 index 000000000000..563f8914b643 --- /dev/null +++ b/test/MC/SystemZ/insn-stc-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stc %r0, 0 # encoding: [0x42,0x00,0x00,0x00] +#CHECK: stc %r0, 4095 # encoding: [0x42,0x00,0x0f,0xff] +#CHECK: stc %r0, 0(%r1) # encoding: [0x42,0x00,0x10,0x00] +#CHECK: stc %r0, 0(%r15) # encoding: [0x42,0x00,0xf0,0x00] +#CHECK: stc %r0, 4095(%r1,%r15) # encoding: [0x42,0x01,0xff,0xff] +#CHECK: stc %r0, 4095(%r15,%r1) # encoding: [0x42,0x0f,0x1f,0xff] +#CHECK: stc %r15, 0 # encoding: [0x42,0xf0,0x00,0x00] + + stc %r0, 0 + stc %r0, 4095 + stc %r0, 0(%r1) + stc %r0, 0(%r15) + stc %r0, 4095(%r1,%r15) + stc %r0, 4095(%r15,%r1) + stc %r15, 0 diff --git a/test/MC/SystemZ/insn-stc-02.s b/test/MC/SystemZ/insn-stc-02.s new file mode 100644 index 000000000000..aa7dcb29df6f --- /dev/null +++ b/test/MC/SystemZ/insn-stc-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: stc %r0, -1 +#CHECK: error: invalid operand +#CHECK: stc %r0, 4096 + + stc %r0, -1 + stc %r0, 4096 diff --git a/test/MC/SystemZ/insn-stcy-01.s b/test/MC/SystemZ/insn-stcy-01.s new file mode 100644 index 000000000000..acc7ac5996e2 --- /dev/null +++ b/test/MC/SystemZ/insn-stcy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stcy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x72] +#CHECK: stcy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x72] +#CHECK: stcy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x72] +#CHECK: stcy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x72] +#CHECK: stcy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x72] +#CHECK: stcy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x72] +#CHECK: stcy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x72] +#CHECK: stcy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x72] +#CHECK: stcy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x72] +#CHECK: stcy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x72] + + stcy %r0, -524288 + stcy %r0, -1 + stcy %r0, 0 + stcy %r0, 1 + stcy %r0, 524287 + stcy %r0, 0(%r1) + stcy %r0, 0(%r15) + stcy %r0, 524287(%r1,%r15) + stcy %r0, 524287(%r15,%r1) + stcy %r15, 0 diff --git a/test/MC/SystemZ/insn-stcy-02.s b/test/MC/SystemZ/insn-stcy-02.s new file mode 100644 index 000000000000..cbd7f7abdec9 --- /dev/null +++ b/test/MC/SystemZ/insn-stcy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: stcy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: stcy %r0, 524288 + + stcy %r0, -524289 + stcy %r0, 524288 diff --git a/test/MC/SystemZ/insn-std-01.s b/test/MC/SystemZ/insn-std-01.s new file mode 100644 index 000000000000..6867df8bb167 --- /dev/null +++ b/test/MC/SystemZ/insn-std-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: std %f0, 0 # encoding: [0x60,0x00,0x00,0x00] +#CHECK: std %f0, 4095 # encoding: [0x60,0x00,0x0f,0xff] +#CHECK: std %f0, 0(%r1) # encoding: [0x60,0x00,0x10,0x00] +#CHECK: std %f0, 0(%r15) # encoding: [0x60,0x00,0xf0,0x00] +#CHECK: std %f0, 4095(%r1,%r15) # encoding: [0x60,0x01,0xff,0xff] +#CHECK: std %f0, 4095(%r15,%r1) # encoding: [0x60,0x0f,0x1f,0xff] +#CHECK: std %f15, 0 # encoding: [0x60,0xf0,0x00,0x00] + + std %f0, 0 + std %f0, 4095 + std %f0, 0(%r1) + std %f0, 0(%r15) + std %f0, 4095(%r1,%r15) + std %f0, 4095(%r15,%r1) + std %f15, 0 diff --git a/test/MC/SystemZ/insn-std-02.s b/test/MC/SystemZ/insn-std-02.s new file mode 100644 index 000000000000..62bb9eb7fac4 --- /dev/null +++ b/test/MC/SystemZ/insn-std-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: std %f0, -1 +#CHECK: error: invalid operand +#CHECK: std %f0, 4096 + + std %f0, -1 + std %f0, 4096 diff --git a/test/MC/SystemZ/insn-stdy-01.s b/test/MC/SystemZ/insn-stdy-01.s new file mode 100644 index 000000000000..1ae9a7d3d01b --- /dev/null +++ b/test/MC/SystemZ/insn-stdy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stdy %f0, -524288 # encoding: [0xed,0x00,0x00,0x00,0x80,0x67] +#CHECK: stdy %f0, -1 # encoding: [0xed,0x00,0x0f,0xff,0xff,0x67] +#CHECK: stdy %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x67] +#CHECK: stdy %f0, 1 # encoding: [0xed,0x00,0x00,0x01,0x00,0x67] +#CHECK: stdy %f0, 524287 # encoding: [0xed,0x00,0x0f,0xff,0x7f,0x67] +#CHECK: stdy %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x67] +#CHECK: stdy %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x67] +#CHECK: stdy %f0, 524287(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x7f,0x67] +#CHECK: stdy %f0, 524287(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x7f,0x67] +#CHECK: stdy %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x67] + + stdy %f0, -524288 + stdy %f0, -1 + stdy %f0, 0 + stdy %f0, 1 + stdy %f0, 524287 + stdy %f0, 0(%r1) + stdy %f0, 0(%r15) + stdy %f0, 524287(%r1,%r15) + stdy %f0, 524287(%r15,%r1) + stdy %f15, 0 diff --git a/test/MC/SystemZ/insn-stdy-02.s b/test/MC/SystemZ/insn-stdy-02.s new file mode 100644 index 000000000000..f9a09a59f1c8 --- /dev/null +++ b/test/MC/SystemZ/insn-stdy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: stdy %f0, -524289 +#CHECK: error: invalid operand +#CHECK: stdy %f0, 524288 + + stdy %f0, -524289 + stdy %f0, 524288 diff --git a/test/MC/SystemZ/insn-ste-01.s b/test/MC/SystemZ/insn-ste-01.s new file mode 100644 index 000000000000..8e245df98579 --- /dev/null +++ b/test/MC/SystemZ/insn-ste-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ste %f0, 0 # encoding: [0x70,0x00,0x00,0x00] +#CHECK: ste %f0, 4095 # encoding: [0x70,0x00,0x0f,0xff] +#CHECK: ste %f0, 0(%r1) # encoding: [0x70,0x00,0x10,0x00] +#CHECK: ste %f0, 0(%r15) # encoding: [0x70,0x00,0xf0,0x00] +#CHECK: ste %f0, 4095(%r1,%r15) # encoding: [0x70,0x01,0xff,0xff] +#CHECK: ste %f0, 4095(%r15,%r1) # encoding: [0x70,0x0f,0x1f,0xff] +#CHECK: ste %f15, 0 # encoding: [0x70,0xf0,0x00,0x00] + + ste %f0, 0 + ste %f0, 4095 + ste %f0, 0(%r1) + ste %f0, 0(%r15) + ste %f0, 4095(%r1,%r15) + ste %f0, 4095(%r15,%r1) + ste %f15, 0 diff --git a/test/MC/SystemZ/insn-ste-02.s b/test/MC/SystemZ/insn-ste-02.s new file mode 100644 index 000000000000..acc50eada847 --- /dev/null +++ b/test/MC/SystemZ/insn-ste-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: ste %f0, -1 +#CHECK: error: invalid operand +#CHECK: ste %f0, 4096 + + ste %f0, -1 + ste %f0, 4096 diff --git a/test/MC/SystemZ/insn-stey-01.s b/test/MC/SystemZ/insn-stey-01.s new file mode 100644 index 000000000000..1f8259365086 --- /dev/null +++ b/test/MC/SystemZ/insn-stey-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stey %f0, -524288 # encoding: [0xed,0x00,0x00,0x00,0x80,0x66] +#CHECK: stey %f0, -1 # encoding: [0xed,0x00,0x0f,0xff,0xff,0x66] +#CHECK: stey %f0, 0 # encoding: [0xed,0x00,0x00,0x00,0x00,0x66] +#CHECK: stey %f0, 1 # encoding: [0xed,0x00,0x00,0x01,0x00,0x66] +#CHECK: stey %f0, 524287 # encoding: [0xed,0x00,0x0f,0xff,0x7f,0x66] +#CHECK: stey %f0, 0(%r1) # encoding: [0xed,0x00,0x10,0x00,0x00,0x66] +#CHECK: stey %f0, 0(%r15) # encoding: [0xed,0x00,0xf0,0x00,0x00,0x66] +#CHECK: stey %f0, 524287(%r1,%r15) # encoding: [0xed,0x01,0xff,0xff,0x7f,0x66] +#CHECK: stey %f0, 524287(%r15,%r1) # encoding: [0xed,0x0f,0x1f,0xff,0x7f,0x66] +#CHECK: stey %f15, 0 # encoding: [0xed,0xf0,0x00,0x00,0x00,0x66] + + stey %f0, -524288 + stey %f0, -1 + stey %f0, 0 + stey %f0, 1 + stey %f0, 524287 + stey %f0, 0(%r1) + stey %f0, 0(%r15) + stey %f0, 524287(%r1,%r15) + stey %f0, 524287(%r15,%r1) + stey %f15, 0 diff --git a/test/MC/SystemZ/insn-stey-02.s b/test/MC/SystemZ/insn-stey-02.s new file mode 100644 index 000000000000..203b016e314a --- /dev/null +++ b/test/MC/SystemZ/insn-stey-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: stey %f0, -524289 +#CHECK: error: invalid operand +#CHECK: stey %f0, 524288 + + stey %f0, -524289 + stey %f0, 524288 diff --git a/test/MC/SystemZ/insn-stg-01.s b/test/MC/SystemZ/insn-stg-01.s new file mode 100644 index 000000000000..e8508d9f4e53 --- /dev/null +++ b/test/MC/SystemZ/insn-stg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x24] +#CHECK: stg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x24] +#CHECK: stg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x24] +#CHECK: stg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x24] +#CHECK: stg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x24] +#CHECK: stg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x24] +#CHECK: stg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x24] +#CHECK: stg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x24] +#CHECK: stg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x24] +#CHECK: stg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x24] + + stg %r0, -524288 + stg %r0, -1 + stg %r0, 0 + stg %r0, 1 + stg %r0, 524287 + stg %r0, 0(%r1) + stg %r0, 0(%r15) + stg %r0, 524287(%r1,%r15) + stg %r0, 524287(%r15,%r1) + stg %r15, 0 diff --git a/test/MC/SystemZ/insn-stg-02.s b/test/MC/SystemZ/insn-stg-02.s new file mode 100644 index 000000000000..1214ad1998c5 --- /dev/null +++ b/test/MC/SystemZ/insn-stg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: stg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: stg %r0, 524288 + + stg %r0, -524289 + stg %r0, 524288 diff --git a/test/MC/SystemZ/insn-stgrl-01.s b/test/MC/SystemZ/insn-stgrl-01.s new file mode 100644 index 000000000000..729b01dc115b --- /dev/null +++ b/test/MC/SystemZ/insn-stgrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stgrl %r0, 2864434397 # encoding: [0xc4,0x0b,0x55,0x5d,0xe6,0x6e] +#CHECK: stgrl %r15, 2864434397 # encoding: [0xc4,0xfb,0x55,0x5d,0xe6,0x6e] + + stgrl %r0,0xaabbccdd + stgrl %r15,0xaabbccdd + +#CHECK: stgrl %r0, foo # encoding: [0xc4,0x0b,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: stgrl %r15, foo # encoding: [0xc4,0xfb,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + stgrl %r0,foo + stgrl %r15,foo + +#CHECK: stgrl %r3, bar+100 # encoding: [0xc4,0x3b,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: stgrl %r4, bar+100 # encoding: [0xc4,0x4b,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + stgrl %r3,bar+100 + stgrl %r4,bar+100 + +#CHECK: stgrl %r7, frob@PLT # encoding: [0xc4,0x7b,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: stgrl %r8, frob@PLT # encoding: [0xc4,0x8b,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + stgrl %r7,frob@PLT + stgrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-sth-01.s b/test/MC/SystemZ/insn-sth-01.s new file mode 100644 index 000000000000..0dabe345b59e --- /dev/null +++ b/test/MC/SystemZ/insn-sth-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sth %r0, 0 # encoding: [0x40,0x00,0x00,0x00] +#CHECK: sth %r0, 4095 # encoding: [0x40,0x00,0x0f,0xff] +#CHECK: sth %r0, 0(%r1) # encoding: [0x40,0x00,0x10,0x00] +#CHECK: sth %r0, 0(%r15) # encoding: [0x40,0x00,0xf0,0x00] +#CHECK: sth %r0, 4095(%r1,%r15) # encoding: [0x40,0x01,0xff,0xff] +#CHECK: sth %r0, 4095(%r15,%r1) # encoding: [0x40,0x0f,0x1f,0xff] +#CHECK: sth %r15, 0 # encoding: [0x40,0xf0,0x00,0x00] + + sth %r0, 0 + sth %r0, 4095 + sth %r0, 0(%r1) + sth %r0, 0(%r15) + sth %r0, 4095(%r1,%r15) + sth %r0, 4095(%r15,%r1) + sth %r15, 0 diff --git a/test/MC/SystemZ/insn-sth-02.s b/test/MC/SystemZ/insn-sth-02.s new file mode 100644 index 000000000000..e73c28917b0a --- /dev/null +++ b/test/MC/SystemZ/insn-sth-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sth %r0, -1 +#CHECK: error: invalid operand +#CHECK: sth %r0, 4096 + + sth %r0, -1 + sth %r0, 4096 diff --git a/test/MC/SystemZ/insn-sthrl-01.s b/test/MC/SystemZ/insn-sthrl-01.s new file mode 100644 index 000000000000..0bcdbd4bc8f9 --- /dev/null +++ b/test/MC/SystemZ/insn-sthrl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sthrl %r0, 2864434397 # encoding: [0xc4,0x07,0x55,0x5d,0xe6,0x6e] +#CHECK: sthrl %r15, 2864434397 # encoding: [0xc4,0xf7,0x55,0x5d,0xe6,0x6e] + + sthrl %r0,0xaabbccdd + sthrl %r15,0xaabbccdd + +#CHECK: sthrl %r0, foo # encoding: [0xc4,0x07,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: sthrl %r15, foo # encoding: [0xc4,0xf7,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + sthrl %r0,foo + sthrl %r15,foo + +#CHECK: sthrl %r3, bar+100 # encoding: [0xc4,0x37,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: sthrl %r4, bar+100 # encoding: [0xc4,0x47,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + sthrl %r3,bar+100 + sthrl %r4,bar+100 + +#CHECK: sthrl %r7, frob@PLT # encoding: [0xc4,0x77,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: sthrl %r8, frob@PLT # encoding: [0xc4,0x87,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + sthrl %r7,frob@PLT + sthrl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-sthy-01.s b/test/MC/SystemZ/insn-sthy-01.s new file mode 100644 index 000000000000..259c5e1c82f5 --- /dev/null +++ b/test/MC/SystemZ/insn-sthy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sthy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x70] +#CHECK: sthy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x70] +#CHECK: sthy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x70] +#CHECK: sthy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x70] +#CHECK: sthy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x70] +#CHECK: sthy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x70] +#CHECK: sthy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x70] +#CHECK: sthy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x70] +#CHECK: sthy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x70] +#CHECK: sthy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x70] + + sthy %r0, -524288 + sthy %r0, -1 + sthy %r0, 0 + sthy %r0, 1 + sthy %r0, 524287 + sthy %r0, 0(%r1) + sthy %r0, 0(%r15) + sthy %r0, 524287(%r1,%r15) + sthy %r0, 524287(%r15,%r1) + sthy %r15, 0 diff --git a/test/MC/SystemZ/insn-sthy-02.s b/test/MC/SystemZ/insn-sthy-02.s new file mode 100644 index 000000000000..0ad547b4b813 --- /dev/null +++ b/test/MC/SystemZ/insn-sthy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sthy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: sthy %r0, 524288 + + sthy %r0, -524289 + sthy %r0, 524288 diff --git a/test/MC/SystemZ/insn-stmg-01.s b/test/MC/SystemZ/insn-stmg-01.s new file mode 100644 index 000000000000..d1890144227c --- /dev/null +++ b/test/MC/SystemZ/insn-stmg-01.s @@ -0,0 +1,29 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: stmg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x24] +#CHECK: stmg %r0, %r15, 0 # encoding: [0xeb,0x0f,0x00,0x00,0x00,0x24] +#CHECK: stmg %r14, %r15, 0 # encoding: [0xeb,0xef,0x00,0x00,0x00,0x24] +#CHECK: stmg %r15, %r15, 0 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x24] +#CHECK: stmg %r0, %r0, -524288 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x24] +#CHECK: stmg %r0, %r0, -1 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x24] +#CHECK: stmg %r0, %r0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x24] +#CHECK: stmg %r0, %r0, 1 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x24] +#CHECK: stmg %r0, %r0, 524287 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x24] +#CHECK: stmg %r0, %r0, 0(%r1) # encoding: [0xeb,0x00,0x10,0x00,0x00,0x24] +#CHECK: stmg %r0, %r0, 0(%r15) # encoding: [0xeb,0x00,0xf0,0x00,0x00,0x24] +#CHECK: stmg %r0, %r0, 524287(%r1) # encoding: [0xeb,0x00,0x1f,0xff,0x7f,0x24] +#CHECK: stmg %r0, %r0, 524287(%r15) # encoding: [0xeb,0x00,0xff,0xff,0x7f,0x24] + + stmg %r0,%r0,0 + stmg %r0,%r15,0 + stmg %r14,%r15,0 + stmg %r15,%r15,0 + stmg %r0,%r0,-524288 + stmg %r0,%r0,-1 + stmg %r0,%r0,0 + stmg %r0,%r0,1 + stmg %r0,%r0,524287 + stmg %r0,%r0,0(%r1) + stmg %r0,%r0,0(%r15) + stmg %r0,%r0,524287(%r1) + stmg %r0,%r0,524287(%r15) diff --git a/test/MC/SystemZ/insn-stmg-02.s b/test/MC/SystemZ/insn-stmg-02.s new file mode 100644 index 000000000000..342c38aec99f --- /dev/null +++ b/test/MC/SystemZ/insn-stmg-02.s @@ -0,0 +1,13 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: stmg %r0, %r0, -524289 +#CHECK: error: invalid operand +#CHECK: stmg %r0, %r0, 524288 +#CHECK: error: invalid use of indexed addressing +#CHECK: stmg %r0, %r0, 0(%r1,%r2) + + stmg %r0, %r0, -524289 + stmg %r0, %r0, 524288 + stmg %r0, %r0, 0(%r1,%r2) diff --git a/test/MC/SystemZ/insn-strl-01.s b/test/MC/SystemZ/insn-strl-01.s new file mode 100644 index 000000000000..84bd41f4c0c1 --- /dev/null +++ b/test/MC/SystemZ/insn-strl-01.s @@ -0,0 +1,31 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: strl %r0, 2864434397 # encoding: [0xc4,0x0f,0x55,0x5d,0xe6,0x6e] +#CHECK: strl %r15, 2864434397 # encoding: [0xc4,0xff,0x55,0x5d,0xe6,0x6e] + + strl %r0,0xaabbccdd + strl %r15,0xaabbccdd + +#CHECK: strl %r0, foo # encoding: [0xc4,0x0f,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL +#CHECK: strl %r15, foo # encoding: [0xc4,0xff,A,A,A,A] +# fixup A - offset: 2, value: foo+2, kind: FK_390_PC32DBL + + strl %r0,foo + strl %r15,foo + +#CHECK: strl %r3, bar+100 # encoding: [0xc4,0x3f,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL +#CHECK: strl %r4, bar+100 # encoding: [0xc4,0x4f,A,A,A,A] +# fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC32DBL + + strl %r3,bar+100 + strl %r4,bar+100 + +#CHECK: strl %r7, frob@PLT # encoding: [0xc4,0x7f,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL +#CHECK: strl %r8, frob@PLT # encoding: [0xc4,0x8f,A,A,A,A] +# fixup A - offset: 2, value: frob@PLT+2, kind: FK_390_PC32DBL + + strl %r7,frob@PLT + strl %r8,frob@PLT diff --git a/test/MC/SystemZ/insn-strv-01.s b/test/MC/SystemZ/insn-strv-01.s new file mode 100644 index 000000000000..6a818a8b9eaf --- /dev/null +++ b/test/MC/SystemZ/insn-strv-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: strv %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x3e] +#CHECK: strv %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x3e] +#CHECK: strv %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x3e] +#CHECK: strv %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x3e] +#CHECK: strv %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x3e] +#CHECK: strv %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x3e] +#CHECK: strv %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x3e] +#CHECK: strv %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x3e] +#CHECK: strv %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x3e] +#CHECK: strv %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x3e] + + strv %r0,-524288 + strv %r0,-1 + strv %r0,0 + strv %r0,1 + strv %r0,524287 + strv %r0,0(%r1) + strv %r0,0(%r15) + strv %r0,524287(%r1,%r15) + strv %r0,524287(%r15,%r1) + strv %r15,0 diff --git a/test/MC/SystemZ/insn-strv-02.s b/test/MC/SystemZ/insn-strv-02.s new file mode 100644 index 000000000000..24460edfed35 --- /dev/null +++ b/test/MC/SystemZ/insn-strv-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: strv %r0, -524289 +#CHECK: error: invalid operand +#CHECK: strv %r0, 524288 + + strv %r0, -524289 + strv %r0, 524288 diff --git a/test/MC/SystemZ/insn-strvg-01.s b/test/MC/SystemZ/insn-strvg-01.s new file mode 100644 index 000000000000..6a4d49d3bcc5 --- /dev/null +++ b/test/MC/SystemZ/insn-strvg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: strvg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x2f] +#CHECK: strvg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x2f] +#CHECK: strvg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x2f] +#CHECK: strvg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x2f] +#CHECK: strvg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x2f] +#CHECK: strvg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x2f] +#CHECK: strvg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x2f] +#CHECK: strvg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x2f] +#CHECK: strvg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x2f] +#CHECK: strvg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x2f] + + strvg %r0,-524288 + strvg %r0,-1 + strvg %r0,0 + strvg %r0,1 + strvg %r0,524287 + strvg %r0,0(%r1) + strvg %r0,0(%r15) + strvg %r0,524287(%r1,%r15) + strvg %r0,524287(%r15,%r1) + strvg %r15,0 diff --git a/test/MC/SystemZ/insn-strvg-02.s b/test/MC/SystemZ/insn-strvg-02.s new file mode 100644 index 000000000000..ebb0d5bffba3 --- /dev/null +++ b/test/MC/SystemZ/insn-strvg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: strvg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: strvg %r0, 524288 + + strvg %r0, -524289 + strvg %r0, 524288 diff --git a/test/MC/SystemZ/insn-sty-01.s b/test/MC/SystemZ/insn-sty-01.s new file mode 100644 index 000000000000..1ca2d5c55027 --- /dev/null +++ b/test/MC/SystemZ/insn-sty-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sty %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x50] +#CHECK: sty %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x50] +#CHECK: sty %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x50] +#CHECK: sty %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x50] +#CHECK: sty %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x50] +#CHECK: sty %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x50] +#CHECK: sty %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x50] +#CHECK: sty %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x50] +#CHECK: sty %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x50] +#CHECK: sty %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x50] + + sty %r0, -524288 + sty %r0, -1 + sty %r0, 0 + sty %r0, 1 + sty %r0, 524287 + sty %r0, 0(%r1) + sty %r0, 0(%r15) + sty %r0, 524287(%r1,%r15) + sty %r0, 524287(%r15,%r1) + sty %r15, 0 diff --git a/test/MC/SystemZ/insn-sty-02.s b/test/MC/SystemZ/insn-sty-02.s new file mode 100644 index 000000000000..fea7c089ab94 --- /dev/null +++ b/test/MC/SystemZ/insn-sty-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sty %r0, -524289 +#CHECK: error: invalid operand +#CHECK: sty %r0, 524288 + + sty %r0, -524289 + sty %r0, 524288 diff --git a/test/MC/SystemZ/insn-sxbr-01.s b/test/MC/SystemZ/insn-sxbr-01.s new file mode 100644 index 000000000000..e7f4ed25bf46 --- /dev/null +++ b/test/MC/SystemZ/insn-sxbr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sxbr %f0, %f0 # encoding: [0xb3,0x4b,0x00,0x00] +#CHECK: sxbr %f0, %f13 # encoding: [0xb3,0x4b,0x00,0x0d] +#CHECK: sxbr %f8, %f8 # encoding: [0xb3,0x4b,0x00,0x88] +#CHECK: sxbr %f13, %f0 # encoding: [0xb3,0x4b,0x00,0xd0] + + sxbr %f0, %f0 + sxbr %f0, %f13 + sxbr %f8, %f8 + sxbr %f13, %f0 diff --git a/test/MC/SystemZ/insn-sxbr-02.s b/test/MC/SystemZ/insn-sxbr-02.s new file mode 100644 index 000000000000..397238bd3926 --- /dev/null +++ b/test/MC/SystemZ/insn-sxbr-02.s @@ -0,0 +1,17 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: sxbr %f0, %f2 +#CHECK: error: invalid register +#CHECK: sxbr %f0, %f14 +#CHECK: error: invalid register +#CHECK: sxbr %f2, %f0 +#CHECK: error: invalid register +#CHECK: sxbr %f14, %f0 + + sxbr %f0, %f2 + sxbr %f0, %f14 + sxbr %f2, %f0 + sxbr %f14, %f0 + diff --git a/test/MC/SystemZ/insn-sy-01.s b/test/MC/SystemZ/insn-sy-01.s new file mode 100644 index 000000000000..bc56bd790ecc --- /dev/null +++ b/test/MC/SystemZ/insn-sy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: sy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x5b] +#CHECK: sy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x5b] +#CHECK: sy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x5b] +#CHECK: sy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x5b] +#CHECK: sy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x5b] +#CHECK: sy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x5b] +#CHECK: sy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x5b] +#CHECK: sy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x5b] +#CHECK: sy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x5b] +#CHECK: sy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x5b] + + sy %r0, -524288 + sy %r0, -1 + sy %r0, 0 + sy %r0, 1 + sy %r0, 524287 + sy %r0, 0(%r1) + sy %r0, 0(%r15) + sy %r0, 524287(%r1,%r15) + sy %r0, 524287(%r15,%r1) + sy %r15, 0 diff --git a/test/MC/SystemZ/insn-sy-02.s b/test/MC/SystemZ/insn-sy-02.s new file mode 100644 index 000000000000..7d64ca922d12 --- /dev/null +++ b/test/MC/SystemZ/insn-sy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: sy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: sy %r0, 524288 + + sy %r0, -524289 + sy %r0, 524288 diff --git a/test/MC/SystemZ/insn-x-01.s b/test/MC/SystemZ/insn-x-01.s new file mode 100644 index 000000000000..a2e3a2605a28 --- /dev/null +++ b/test/MC/SystemZ/insn-x-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: x %r0, 0 # encoding: [0x57,0x00,0x00,0x00] +#CHECK: x %r0, 4095 # encoding: [0x57,0x00,0x0f,0xff] +#CHECK: x %r0, 0(%r1) # encoding: [0x57,0x00,0x10,0x00] +#CHECK: x %r0, 0(%r15) # encoding: [0x57,0x00,0xf0,0x00] +#CHECK: x %r0, 4095(%r1,%r15) # encoding: [0x57,0x01,0xff,0xff] +#CHECK: x %r0, 4095(%r15,%r1) # encoding: [0x57,0x0f,0x1f,0xff] +#CHECK: x %r15, 0 # encoding: [0x57,0xf0,0x00,0x00] + + x %r0, 0 + x %r0, 4095 + x %r0, 0(%r1) + x %r0, 0(%r15) + x %r0, 4095(%r1,%r15) + x %r0, 4095(%r15,%r1) + x %r15, 0 diff --git a/test/MC/SystemZ/insn-x-02.s b/test/MC/SystemZ/insn-x-02.s new file mode 100644 index 000000000000..371974046416 --- /dev/null +++ b/test/MC/SystemZ/insn-x-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: x %r0, -1 +#CHECK: error: invalid operand +#CHECK: x %r0, 4096 + + x %r0, -1 + x %r0, 4096 diff --git a/test/MC/SystemZ/insn-xg-01.s b/test/MC/SystemZ/insn-xg-01.s new file mode 100644 index 000000000000..6cf5e7e4b48c --- /dev/null +++ b/test/MC/SystemZ/insn-xg-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xg %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x82] +#CHECK: xg %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x82] +#CHECK: xg %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x82] +#CHECK: xg %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x82] +#CHECK: xg %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x82] +#CHECK: xg %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x82] +#CHECK: xg %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x82] +#CHECK: xg %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x82] +#CHECK: xg %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x82] +#CHECK: xg %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x82] + + xg %r0, -524288 + xg %r0, -1 + xg %r0, 0 + xg %r0, 1 + xg %r0, 524287 + xg %r0, 0(%r1) + xg %r0, 0(%r15) + xg %r0, 524287(%r1,%r15) + xg %r0, 524287(%r15,%r1) + xg %r15, 0 diff --git a/test/MC/SystemZ/insn-xg-02.s b/test/MC/SystemZ/insn-xg-02.s new file mode 100644 index 000000000000..0505b9facfe6 --- /dev/null +++ b/test/MC/SystemZ/insn-xg-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: xg %r0, -524289 +#CHECK: error: invalid operand +#CHECK: xg %r0, 524288 + + xg %r0, -524289 + xg %r0, 524288 diff --git a/test/MC/SystemZ/insn-xgr-01.s b/test/MC/SystemZ/insn-xgr-01.s new file mode 100644 index 000000000000..1a5a6d6e1c6a --- /dev/null +++ b/test/MC/SystemZ/insn-xgr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xgr %r0, %r0 # encoding: [0xb9,0x82,0x00,0x00] +#CHECK: xgr %r0, %r15 # encoding: [0xb9,0x82,0x00,0x0f] +#CHECK: xgr %r15, %r0 # encoding: [0xb9,0x82,0x00,0xf0] +#CHECK: xgr %r7, %r8 # encoding: [0xb9,0x82,0x00,0x78] + + xgr %r0,%r0 + xgr %r0,%r15 + xgr %r15,%r0 + xgr %r7,%r8 diff --git a/test/MC/SystemZ/insn-xi-01.s b/test/MC/SystemZ/insn-xi-01.s new file mode 100644 index 000000000000..2a7670c732ca --- /dev/null +++ b/test/MC/SystemZ/insn-xi-01.s @@ -0,0 +1,17 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xi 0, 0 # encoding: [0x97,0x00,0x00,0x00] +#CHECK: xi 4095, 0 # encoding: [0x97,0x00,0x0f,0xff] +#CHECK: xi 0, 255 # encoding: [0x97,0xff,0x00,0x00] +#CHECK: xi 0(%r1), 42 # encoding: [0x97,0x2a,0x10,0x00] +#CHECK: xi 0(%r15), 42 # encoding: [0x97,0x2a,0xf0,0x00] +#CHECK: xi 4095(%r1), 42 # encoding: [0x97,0x2a,0x1f,0xff] +#CHECK: xi 4095(%r15), 42 # encoding: [0x97,0x2a,0xff,0xff] + + xi 0, 0 + xi 4095, 0 + xi 0, 255 + xi 0(%r1), 42 + xi 0(%r15), 42 + xi 4095(%r1), 42 + xi 4095(%r15), 42 diff --git a/test/MC/SystemZ/insn-xi-02.s b/test/MC/SystemZ/insn-xi-02.s new file mode 100644 index 000000000000..a1ce668a6931 --- /dev/null +++ b/test/MC/SystemZ/insn-xi-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: xi -1, 0 +#CHECK: error: invalid operand +#CHECK: xi 4096, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: xi 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: xi 0, -1 +#CHECK: error: invalid operand +#CHECK: xi 0, 256 + + xi -1, 0 + xi 4096, 0 + xi 0(%r1,%r2), 0 + xi 0, -1 + xi 0, 256 diff --git a/test/MC/SystemZ/insn-xihf-01.s b/test/MC/SystemZ/insn-xihf-01.s new file mode 100644 index 000000000000..ad2ec1946a09 --- /dev/null +++ b/test/MC/SystemZ/insn-xihf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xihf %r0, 0 # encoding: [0xc0,0x06,0x00,0x00,0x00,0x00] +#CHECK: xihf %r0, 4294967295 # encoding: [0xc0,0x06,0xff,0xff,0xff,0xff] +#CHECK: xihf %r15, 0 # encoding: [0xc0,0xf6,0x00,0x00,0x00,0x00] + + xihf %r0, 0 + xihf %r0, 0xffffffff + xihf %r15, 0 diff --git a/test/MC/SystemZ/insn-xihf-02.s b/test/MC/SystemZ/insn-xihf-02.s new file mode 100644 index 000000000000..945993b82246 --- /dev/null +++ b/test/MC/SystemZ/insn-xihf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: xihf %r0, -1 +#CHECK: error: invalid operand +#CHECK: xihf %r0, 1 << 32 + + xihf %r0, -1 + xihf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-xilf-01.s b/test/MC/SystemZ/insn-xilf-01.s new file mode 100644 index 000000000000..475e57332103 --- /dev/null +++ b/test/MC/SystemZ/insn-xilf-01.s @@ -0,0 +1,9 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xilf %r0, 0 # encoding: [0xc0,0x07,0x00,0x00,0x00,0x00] +#CHECK: xilf %r0, 4294967295 # encoding: [0xc0,0x07,0xff,0xff,0xff,0xff] +#CHECK: xilf %r15, 0 # encoding: [0xc0,0xf7,0x00,0x00,0x00,0x00] + + xilf %r0, 0 + xilf %r0, 0xffffffff + xilf %r15, 0 diff --git a/test/MC/SystemZ/insn-xilf-02.s b/test/MC/SystemZ/insn-xilf-02.s new file mode 100644 index 000000000000..df02b7cc9477 --- /dev/null +++ b/test/MC/SystemZ/insn-xilf-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: xilf %r0, -1 +#CHECK: error: invalid operand +#CHECK: xilf %r0, 1 << 32 + + xilf %r0, -1 + xilf %r0, 1 << 32 diff --git a/test/MC/SystemZ/insn-xiy-01.s b/test/MC/SystemZ/insn-xiy-01.s new file mode 100644 index 000000000000..c329ce057260 --- /dev/null +++ b/test/MC/SystemZ/insn-xiy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xiy -524288, 0 # encoding: [0xeb,0x00,0x00,0x00,0x80,0x57] +#CHECK: xiy -1, 0 # encoding: [0xeb,0x00,0x0f,0xff,0xff,0x57] +#CHECK: xiy 0, 0 # encoding: [0xeb,0x00,0x00,0x00,0x00,0x57] +#CHECK: xiy 1, 0 # encoding: [0xeb,0x00,0x00,0x01,0x00,0x57] +#CHECK: xiy 524287, 0 # encoding: [0xeb,0x00,0x0f,0xff,0x7f,0x57] +#CHECK: xiy 0, 255 # encoding: [0xeb,0xff,0x00,0x00,0x00,0x57] +#CHECK: xiy 0(%r1), 42 # encoding: [0xeb,0x2a,0x10,0x00,0x00,0x57] +#CHECK: xiy 0(%r15), 42 # encoding: [0xeb,0x2a,0xf0,0x00,0x00,0x57] +#CHECK: xiy 524287(%r1), 42 # encoding: [0xeb,0x2a,0x1f,0xff,0x7f,0x57] +#CHECK: xiy 524287(%r15), 42 # encoding: [0xeb,0x2a,0xff,0xff,0x7f,0x57] + + xiy -524288, 0 + xiy -1, 0 + xiy 0, 0 + xiy 1, 0 + xiy 524287, 0 + xiy 0, 255 + xiy 0(%r1), 42 + xiy 0(%r15), 42 + xiy 524287(%r1), 42 + xiy 524287(%r15), 42 diff --git a/test/MC/SystemZ/insn-xiy-02.s b/test/MC/SystemZ/insn-xiy-02.s new file mode 100644 index 000000000000..519c26c9659c --- /dev/null +++ b/test/MC/SystemZ/insn-xiy-02.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: xiy -524289, 0 +#CHECK: error: invalid operand +#CHECK: xiy 524288, 0 +#CHECK: error: invalid use of indexed addressing +#CHECK: xiy 0(%r1,%r2), 0 +#CHECK: error: invalid operand +#CHECK: xiy 0, -1 +#CHECK: error: invalid operand +#CHECK: xiy 0, 256 + + xiy -524289, 0 + xiy 524288, 0 + xiy 0(%r1,%r2), 0 + xiy 0, -1 + xiy 0, 256 diff --git a/test/MC/SystemZ/insn-xr-01.s b/test/MC/SystemZ/insn-xr-01.s new file mode 100644 index 000000000000..471e6a63d6fa --- /dev/null +++ b/test/MC/SystemZ/insn-xr-01.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xr %r0, %r0 # encoding: [0x17,0x00] +#CHECK: xr %r0, %r15 # encoding: [0x17,0x0f] +#CHECK: xr %r15, %r0 # encoding: [0x17,0xf0] +#CHECK: xr %r7, %r8 # encoding: [0x17,0x78] + + xr %r0,%r0 + xr %r0,%r15 + xr %r15,%r0 + xr %r7,%r8 diff --git a/test/MC/SystemZ/insn-xy-01.s b/test/MC/SystemZ/insn-xy-01.s new file mode 100644 index 000000000000..132db04bf560 --- /dev/null +++ b/test/MC/SystemZ/insn-xy-01.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: xy %r0, -524288 # encoding: [0xe3,0x00,0x00,0x00,0x80,0x57] +#CHECK: xy %r0, -1 # encoding: [0xe3,0x00,0x0f,0xff,0xff,0x57] +#CHECK: xy %r0, 0 # encoding: [0xe3,0x00,0x00,0x00,0x00,0x57] +#CHECK: xy %r0, 1 # encoding: [0xe3,0x00,0x00,0x01,0x00,0x57] +#CHECK: xy %r0, 524287 # encoding: [0xe3,0x00,0x0f,0xff,0x7f,0x57] +#CHECK: xy %r0, 0(%r1) # encoding: [0xe3,0x00,0x10,0x00,0x00,0x57] +#CHECK: xy %r0, 0(%r15) # encoding: [0xe3,0x00,0xf0,0x00,0x00,0x57] +#CHECK: xy %r0, 524287(%r1,%r15) # encoding: [0xe3,0x01,0xff,0xff,0x7f,0x57] +#CHECK: xy %r0, 524287(%r15,%r1) # encoding: [0xe3,0x0f,0x1f,0xff,0x7f,0x57] +#CHECK: xy %r15, 0 # encoding: [0xe3,0xf0,0x00,0x00,0x00,0x57] + + xy %r0, -524288 + xy %r0, -1 + xy %r0, 0 + xy %r0, 1 + xy %r0, 524287 + xy %r0, 0(%r1) + xy %r0, 0(%r15) + xy %r0, 524287(%r1,%r15) + xy %r0, 524287(%r15,%r1) + xy %r15, 0 diff --git a/test/MC/SystemZ/insn-xy-02.s b/test/MC/SystemZ/insn-xy-02.s new file mode 100644 index 000000000000..6ba3bad48c9b --- /dev/null +++ b/test/MC/SystemZ/insn-xy-02.s @@ -0,0 +1,10 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid operand +#CHECK: xy %r0, -524289 +#CHECK: error: invalid operand +#CHECK: xy %r0, 524288 + + xy %r0, -524289 + xy %r0, 524288 diff --git a/test/MC/SystemZ/lit.local.cfg b/test/MC/SystemZ/lit.local.cfg new file mode 100644 index 000000000000..abb697406d6f --- /dev/null +++ b/test/MC/SystemZ/lit.local.cfg @@ -0,0 +1,6 @@ +config.suffixes = ['.ll', '.c', '.cpp', '.s'] + +targets = set(config.root.targets_to_build.split()) +if not 'SystemZ' in targets: + config.unsupported = True + diff --git a/test/MC/SystemZ/regs-01.s b/test/MC/SystemZ/regs-01.s new file mode 100644 index 000000000000..df11fee691bc --- /dev/null +++ b/test/MC/SystemZ/regs-01.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lr %r0, %r1 # encoding: [0x18,0x01] +#CHECK: lr %r2, %r3 # encoding: [0x18,0x23] +#CHECK: lr %r4, %r5 # encoding: [0x18,0x45] +#CHECK: lr %r6, %r7 # encoding: [0x18,0x67] +#CHECK: lr %r8, %r9 # encoding: [0x18,0x89] +#CHECK: lr %r10, %r11 # encoding: [0x18,0xab] +#CHECK: lr %r12, %r13 # encoding: [0x18,0xcd] +#CHECK: lr %r14, %r15 # encoding: [0x18,0xef] + + lr %r0,%r1 + lr %r2,%r3 + lr %r4,%r5 + lr %r6,%r7 + lr %r8,%r9 + lr %r10,%r11 + lr %r12,%r13 + lr %r14,%r15 diff --git a/test/MC/SystemZ/regs-02.s b/test/MC/SystemZ/regs-02.s new file mode 100644 index 000000000000..baaa0f9f9781 --- /dev/null +++ b/test/MC/SystemZ/regs-02.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lgr %r0, %r1 # encoding: [0xb9,0x04,0x00,0x01] +#CHECK: lgr %r2, %r3 # encoding: [0xb9,0x04,0x00,0x23] +#CHECK: lgr %r4, %r5 # encoding: [0xb9,0x04,0x00,0x45] +#CHECK: lgr %r6, %r7 # encoding: [0xb9,0x04,0x00,0x67] +#CHECK: lgr %r8, %r9 # encoding: [0xb9,0x04,0x00,0x89] +#CHECK: lgr %r10, %r11 # encoding: [0xb9,0x04,0x00,0xab] +#CHECK: lgr %r12, %r13 # encoding: [0xb9,0x04,0x00,0xcd] +#CHECK: lgr %r14, %r15 # encoding: [0xb9,0x04,0x00,0xef] + + lgr %r0,%r1 + lgr %r2,%r3 + lgr %r4,%r5 + lgr %r6,%r7 + lgr %r8,%r9 + lgr %r10,%r11 + lgr %r12,%r13 + lgr %r14,%r15 diff --git a/test/MC/SystemZ/regs-03.s b/test/MC/SystemZ/regs-03.s new file mode 100644 index 000000000000..6ced4157b453 --- /dev/null +++ b/test/MC/SystemZ/regs-03.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: dlr %r0, %r0 # encoding: [0xb9,0x97,0x00,0x00] +#CHECK: dlr %r2, %r0 # encoding: [0xb9,0x97,0x00,0x20] +#CHECK: dlr %r4, %r0 # encoding: [0xb9,0x97,0x00,0x40] +#CHECK: dlr %r6, %r0 # encoding: [0xb9,0x97,0x00,0x60] +#CHECK: dlr %r8, %r0 # encoding: [0xb9,0x97,0x00,0x80] +#CHECK: dlr %r10, %r0 # encoding: [0xb9,0x97,0x00,0xa0] +#CHECK: dlr %r12, %r0 # encoding: [0xb9,0x97,0x00,0xc0] +#CHECK: dlr %r14, %r0 # encoding: [0xb9,0x97,0x00,0xe0] + + dlr %r0,%r0 + dlr %r2,%r0 + dlr %r4,%r0 + dlr %r6,%r0 + dlr %r8,%r0 + dlr %r10,%r0 + dlr %r12,%r0 + dlr %r14,%r0 diff --git a/test/MC/SystemZ/regs-04.s b/test/MC/SystemZ/regs-04.s new file mode 100644 index 000000000000..a2da67186f2b --- /dev/null +++ b/test/MC/SystemZ/regs-04.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ler %f0, %f1 # encoding: [0x38,0x01] +#CHECK: ler %f2, %f3 # encoding: [0x38,0x23] +#CHECK: ler %f4, %f5 # encoding: [0x38,0x45] +#CHECK: ler %f6, %f7 # encoding: [0x38,0x67] +#CHECK: ler %f8, %f9 # encoding: [0x38,0x89] +#CHECK: ler %f10, %f11 # encoding: [0x38,0xab] +#CHECK: ler %f12, %f13 # encoding: [0x38,0xcd] +#CHECK: ler %f14, %f15 # encoding: [0x38,0xef] + + ler %f0,%f1 + ler %f2,%f3 + ler %f4,%f5 + ler %f6,%f7 + ler %f8,%f9 + ler %f10,%f11 + ler %f12,%f13 + ler %f14,%f15 diff --git a/test/MC/SystemZ/regs-05.s b/test/MC/SystemZ/regs-05.s new file mode 100644 index 000000000000..b5f50b51a3ba --- /dev/null +++ b/test/MC/SystemZ/regs-05.s @@ -0,0 +1,19 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: ldr %f0, %f1 # encoding: [0x28,0x01] +#CHECK: ldr %f2, %f3 # encoding: [0x28,0x23] +#CHECK: ldr %f4, %f5 # encoding: [0x28,0x45] +#CHECK: ldr %f6, %f7 # encoding: [0x28,0x67] +#CHECK: ldr %f8, %f9 # encoding: [0x28,0x89] +#CHECK: ldr %f10, %f11 # encoding: [0x28,0xab] +#CHECK: ldr %f12, %f13 # encoding: [0x28,0xcd] +#CHECK: ldr %f14, %f15 # encoding: [0x28,0xef] + + ldr %f0,%f1 + ldr %f2,%f3 + ldr %f4,%f5 + ldr %f6,%f7 + ldr %f8,%f9 + ldr %f10,%f11 + ldr %f12,%f13 + ldr %f14,%f15 diff --git a/test/MC/SystemZ/regs-06.s b/test/MC/SystemZ/regs-06.s new file mode 100644 index 000000000000..43bf38c9c4b6 --- /dev/null +++ b/test/MC/SystemZ/regs-06.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -triple s390x-linux-gnu -show-encoding %s | FileCheck %s + +#CHECK: lxr %f0, %f1 # encoding: [0xb3,0x65,0x00,0x01] +#CHECK: lxr %f4, %f5 # encoding: [0xb3,0x65,0x00,0x45] +#CHECK: lxr %f8, %f9 # encoding: [0xb3,0x65,0x00,0x89] +#CHECK: lxr %f12, %f13 # encoding: [0xb3,0x65,0x00,0xcd] + + lxr %f0,%f1 + lxr %f4,%f5 + lxr %f8,%f9 + lxr %f12,%f13 diff --git a/test/MC/SystemZ/regs-07.s b/test/MC/SystemZ/regs-07.s new file mode 100644 index 000000000000..d3585a6e2ccb --- /dev/null +++ b/test/MC/SystemZ/regs-07.s @@ -0,0 +1,28 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lr %r16,%r1 +#CHECK: error: invalid register +#CHECK: lr %f0,%r1 +#CHECK: error: invalid register +#CHECK: lr %a0,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: lr %arid,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: lr %0,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: lr 0,%r1 +#CHECK: error: unknown token in expression +#CHECK: lr (%r0),%r1 +#CHECK: error: unknown token in expression +#CHECK: lr %,%r1 + + lr %r16,%r1 + lr %f0,%r1 + lr %a0,%r1 + lr %arid,%r1 + lr %0,%r1 + lr 0,%r1 + lr (%r0),%r1 + lr %,%r1 diff --git a/test/MC/SystemZ/regs-08.s b/test/MC/SystemZ/regs-08.s new file mode 100644 index 000000000000..f11c45737a43 --- /dev/null +++ b/test/MC/SystemZ/regs-08.s @@ -0,0 +1,28 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lgr %r16,%r1 +#CHECK: error: invalid register +#CHECK: lgr %f0,%r1 +#CHECK: error: invalid register +#CHECK: lgr %a0,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: lgr %arid,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: lgr %0,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: lgr 0,%r1 +#CHECK: error: unknown token in expression +#CHECK: lgr (%r0),%r1 +#CHECK: error: unknown token in expression +#CHECK: lgr %,%r1 + + lgr %r16,%r1 + lgr %f0,%r1 + lgr %a0,%r1 + lgr %arid,%r1 + lgr %0,%r1 + lgr 0,%r1 + lgr (%r0),%r1 + lgr %,%r1 diff --git a/test/MC/SystemZ/regs-09.s b/test/MC/SystemZ/regs-09.s new file mode 100644 index 000000000000..60f4d3914030 --- /dev/null +++ b/test/MC/SystemZ/regs-09.s @@ -0,0 +1,31 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: dlr %r1,%r8 +#CHECK: error: invalid register +#CHECK: dlr %r16,%r1 +#CHECK: error: invalid register +#CHECK: dlr %f0,%r1 +#CHECK: error: invalid register +#CHECK: dlr %a0,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: dlr %arid,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: dlr %0,%r1 +#CHECK: error: invalid operand for instruction +#CHECK: dlr 0,%r1 +#CHECK: error: unknown token in expression +#CHECK: dlr (%r0),%r1 +#CHECK: error: unknown token in expression +#CHECK: dlr %,%r1 + + dlr %r1,%r8 + dlr %r16,%r1 + dlr %f0,%r1 + dlr %a0,%r1 + dlr %arid,%r1 + dlr %0,%r1 + dlr 0,%r1 + dlr (%r0),%r1 + dlr %,%r1 diff --git a/test/MC/SystemZ/regs-10.s b/test/MC/SystemZ/regs-10.s new file mode 100644 index 000000000000..865aa82532ff --- /dev/null +++ b/test/MC/SystemZ/regs-10.s @@ -0,0 +1,28 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: ler %f1,%f16 +#CHECK: error: invalid register +#CHECK: ler %f1,%r0 +#CHECK: error: invalid register +#CHECK: ler %f1,%a0 +#CHECK: error: invalid operand for instruction +#CHECK: ler %f1,%fly +#CHECK: error: invalid operand for instruction +#CHECK: ler %f1,%0 +#CHECK: error: invalid operand for instruction +#CHECK: ler %f1,0 +#CHECK: error: unknown token in expression +#CHECK: ler %f1,(%f0) +#CHECK: error: unknown token in expression +#CHECK: ler %f1,% + + ler %f1,%f16 + ler %f1,%r0 + ler %f1,%a0 + ler %f1,%fly + ler %f1,%0 + ler %f1,0 + ler %f1,(%f0) + ler %f1,% diff --git a/test/MC/SystemZ/regs-11.s b/test/MC/SystemZ/regs-11.s new file mode 100644 index 000000000000..5d0f04f04343 --- /dev/null +++ b/test/MC/SystemZ/regs-11.s @@ -0,0 +1,28 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: ldr %f1,%f16 +#CHECK: error: invalid register +#CHECK: ldr %f1,%r0 +#CHECK: error: invalid register +#CHECK: ldr %f1,%a0 +#CHECK: error: invalid operand for instruction +#CHECK: ldr %f1,%fly +#CHECK: error: invalid operand for instruction +#CHECK: ldr %f1,%0 +#CHECK: error: invalid operand for instruction +#CHECK: ldr %f1,0 +#CHECK: error: unknown token in expression +#CHECK: ldr %f1,(%f0) +#CHECK: error: unknown token in expression +#CHECK: ldr %f1,% + + ldr %f1,%f16 + ldr %f1,%r0 + ldr %f1,%a0 + ldr %f1,%fly + ldr %f1,%0 + ldr %f1,0 + ldr %f1,(%f0) + ldr %f1,% diff --git a/test/MC/SystemZ/regs-12.s b/test/MC/SystemZ/regs-12.s new file mode 100644 index 000000000000..f6cf0e75844d --- /dev/null +++ b/test/MC/SystemZ/regs-12.s @@ -0,0 +1,31 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: lxr %f1,%f2 +#CHECK: error: invalid register +#CHECK: lxr %f1,%f16 +#CHECK: error: invalid register +#CHECK: lxr %f1,%r0 +#CHECK: error: invalid register +#CHECK: lxr %f1,%a0 +#CHECK: error: invalid operand for instruction +#CHECK: lxr %f1,%fly +#CHECK: error: invalid operand for instruction +#CHECK: lxr %f1,%0 +#CHECK: error: invalid operand for instruction +#CHECK: lxr %f1,0 +#CHECK: error: unknown token in expression +#CHECK: lxr %f1,(%f0) +#CHECK: error: unknown token in expression +#CHECK: lxr %f1,% + + lxr %f1,%f2 + lxr %f1,%f16 + lxr %f1,%r0 + lxr %f1,%a0 + lxr %f1,%fly + lxr %f1,%0 + lxr %f1,0 + lxr %f1,(%f0) + lxr %f1,% diff --git a/test/MC/SystemZ/regs-13.s b/test/MC/SystemZ/regs-13.s new file mode 100644 index 000000000000..88b0c05b86fb --- /dev/null +++ b/test/MC/SystemZ/regs-13.s @@ -0,0 +1,69 @@ +# RUN: llvm-mc -triple s390x-linux-gnu < %s | FileCheck %s + +#CHECK: .cfi_offset %r0, 0 +#CHECK: .cfi_offset %r1, 8 +#CHECK: .cfi_offset %r2, 16 +#CHECK: .cfi_offset %r3, 24 +#CHECK: .cfi_offset %r4, 32 +#CHECK: .cfi_offset %r5, 40 +#CHECK: .cfi_offset %r6, 48 +#CHECK: .cfi_offset %r7, 56 +#CHECK: .cfi_offset %r8, 64 +#CHECK: .cfi_offset %r9, 72 +#CHECK: .cfi_offset %r10, 80 +#CHECK: .cfi_offset %r11, 88 +#CHECK: .cfi_offset %r12, 96 +#CHECK: .cfi_offset %r13, 104 +#CHECK: .cfi_offset %r14, 112 +#CHECK: .cfi_offset %r15, 120 +#CHECK: .cfi_offset %f0, 128 +#CHECK: .cfi_offset %f1, 136 +#CHECK: .cfi_offset %f2, 144 +#CHECK: .cfi_offset %f3, 152 +#CHECK: .cfi_offset %f4, 160 +#CHECK: .cfi_offset %f5, 168 +#CHECK: .cfi_offset %f6, 176 +#CHECK: .cfi_offset %f7, 184 +#CHECK: .cfi_offset %f8, 192 +#CHECK: .cfi_offset %f9, 200 +#CHECK: .cfi_offset %f10, 208 +#CHECK: .cfi_offset %f11, 216 +#CHECK: .cfi_offset %f12, 224 +#CHECK: .cfi_offset %f13, 232 +#CHECK: .cfi_offset %f14, 240 +#CHECK: .cfi_offset %f15, 248 + + .cfi_startproc + .cfi_offset %r0,0 + .cfi_offset %r1,8 + .cfi_offset %r2,16 + .cfi_offset %r3,24 + .cfi_offset %r4,32 + .cfi_offset %r5,40 + .cfi_offset %r6,48 + .cfi_offset %r7,56 + .cfi_offset %r8,64 + .cfi_offset %r9,72 + .cfi_offset %r10,80 + .cfi_offset %r11,88 + .cfi_offset %r12,96 + .cfi_offset %r13,104 + .cfi_offset %r14,112 + .cfi_offset %r15,120 + .cfi_offset %f0,128 + .cfi_offset %f1,136 + .cfi_offset %f2,144 + .cfi_offset %f3,152 + .cfi_offset %f4,160 + .cfi_offset %f5,168 + .cfi_offset %f6,176 + .cfi_offset %f7,184 + .cfi_offset %f8,192 + .cfi_offset %f9,200 + .cfi_offset %f10,208 + .cfi_offset %f11,216 + .cfi_offset %f12,224 + .cfi_offset %f13,232 + .cfi_offset %f14,240 + .cfi_offset %f15,248 + .cfi_endproc diff --git a/test/MC/SystemZ/regs-14.s b/test/MC/SystemZ/regs-14.s new file mode 100644 index 000000000000..e22307d49ce1 --- /dev/null +++ b/test/MC/SystemZ/regs-14.s @@ -0,0 +1,18 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: invalid register +#CHECK: .cfi_offset %a0,0 +#CHECK: error: register expected +#CHECK: .cfi_offset %foo,0 +#CHECK: error: register expected +#CHECK: .cfi_offset %,0 +#CHECK: error: register expected +#CHECK: .cfi_offset r0,0 + + .cfi_startproc + .cfi_offset %a0,0 + .cfi_offset %foo,0 + .cfi_offset %,0 + .cfi_offset r0,0 + .cfi_endproc diff --git a/test/MC/SystemZ/regs-15.s b/test/MC/SystemZ/regs-15.s new file mode 100644 index 000000000000..baec6a639bbf --- /dev/null +++ b/test/MC/SystemZ/regs-15.s @@ -0,0 +1,19 @@ +# RUN: not llvm-mc -triple s390x-linux-gnu < %s 2> %t +# RUN: FileCheck < %t %s + +#CHECK: error: %r0 used in an address +#CHECK: sll %r2,8(%r0) +#CHECK: error: %r0 used in an address +#CHECK: br %r0 +#CHECK: error: %r0 used in an address +#CHECK: l %r1,8(%r0) +#CHECK: error: %r0 used in an address +#CHECK: l %r1,8(%r0,%r15) +#CHECK: error: %r0 used in an address +#CHECK: l %r1,8(%r15,%r0) + + sll %r2,8(%r0) + br %r0 + l %r1,8(%r0) + l %r1,8(%r0,%r15) + l %r1,8(%r15,%r0) diff --git a/test/MC/X86/intel-syntax.s b/test/MC/X86/intel-syntax.s index 8bfa58a4bed8..b2f337dac9d7 100644 --- a/test/MC/X86/intel-syntax.s +++ b/test/MC/X86/intel-syntax.s @@ -247,4 +247,79 @@ _main: mov [16][eax][ebx*4], ecx // CHECK: movl %ecx, -16(%eax,%ebx,4) mov [eax][ebx*4 - 16], ecx - ret + +// CHECK: prefetchnta 12800(%esi) + prefetchnta [esi + (200*64)] +// CHECK: prefetchnta 32(%esi) + prefetchnta [esi + (64/2)] +// CHECK: prefetchnta 128(%esi) + prefetchnta [esi + (64/2*4)] +// CHECK: prefetchnta 8(%esi) + prefetchnta [esi + (64/(2*4))] +// CHECK: prefetchnta 48(%esi) + prefetchnta [esi + (64/(2*4)+40)] + +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax][ebx*4 - 2*8], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax][4*ebx - 2*8], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax + 4*ebx - 2*8], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [12 + eax + (4*ebx) - 2*14], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax][ebx*4 - 2*2*2*2], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax][ebx*4 - (2*8)], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax][ebx*4 - 2 * 8 + 4 - 4], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax + ebx*4 - 2 * 8 + 4 - 4], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax + ebx*4 - 2 * ((8 + 4) - 4)], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [-2 * ((8 + 4) - 4) + eax + ebx*4], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [((-2) * ((8 + 4) - 4)) + eax + ebx*4], ecx +// CHECK: movl %ecx, -16(%eax,%ebx,4) + mov [eax + ((-2) * ((8 + 4) - 4)) + ebx*4], ecx +// CHECK: movl %ecx, 96(%eax,%ebx,4) + mov [eax + ((-2) * ((8 + 4) * -4)) + ebx*4], ecx +// CHECK: movl %ecx, -8(%eax,%ebx,4) + mov [eax][-8][ebx*4], ecx +// CHECK: movl %ecx, -2(%eax,%ebx,4) + mov [eax][16/-8][ebx*4], ecx +// CHECK: movl %ecx, -2(%eax,%ebx,4) + mov [eax][(16)/-8][ebx*4], ecx + +// CHECK: setb %al + setc al +// CHECK: sete %al + setz al +// CHECK: setbe %al + setna al +// CHECK: setae %al + setnb al +// CHECK: setae %al + setnc al +// CHECK: setle %al + setng al +// CHECK: setge %al + setnl al +// CHECK: setne %al + setnz al +// CHECK: setp %al + setpe al +// CHECK: setnp %al + setpo al +// CHECK: setb %al + setnae al +// CHECK: seta %al + setnbe al +// CHECK: setl %al + setnge al +// CHECK: setg %al + setnle al +// CHECK: jne _foo + jnz _foo + ret diff --git a/test/MC/X86/x86-64.s b/test/MC/X86/x86-64.s index c5f1d15f8ff0..521a0776d8af 100644 --- a/test/MC/X86/x86-64.s +++ b/test/MC/X86/x86-64.s @@ -1228,3 +1228,11 @@ sysexitl // CHECK: sysexitq // CHECK: encoding: [0x48,0x0f,0x35] sysexitq + +// CHECK: clac +// CHECK: encoding: [0x0f,0x01,0xca] +clac + +// CHECK: stac +// CHECK: encoding: [0x0f,0x01,0xcb] +stac |