RE-POST February: iFunc Demo Code
This post would be about my experience with iFunc demo code.
iFunc Demo Code
First, I had to clone it into the aarch64 machine. To do that, I had to access the server first.
Then use this command in the terminal, in my case I used Bash:
git clone https://github.com/ctyler/ifunc-aarch64-demo.git
when we are doing the following command:
less ifunc-test.c
Depending on our HW capability, it would run the proper function.
In our main code, it would call the function foo() 3 times to see what is going on:
This file also has a preprocessor directive:
Note that this machine does not have SVE2 and SVE capabilities, so we are expecting the *foo_nonsve function to run:
In our main code, it would call the function foo() 3 times to see what is going on:
This file also has a preprocessor directive:
This makes sure that we are running it on the aarch64 system.
If make command was previously used, clean it up with make clean, which will remove the file, then do make again:
The -03 is the build at optimization level 3 of ifunc-test.c outputting into ifunc-test.
To run the file use:
./ifunc-test
Comments
Post a Comment