5월, 2024의 게시물 표시

Lab 3 - Aarch64 assembly challenge

 Introduction  This week, I tried to overcome the aarch64 compiler challenge at Lab3. The task is very simple, it is just creating multiply table from 1 to 12 with aarch64 assembly compiler. Before creating the code, I made it with C language. int main () { for ( int i = 1 ; i < 13 ; i ++ ){ for ( int z = 1 ; z < 13 ; z ++ ) { printf ( " %d X %d = %d \n " , z , i , i * z ); } printf ( "------------ \n " ); } return 0 ; }   In order to make multiplication table, it needs to use double loop. Assembly Code once I created above program with C language I tried to make the assembly code based on the C code. set the outer index variable to 1. .text .globl _start min = 1 max = 13 _start :     mov x19 , min       // i = 1 Outer loop start: initially I set x15, x16 to 10 and 100 respectively to calculate tens and hundreds place. Once I calculate tens place of index in outer loop I conve...

Project Stage - 1 GCC for AArch64

Goal: The primary goal of this project is to add a functioning proof-of-concept prototype of auto-function-multi-versioning capability to the GNU Compiler Collection (GCC) for AArch64 systems. Building GCC on AArch64: Download GCC Source:   Start by cloning the latest GCC source code from the official GCC repository: sangwooshin@sinsang-us-MacBook-Pro % git clone git://gcc.gnu.org/git/gcc.git Cloning into 'gcc'... remote: Enumerating objects: 3044476, done. remote: Counting objects: 100% (224151/224151), done. remote: Compressing objects: 100% (13890/13890), done. remote: Total 3044476 (delta 219673), reused 210438 (delta 210250), pack-reused 2820325 Receiving objects: 100% (3044476/3044476), 1.16 GiB | 13.98 MiB/s, done. Resolving deltas: 100% (2506365/2506365), done. Updating files: 100% (134862/134862), done. Create Separate Build Directory: mkdir project cd project Configure GCC: Configure the build for AArch64: [sshin36@aarch64-001 project]$ ../configure --target=aarch64-l...