I try to convert this assembly file : https://github.com/gvanas/KeccakCodePackage/blob/master/SnP/KeccakF-1600/OptimizedAsmX86-64/KeccakF-1600-x86-64-gas.s into apple syntax. (old syntax)
I replace .eq by #define, .global by .globl, remove .type, .size.
There is some errors again (i use clang) :
1 --
error: invalid operand for instruction subq *25, %rsp
(the instruction is : subq $8*25, %rsp
)
2 --
error in backend: 32-bit absolute addressing is not supported in 64-bit mode :
movb KeccakPowerOf2(arg2), %al
xorb %al, (arg1)
with
#define arg1 %rdi
#define arg2 %rsi
and
KeccakPowerOf2:
.byte 1, 2, 4, 8, 16, 32, 64, 128
3 --
error in backend: 32-bit absolute addressing is not supported in 64-bit mode
leaq KeccakLaneComplementTable, arg5
with
#define arg5 %r8
and
`KeccakLaneComplementTable:
.quad 0
.quad 0xFFFFFFFFFFFFFFFF // 1 be
.quad 0xFFFFFFFFFFFFFFFF // 2 bi
.quad 0
.quad 0
.quad 0
.quad 0
.quad 0
.quad 0xFFFFFFFFFFFFFFFF // 8 go
.quad 0
.quad 0
.quad 0
.quad 0xFFFFFFFFFFFFFFFF // 12 ki
.quad 0
.quad 0
.quad 0
.quad 0
.quad 0xFFFFFFFFFFFFFFFF // 17 mi
.quad 0
.quad 0
.quad 0xFFFFFFFFFFFFFFFF // 20 sa
.quad 0
.quad 0
.quad 0
.quad 0`
Any ideas ?
Thank you