Skip to content

Commit 935cefd

Browse files
authored
Add additional directives in use
1 parent b82f0bf commit 935cefd

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

src/inline-assembly.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,29 @@ The following directives are guaranteed to be supported by the assembler:
517517
.text
518518
.bss
519519
.data
520+
.def
521+
.endef
522+
.scl
523+
.comm
524+
.lcomm
525+
.option
526+
```
527+
528+
The following directives are guaranteed to be supported for `global_asm` only:
529+
```as
530+
.alt_entry
531+
.private_extern
532+
.globl
533+
.global
534+
```
535+
536+
#### Target Specific Directive Support
537+
538+
##### Dwarf Unwinding
539+
540+
The following directives are supported on ELF targets that support DWARF unwind info:
541+
542+
```as
520543
.cfi_adjust_cfa_offset
521544
.cfi_def_cfa
522545
.cfi_def_cfa_offset
@@ -538,10 +561,23 @@ The following directives are guaranteed to be supported by the assembler:
538561
.cfi_startproc
539562
.cfi_undefined
540563
.cfi_window_save
541-
.comm
542-
.lcomm
543564
```
544565

566+
##### Structured Exception Handling
567+
568+
On targets with structured exception Handling, the following additional directives are guaranteed to be supported:
569+
```as
570+
.seh_endproc
571+
.seh_endprologue
572+
.seh_proc
573+
.seh_pushreg
574+
.seh_savereg
575+
.seh_setframe
576+
.seh_stackalloc
577+
```
578+
579+
##### x86
580+
545581
On x86, the following additional directives are guaranteed to be supported:
546582
```as
547583
.nops
@@ -552,3 +588,20 @@ On x86 for `global_asm!` only, the following additional directives are guarantee
552588
.code16
553589
.code32
554590
```
591+
592+
##### ARM
593+
594+
On ARM for `global_asm!` only, the following additional directives are guaranteed to be supported:
595+
```as
596+
.code
597+
.thumb
598+
.thumb_func
599+
```
600+
601+
On ARM, the following additional directives are guaranteed to be supported:
602+
```as
603+
.fnstart
604+
.fnend
605+
.save
606+
.movsp
607+
```

0 commit comments

Comments
 (0)