18 lines
641 B
Plaintext
18 lines
641 B
Plaintext
$OpenBSD: patch-lib_Target_X86_X86MCInstLower_cpp,v 1.2 2017/09/01 06:40:28 ajacoutot Exp $
|
|
|
|
Use int3 trap padding between functions instead of trapsleds with a leading jump.
|
|
|
|
Index: lib/Target/X86/X86MCInstLower.cpp
|
|
--- lib/Target/X86/X86MCInstLower.cpp.orig
|
|
+++ lib/Target/X86/X86MCInstLower.cpp
|
|
@@ -1967,3 +1967,9 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr
|
|
|
|
EmitAndCountInstruction(TmpInst);
|
|
}
|
|
+
|
|
+/// Emit Trap bytes to the specified power of two alignment
|
|
+void X86AsmPrinter::EmitTrapToAlignment(unsigned NumBits) const {
|
|
+ if (NumBits == 0) return;
|
|
+ OutStreamer->EmitValueToAlignment(1u << NumBits, 0xCC, 1);
|
|
+}
|