summaryrefslogtreecommitdiff
path: root/rust/asm/src/main_aarch64.S
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2026-10-03 21:45:31 -0500
committerHunter Kvalevog <hunter@kvog.sh>2026-10-03 21:45:31 -0500
commit4fab2bee9c914b95601d8c5ebd06834575e4ba6a (patch)
tree2926c417a3b2bcd70c9ebb81e37e106a0bc3838b /rust/asm/src/main_aarch64.S
parent3b912e557767457e2b4715aa15997a9d25d18a09 (diff)
rust/asm: call rustc directly
Diffstat (limited to 'rust/asm/src/main_aarch64.S')
-rw-r--r--rust/asm/src/main_aarch64.S35
1 files changed, 0 insertions, 35 deletions
diff --git a/rust/asm/src/main_aarch64.S b/rust/asm/src/main_aarch64.S
deleted file mode 100644
index 56403d5..0000000
--- a/rust/asm/src/main_aarch64.S
+++ /dev/null
@@ -1,35 +0,0 @@
-// ================================================================================================
-// Rust->assembly interop demo
-//
-// License:
-// Copyright (c) 2026 Hunter Kvalevog
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE.
-// ================================================================================================
-
-#include "../../../_common/aarch64/common.S"
-
-TEXT_SEGMENT
-
-.global SYM(add_u32)
-.global SYM(dot_f32v3)
-
-SYM(add_u32):
- add w0, w0, w1
- ret
-
-SYM(dot_f32v3):
- ldp s1, s2, [x0] // a.x, a.y
- ldp s3, s4, [x1] // b.x, b.y
- ldr s5, [x0, #8] // a.z
- ldr s6, [x1, #8] // b.z
-
- fmul s0, s1, s3 // a.x * b.x
- fmadd s0, s2, s4, s0 // + a.y * b.y
- fmadd s0, s5, s6, s0 // + a.z * b.z
-
- ret