Hi there,
This lab build up on top of the past lab, this time we need to make a new volume function that will use SVE2 syntax.
Even though it looks simple, it is really hard to understand inline assembler and intrinsic code.
For this lab, I decided to change one of the previous functions to use sve2
.
My Approach
The one function I decided to change was vol4(remembering that vol4.c was made by the professor, not by me):
First things I had to change was adding the sve header file:
After that, instead of using the v
registers, I used z
as instructed in the sve2 instructions:
(Image from: https://developer.arm.com/documentation/102340/0001/SVE2-architecture-fundamentals?lang=en)
The change was not huge, but without the sve2 instructions on the Makefile it could not compile:
And to run it we need to to use qemu-aarch64
:
Without it we have a illegal instruction error:
Core dumped:
On object dump, we can see that sqrdmulh
is using the z
registers.
Objdump -d
Thank you for your reading!
Top comments (0)