diff options
author | johannst <johannst@users.noreply.github.com> | 2024-02-15 23:29:57 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-02-15 23:29:57 +0000 |
commit | bac8a5d2822835cf47175d1162030653fadd5c09 (patch) | |
tree | 28f312a114cf95ac799daac2a2caec4b8612d84d /arch | |
parent | bfc5ce4bc01e5eb28969eefcc01ecfefa2601fdf (diff) | |
download | notes-bac8a5d2822835cf47175d1162030653fadd5c09.tar.gz notes-bac8a5d2822835cf47175d1162030653fadd5c09.zip |
deploy: 4485708c972815bbb6df7f5a228683aa855d553d
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64.html | 6 | ||||
-rw-r--r-- | arch/armv7.html | 6 | ||||
-rw-r--r-- | arch/riscv.html | 6 | ||||
-rw-r--r-- | arch/x86_64.html | 12 |
4 files changed, 15 insertions, 15 deletions
diff --git a/arch/arm64.html b/arch/arm64.html index ccf8252..36b8710 100644 --- a/arch/arm64.html +++ b/arch/arm64.html @@ -355,7 +355,7 @@ ret .arch armv8-a - .section .text, "ax", @progbits + .section .text, "ax", @progbits .balign 4 // align code on 4byte boundary .global _start _start: @@ -371,9 +371,9 @@ _start: svc 0 .balign 8 // align data on 8byte boundary - .section .rodata, "a", @progbits + .section .rodata, "a", @progbits greeting: - .asciz "Hi ASM-World!\n" + .asciz "Hi ASM-World!\n" greeting_len: .int .-greeting </code></pre> diff --git a/arch/armv7.html b/arch/armv7.html index eeecc8b..0ecd684 100644 --- a/arch/armv7.html +++ b/arch/armv7.html @@ -361,7 +361,7 @@ mov fp, sp // FP points to frame record .arch armv7-a - .section .text, "ax" + .section .text, "ax" .balign 4 // Emit `arm` instructions, same as `.arm` directive. @@ -390,9 +390,9 @@ _do_greet: bx lr .balign 8 // align data on 8byte boundary - .section .rodata, "a" + .section .rodata, "a" greeting: - .asciz "Hi ASM-World!\n" + .asciz "Hi ASM-World!\n" greeting_len: .int .-greeting </code></pre> diff --git a/arch/riscv.html b/arch/riscv.html index 2e92aa5..aad6df6 100644 --- a/arch/riscv.html +++ b/arch/riscv.html @@ -212,7 +212,7 @@ x28-x31 t3-t6 temp regs #include <asm/unistd.h> // syscall NRs - .section .text, "ax", @progbits + .section .text, "ax", @progbits .balign 4 // align code on 4byte boundary .global _start _start: @@ -227,9 +227,9 @@ _start: ecall .balign 8 // align data on 8byte boundary - .section .rodata, "a", @progbits + .section .rodata, "a", @progbits greeting: - .asciz "Hi ASM-World!\n" + .asciz "Hi ASM-World!\n" greeting_len: .int .-greeting </code></pre> diff --git a/arch/x86_64.html b/arch/x86_64.html index 848de4f..210e8a4 100644 --- a/arch/x86_64.html +++ b/arch/x86_64.html @@ -250,7 +250,7 @@ mov rax, qword ptr [rbx+4*rcx] // load val at [rbx+4*rcx] into rax <pre><code class="language-x86asm">lea rax, [rip+.my_str] // load addr of .my_str into rax ... .my_str: -.asciz "Foo" +.asciz "Foo" </code></pre> <p>Load effective address:</p> <pre><code class="language-x86asm">mov rax, 2 @@ -300,7 +300,7 @@ mov al, 0xaa mov cx, 0x10 rep stosb </code></pre> -<h2 id="sysv-x86_64-abi"><a class="header" href="#sysv-x86_64-abi"><a href="https://www.uclibc.org/docs/psABI-x86_64.pdf">SysV x86_64 ABI</a></a></h2> +<h2 id="sysv-x86_64-abi"><a class="header" href="#sysv-x86_64-abi"><a href="https://gitlab.com/x86-psABIs/x86-64-ABI">SysV x86_64 ABI</a></a></h2> <h3 id="passing-arguments-to-functions"><a class="header" href="#passing-arguments-to-functions">Passing arguments to functions</a></h3> <ul> <li>Integer/Pointer arguments @@ -471,7 +471,7 @@ must must save these registers in case they are used.</p> .intel_syntax noprefix - .section .text, "ax", @progbits + .section .text, "ax", @progbits .global _start _start: mov rdi, 1 # fd @@ -484,9 +484,9 @@ _start: mov rax, 60 # exit(2) syscall nr syscall - .section .rdonly, "a", @progbits + .section .rdonly, "a", @progbits greeting: - .asciz "Hi ASM-World!\n" + .asciz "Hi ASM-World!\n" greeting_len: .int .-greeting </code></pre> @@ -499,7 +499,7 @@ Hi ASM-World! </code></pre> <h2 id="references"><a class="header" href="#references">References</a></h2> <ul> -<li><a href="https://www.uclibc.org/docs/psABI-x86_64.pdf">SystemV AMD64 ABI</a></li> +<li><a href="https://gitlab.com/x86-psABIs/x86-64-ABI">SystemV AMD64 ABI</a></li> <li><a href="https://www.amd.com/system/files/TechDocs/24592.pdf">AMD64 Vol1: Application Programming</a></li> <li><a href="https://www.amd.com/system/files/TechDocs/24593.pdf">AMD64 Vol2: System Programming</a></li> <li><a href="https://www.amd.com/system/files/TechDocs/24594.pdf">AMD64 Vol3: General-Purpose & System Instructions</a></li> |