Skip to content

Commit 93d8c22

Browse files
committed
Merge 98205 from mainline.
Work around a bug in the openbsd assembler on i386, which doesn't support .quad correctly because it is "really really old". PR6528. Yet another reason the mc assembler should take over ;-) llvm-svn: 98309
1 parent 45400fd commit 93d8c22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Target/X86/X86MCAsmInfo.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) {
7171
AbsoluteEHSectionOffsets = false;
7272
}
7373

74-
X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &Triple) {
74+
X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
7575
AsmTransCBE = x86_asm_table;
7676
AssemblerDialect = AsmWriterFlavor;
7777

@@ -91,6 +91,11 @@ X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &Triple) {
9191
// Exceptions handling
9292
ExceptionsType = ExceptionHandling::Dwarf;
9393
AbsoluteEHSectionOffsets = false;
94+
95+
// OpenBSD has buggy support for .quad in 32-bit mode, just split into two
96+
// .words.
97+
if (T.getOS() == Triple::OpenBSD && T.getArch() == Triple::x86)
98+
Data64bitsDirective = 0;
9499
}
95100

96101
MCSection *X86ELFMCAsmInfo::getNonexecutableStackSection(MCContext &Ctx) const {

0 commit comments

Comments
 (0)