Reputation: 23
I'm working implementing AES-ECB encode/decode in ARM assembly. I'm working with a Jetson Nano which uses an ARM Cortex A57 which has cryptography extensions on hardware. The issue I'm running into is whenever I attempt to assemble my code, the assembler outputs the following.
aes.asm: Assembler messages:
aes.asm:14: Error: selected processor does not support `aese V0.16b,V0.16b'
Based on the documentation this CPU should support these instructions, I'm not sure what I am missing.
.section .text
.global _start
.arch armv8-a
_start:
mov x8, 64
mov x0, 1
ldr x1, =str
mov x2, str_len
svc 0
ldr x0, =a
ldp q0, q1, [x0]
aese V0.16b, V0.16b
mov x8, 0x5D
mov x0, 0x45
svc 0
.section .data
str: .ascii "starting\n"
str_len = .-str
.balign 1
a: .skip 16
a_len = .-a
b: .single 3.4, 2.5, 4.4, 6.6, 7.7, 8.8
b_size = .-b
Upvotes: 2
Views: 1261
Reputation: 58673
.arch armv8-a
tells the assembler to only accept base ARMv8-A instructions. The crypto instructions are not in the base instruction set, so you have to tell the assembler if you want to use this extension. Try .arch armv8-a+crypto
.
Keep in mind that the assembler has no knowledge of what extensions are supported by your target machine, unless you tell it.
See https://sourceware.org/binutils/docs/as/ARM-Options.html#ARM-Options for all architectures accepted by the -march
command line option and the .arch
directive.
Upvotes: 6