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
+15-19
Original file line number
Diff line number
Diff line change
@@ -494,6 +494,7 @@ The following directives are guaranteed to be supported by the assembler:
494
494
-`.align`
495
495
-`.ascii`
496
496
-`.asciz`
497
+
-`.alt_entry`
497
498
-`.balign`
498
499
-`.balignl`
499
500
-`.balignw`
@@ -512,11 +513,14 @@ The following directives are guaranteed to be supported by the assembler:
512
513
-`.eqv`
513
514
-`.fill`
514
515
-`.float`
516
+
-`.globl`
517
+
-`.global`
515
518
-`.lcomm`
516
519
-`.inst`
517
520
-`.long`
518
521
-`.octa`
519
522
-`.option`
523
+
-`.private_extern`
520
524
-`.p2align`
521
525
-`.pushsection`
522
526
-`.popsection`
@@ -525,22 +529,16 @@ The following directives are guaranteed to be supported by the assembler:
525
529
-`.section`
526
530
-`.set`
527
531
-`.short`
532
+
-`.size`
528
533
-`.skip`
529
534
-`.sleb128`
530
535
-`.space`
531
536
-`.string`
532
537
-`.text`
538
+
-`.type`
533
539
-`.uleb128`
534
540
-`.word`
535
541
536
-
The following directives are guaranteed to be supported for `global_asm` only:
537
-
538
-
-`.alt_entry`
539
-
-`.globl`
540
-
-`.global`
541
-
-`.private_extern`
542
-
-`.size`
543
-
-`.type`
544
542
545
543
546
544
#### Target Specific Directive Support
@@ -592,23 +590,17 @@ On x86 targets, both 32-bit and 64-bit, the following additional directives are
592
590
-`.att_syntax`
593
591
-`.intel_syntax`
594
592
-`.nops`
595
-
596
-
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
-
598
-
On x86 for `global_asm!` only, the following additional directives are guaranteed to be supported (it is unspecified whether `.code16` or `.code32` are supported for `asm!()`):
599
-
600
593
-`.code16`
601
594
-`.code32`
595
+
-`.code64`
602
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.
603
598
604
-
##### ARM (32-bit)
605
-
606
-
On ARM for `global_asm!` only, the following additional directives are guaranteed to be supported:
599
+
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.
607
601
608
-
-`.code`
609
-
-`.thumb`
610
-
-`.thumb_func`
611
602
603
+
##### ARM (32-bit)
612
604
613
605
On ARM, the following additional directives are guaranteed to be supported:
614
606
@@ -617,4 +609,8 @@ On ARM, the following additional directives are guaranteed to be supported:
0 commit comments