[PATCH] D18899: [mips][ias] Correct ELF eflags when Octeon is the target.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 07:01:43 PDT 2016
dsanders created this revision.
dsanders added subscribers: llvm-commits, spetrovic, mpf, petarj.
Herald added subscribers: sdardis, dsanders.
http://reviews.llvm.org/D18899
Files:
lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
test/MC/Mips/elf_eflags.s
Index: test/MC/Mips/elf_eflags.s
===================================================================
--- test/MC/Mips/elf_eflags.s
+++ test/MC/Mips/elf_eflags.s
@@ -125,3 +125,6 @@
# RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPS64EL-MIPS64-NAN2008 %s
# MIPS64EL-MIPS64-NAN2008: Flags [ (0x60000406)
+
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=octeon %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-OCTEON %s
+# MIPSEL-OCTEON: Flags [ (0x808B0006)
Index: lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
===================================================================
--- lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -482,6 +482,10 @@
else
EFlags |= ELF::EF_MIPS_ARCH_1;
+ // Machine
+ if (Features[Mips::FeatureCnMips])
+ EFlags |= ELF::EF_MIPS_MACH_OCTEON;
+
// Other options.
if (Features[Mips::FeatureNaN2008])
EFlags |= ELF::EF_MIPS_NAN2008;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18899.53023.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160408/2775fb87/attachment.bin>
More information about the llvm-commits
mailing list