Posts

Showing posts from November, 2023

Project - Stage 2 (Part 2)

In this post, I will continue to work on SPO600 Project - Stage 2. This post will include the part 2 of the project, which is about the design. You can see Stage 2 - Part 1 here . 1. Design how an automatic ifunc implementation within the GCC compiler could work from the user's point of view. 1-1) What options should the user specify on the command line to indicate that they want automatic ifunc capability to be applied during the compilation? -fauto-ifunc It would instruct the GCC compiler to enable automatic ifunc generation during the compilation process.    1-2)  How should the user specify the list of architecture variants they want to target? (e.g., a base architecture of "armv8-a" and extended architectures of "armv8-a+sve" and "armv8-a+sve2", or a similar list of architecture variants for other platforms). User can specify the list of architecture variants by using  -march-variants . For example,  -march-variants=base  selects the base architec

Project - Stage 2 (Part 1)

In  SPO600 project - Stage 2 , i t is divided into 2 parts: (1) examine the intermediate code output of the compiler (2) propose a design for how the automatic ifunc capability could operate from the user's point of view I will work on the part 1 in this post. 1. Unpack the file First of all, run  cd ; tar xvf /public/spo600-autoifunc-preprocessor-pos.tgz  to make sure you have the unpacked file in your directory. 2. Build the code What does the scripts/autoifunc script or program do? It utilizes the GCC compiler to automatically build functions as Indirect Functions (ifunc). ifunc is a mechanism used to selectively support specific features at runtime. Certainly, let's take a brief look at a few lines of code related to the functionality of the script: The script uses the makeheaders command to generate a .h file from a  .c  file for the purpose of obtaining function prototypes.      ...     makeheaders "${TEMP_C}.c"     ... The generated resolver function utilize

Lab 4 - 64-bit Assembly Language Lab

Image
 Today, I will discuss  64-bit Assembly Language Lab  and modify the code to get the different results. First, let's unpack the code examples to my home directory by using  tar -xvf /public/spo600-assembler-lab-examples.tgz command. Now I can find the directory in my home directory. Let's start the lab! 1. Review, build, and run the aarh64 assembly language programs. Take a look at the code using  objdump -d objectfile  and compare it to the source code.