openbsd-ports/devel/llvm/patches/patch-include_llvm_CodeGen_AsmPrinter_h
jca 75c7843086 Update to llvm-8.0.0
Most patch merges inspired from patrick's work on base-clang.  Consumer
ports fixed/marked BROKEN as discussed with bcallah@ and rsadowski@.
powerpc tests and PLIST fixes from cwen@, thanks!  rust-1.36 tests by
semarie@
2019-07-06 15:06:36 +00:00

32 lines
1.4 KiB
Plaintext

$OpenBSD: patch-include_llvm_CodeGen_AsmPrinter_h,v 1.5 2019/07/06 15:06:36 jca Exp $
Use int3 trap padding between functions instead of trapsleds with a leading jump.
Index: include/llvm/CodeGen/AsmPrinter.h
--- include/llvm/CodeGen/AsmPrinter.h.orig
+++ include/llvm/CodeGen/AsmPrinter.h
@@ -348,6 +348,11 @@ class AsmPrinter : public MachineFunctionPass { (publi
/// correctness.
void EmitAlignment(unsigned NumBits, const GlobalObject *GV = nullptr) const;
+ /// Emit an alignment directive to the specified power of two boundary,
+ /// like EmitAlignment, but call EmitTrapToAlignment to fill with
+ /// trap instructions instead of NOPs.
+ void EmitTrapAlignment(unsigned NumBits, const GlobalObject *GO = nullptr) const;
+
/// Lower the specified LLVM Constant to an MCExpr.
virtual const MCExpr *lowerConstant(const Constant *CV);
@@ -408,6 +413,11 @@ class AsmPrinter : public MachineFunctionPass { (publi
virtual void EmitInstruction(const MachineInstr *) {
llvm_unreachable("EmitInstruction not implemented");
}
+
+ /// Emit an alignment directive to the specified power
+ /// of two boundary, but use Trap instructions for alignment
+ /// sections that should never be executed.
+ virtual void EmitTrapToAlignment(unsigned NumBits) const;
/// Return the symbol for the specified constant pool entry.
virtual MCSymbol *GetCPISymbol(unsigned CPID) const;