[llvm] r213246 - [mips] .reginfo is 8 byte aligned on N32.
Daniel Sanders
daniel.sanders at imgtec.com
Thu Jul 17 03:10:04 PDT 2014
Author: dsanders
Date: Thu Jul 17 05:10:04 2014
New Revision: 213246
URL: http://llvm.org/viewvc/llvm-project?rev=213246&view=rev
Log:
[mips] .reginfo is 8 byte aligned on N32.
Differential Revision: http://reviews.llvm.org/D4540
Modified:
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
llvm/trunk/test/MC/Mips/elf_reginfo.s
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp?rev=213246&r1=213245&r2=213246&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp Thu Jul 17 05:10:04 2014
@@ -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
Modified: llvm/trunk/test/MC/Mips/elf_reginfo.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/elf_reginfo.s?rev=213246&r1=213245&r2=213246&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/elf_reginfo.s (original)
+++ llvm/trunk/test/MC/Mips/elf_reginfo.s Thu Jul 17 05:10:04 2014
@@ -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: }
More information about the llvm-commits
mailing list