summaryrefslogtreecommitdiff
path: root/test/MC/Mips/elf_eflags_nanlegacy.s
diff options
context:
space:
mode:
authorMatheus Almeida <matheus.almeida@imgtec.com>2014-04-16 15:48:55 +0000
committerMatheus Almeida <matheus.almeida@imgtec.com>2014-04-16 15:48:55 +0000
commitc308f165a0e981280a6e35d81282aad533b29684 (patch)
tree6cf35a988534a9e2187fafb5a81f02954653d402 /test/MC/Mips/elf_eflags_nanlegacy.s
parent92d2f986649fd7dae4a894d3b023b9affc7ec6b6 (diff)
downloadllvm-c308f165a0e981280a6e35d81282aad533b29684.tar.gz
llvm-c308f165a0e981280a6e35d81282aad533b29684.tar.bz2
llvm-c308f165a0e981280a6e35d81282aad533b29684.tar.xz
[mips] Add initial support for NaN2008 in the back-end.
This is so that EF_MIPS_NAN2008 is set if we are using IEEE 754-2008 NaN encoding (-mnan=2008). This patch also adds support for parsing '.nan legacy' and '.nan 2008' assembly directives. The handling of these directives should match GAS' behaviour i.e., the last directive in use sets the ELF header bit (EF_MIPS_NAN2008). Differential Revision: http://reviews.llvm.org/D3346 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips/elf_eflags_nanlegacy.s')
-rw-r--r--test/MC/Mips/elf_eflags_nanlegacy.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/MC/Mips/elf_eflags_nanlegacy.s b/test/MC/Mips/elf_eflags_nanlegacy.s
new file mode 100644
index 0000000000..6897ad2bda
--- /dev/null
+++ b/test/MC/Mips/elf_eflags_nanlegacy.s
@@ -0,0 +1,15 @@
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32 %s -o - | \
+# RUN: llvm-readobj -h | \
+# RUN: FileCheck %s -check-prefix=CHECK-OBJ
+# RUN: llvm-mc -triple mipsel-unknown-linux -mcpu=mips32 %s -o -| \
+# RUN: FileCheck %s -check-prefix=CHECK-ASM
+
+# This *MUST* match the output of gas compiled with the same triple.
+# CHECK-OBJ: Flags [ (0x50001000)
+
+# CHECK-ASM: .nan 2008
+# CHECK-ASM: .nan legacy
+
+.nan 2008
+// Let's override the previous directive!
+.nan legacy