diff options
| author | Zoran Jovanovic <zoran.jovanovic@imgtec.com> | 2016-04-21 13:43:26 +0000 |
|---|---|---|
| committer | Zoran Jovanovic <zoran.jovanovic@imgtec.com> | 2016-04-21 13:43:26 +0000 |
| commit | 02b700306866746df10db110d36e1917eef454da (patch) | |
| tree | 1f8f58b58d526d1f796f6a95e545bc75a5c49083 /llvm/test/MC | |
| parent | 201398e8a308fdeda8d9f9ddb7797bbb3d919381 (diff) | |
| download | bcm5719-llvm-02b700306866746df10db110d36e1917eef454da.tar.gz bcm5719-llvm-02b700306866746df10db110d36e1917eef454da.zip | |
[mips][microMIPS] Add R_MICROMIPS_PC26_S1 relocation
Differential Revision: http://reviews.llvm.org/D14822
llvm-svn: 266985
Diffstat (limited to 'llvm/test/MC')
| -rw-r--r-- | llvm/test/MC/Mips/micromips32r6/relocations.s | 24 | ||||
| -rw-r--r-- | llvm/test/MC/Mips/micromips64r6/relocations.s | 23 |
2 files changed, 47 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/micromips32r6/relocations.s b/llvm/test/MC/Mips/micromips32r6/relocations.s new file mode 100644 index 00000000000..14baa6b37b6 --- /dev/null +++ b/llvm/test/MC/Mips/micromips32r6/relocations.s @@ -0,0 +1,24 @@ +# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r6 \ +# RUN: -mattr=micromips | FileCheck %s -check-prefix=CHECK-FIXUP +# RUN: llvm-mc %s -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 \ +# RUN: -mattr=micromips | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-ELF +#------------------------------------------------------------------------------ +# Check that the assembler can handle the documented syntax for fixups. +#------------------------------------------------------------------------------ +# CHECK-FIXUP: balc bar # encoding: [0b101101AA,A,A,A] +# CHECK-FIXUP: # fixup A - offset: 0, +# CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC26_S1 +# CHECK-FIXUP: bc bar # encoding: [0b100101AA,A,A,A] +# CHECK-FIXUP: # fixup A - offset: 0, +# CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC26_S1 +#------------------------------------------------------------------------------ +# Check that the appropriate relocations were created. +#------------------------------------------------------------------------------ +# CHECK-ELF: Relocations [ +# CHECK-ELF: 0x0 R_MICROMIPS_PC26_S1 bar 0x0 +# CHECK-ELF: 0x4 R_MICROMIPS_PC26_S1 bar 0x0 +# CHECK-ELF: ] + + balc bar + bc bar + diff --git a/llvm/test/MC/Mips/micromips64r6/relocations.s b/llvm/test/MC/Mips/micromips64r6/relocations.s new file mode 100644 index 00000000000..b9e72436cfa --- /dev/null +++ b/llvm/test/MC/Mips/micromips64r6/relocations.s @@ -0,0 +1,23 @@ +# RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips64r6 \ +# RUN: -mattr=micromips | FileCheck %s -check-prefix=CHECK-FIXUP +# RUN: llvm-mc %s -filetype=obj -triple=mips-unknown-linux -mcpu=mips64r6 \ +# RUN: -mattr=micromips | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-ELF +#------------------------------------------------------------------------------ +# Check that the assembler can handle the documented syntax for fixups. +#------------------------------------------------------------------------------ +# CHECK-FIXUP: balc bar # encoding: [0b101101AA,A,A,A] +# CHECK-FIXUP: # fixup A - offset: 0, +# CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC26_S1 +# CHECK-FIXUP: bc bar # encoding: [0b100101AA,A,A,A] +# CHECK-FIXUP: # fixup A - offset: 0, +# CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC26_S1 +#------------------------------------------------------------------------------ +# Check that the appropriate relocations were created. +#------------------------------------------------------------------------------ +# CHECK-ELF: Relocations [ +# CHECK-ELF: 0x0 R_MICROMIPS_PC26_S1 bar 0x0 +# CHECK-ELF: 0x4 R_MICROMIPS_PC26_S1 bar 0x0 +# CHECK-ELF: ] + + balc bar + bc bar |

