[llvm] draft: inline asm mode (PR #146215)
Brian Cain via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 28 08:17:08 PDT 2025
================
@@ -0,0 +1,110 @@
+# Inline Assembly Safety Directive
+
+## Overview
+
+The `.inline_asm_mode` directive provides enhanced safety for inline assembly blocks by warning about potentially unsafe label usage. This directive helps prevent common errors where programmers create non-local labels in inline assembly that could be inadvertently jumped to from external code.
+
+## Syntax
+
+```assembly
+.inline_asm_mode strict # Enable strict mode - warn on non-local labels
+.inline_asm_mode relaxed # Disable strict mode (default)
----------------
androm3da wrote:
I'm especially willing to consider a better name for this directive.
https://github.com/llvm/llvm-project/pull/146215
More information about the llvm-commits
mailing list