summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp3
-rw-r--r--llvm/test/MC/Mips/elf_reginfo.s2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
index e017a27d6b9..4e7216921b9 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
@@ -366,7 +366,8 @@ void MipsTargetELFStreamer::finish() {
const MCSectionELF *Sec =
Context.getELFSection(".reginfo", ELF::SHT_MIPS_REGINFO, ELF::SHF_ALLOC,
SectionKind::getMetadata(), 24, "");
- MCA.getOrCreateSectionData(*Sec).setAlignment(4);
+ MCA.getOrCreateSectionData(*Sec)
+ .setAlignment(Features & Mips::FeatureN32 ? 8 : 4);
OS.SwitchSection(Sec);
OS.EmitIntValue(0, 4); // ri_gprmask
diff --git a/llvm/test/MC/Mips/elf_reginfo.s b/llvm/test/MC/Mips/elf_reginfo.s
index b88607a02d3..ba4788a39d9 100644
--- a/llvm/test/MC/Mips/elf_reginfo.s
+++ b/llvm/test/MC/Mips/elf_reginfo.s
@@ -27,6 +27,6 @@
# CHECK_32-LABEL: Name: .reginfo
# CHECK_32-NEXT: Type: SHT_MIPS_REGINFO
# CHECK_32-NEXT: Flags [ (0x2)
-# CHECK_32: AddressAlignment: 4
+# CHECK_32: AddressAlignment: 8
# CHECK_32: EntrySize: 24
# CHECK_32-LABEL: }
OpenPOWER on IntegriCloud