You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/inline-assembly.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -86,8 +86,8 @@ Currently, all supported targets follow the assembly code syntax used by LLVM's
86
86
On x86, the `.intel_syntax noprefix` mode of GAS is used by default.
87
87
On ARM, the `.syntax unified` mode is used.
88
88
These targets impose an additional restriction on the assembly code: any assembler state (e.g. the current section which can be changed with `.section`) must be restored to its original value at the end of the asm string.
89
-
Assembly code that does not conform to the GAS syntax will result in assembler-specific behavior.
90
-
Further constraints on the directives used by inline assembly are indicated by [Directives Support](#directives-support).
89
+
Assembly code that does not conform to the GAS syntax will result in assembler-specific behavior.
90
+
Further constraints on the directives used by inline assembly are indicated by [Directives Support](#directives-support).
@@ -594,10 +594,12 @@ On x86 targets, both 32-bit and 64-bit, the following additional directives are
594
594
-`.code32`
595
595
-`.code64`
596
596
597
-
Use of the `.att_syntax` and `.intel_syntax` directives with no parameters (or with parameters equivalent to the defaults) is supported, but the syntax must be restored to the option at entry (`.intel_syntax` without the `att_syntax` asm option, or `.att_syntax` with that option) or the behavior is undefined (the compiled output may be corrupted as a result). Use of `.att_syntax` and `.intel_syntax` with a non-default option (such as `.intel_syntax prefix` or `.att_syntax noprefix`) is unsupported. If operand interpolations are used between setting the syntax mode with one of these directives, and restoring it to the block's default, the behaviour is undefined.
597
+
Use of the `.att_syntax` and `.intel_syntax` directives with no parameters (or with parameters equivalent to the defaults) is supported, but the syntax must be restored to the option at entry (`.intel_syntax` without the `att_syntax` asm option, or `.att_syntax` with that option) or the behavior is undefined (the compiled output may be corrupted as a result).
598
+
Use of `.att_syntax` and `.intel_syntax` with a non-default option (such as `.intel_syntax prefix` or `.att_syntax noprefix`) is unsupported.
599
+
If operand interpolations are used between setting the syntax mode with one of these directives, and restoring it to the block's default, the behaviour is undefined.
598
600
599
601
Use of `.code16`, `.code32`, and `.code64` directives are only supported if the state is reset to the default before exiting the assembly block.
600
-
32-bit x86 uses `.code32` by default, and x86_64 uses `.code64` by default.
602
+
32-bit x86 uses `.code32` by default, and x86_64 uses `.code64` by default.
601
603
602
604
603
605
##### ARM (32-bit)
@@ -612,5 +614,3 @@ On ARM, the following additional directives are guaranteed to be supported:
0 commit comments