ref: 4f9301c97d2078babe120e2c6a2ff00e309421bd
parent: 6b5e8cc587d544ab399488fa032640268856da9c
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Tue Jul 26 16:18:31 EDT 2022
add builtins for aarch64
--- /dev/null
+++ b/src/plan9_builtins_arm64.s
@@ -1,0 +1,12 @@
+TEXT __builtin_ctz(SB),1,$0
+ RBITW R0, R0
+ CLZW R0, R0
+ RETURN
+
+TEXT __builtin_clz(SB),1,$0
+ CLZW R0, R0
+ RETURN
+
+TEXT __builtin_clzll(SB),1,$0
+ CLZ R0, R0
+ RETURN