SPO600 – Lab 3

AArch64 code: .text .globl _start beg = 0 max = 31 _start: mov x28,beg mov w20,0 add w26,w20,0x30 loop: // div mov x20, 10 udiv x21,x28,x20 msub x22,x20,x21,x28 // msg add w23,w21,0x30 add w24,w22,0x30 adr x25,msg strb w24,[x25,7] cmp w23,w26 beq continue strb w23,[x25,6] continue: // write mov x2,len adr x1,msg mov x0,1 mov x8,64 […]

Read more "SPO600 – Lab 3"

SPO600 Project – inet/ether_line.c

Function: ether_line() int ether_line(const char *l, struct ether_addr *e, char *hostname); The function ether_line() scans l,an ASCII string in ethers(5) format and sets e to the ethernet address specified in the string and h to the hostname. This function is used to parse lines from /etc/ethers into their component parts. The ether_line() function returns zero […]

Read more "SPO600 Project – inet/ether_line.c"

SPO600 Project – blog #2

To know the differences in performance between the different architectures, I created a small program to see what was the difference in time when running them both between both AARCH64 and X86_64 architectures. Basic testing program: #include <string.h> #include <stdio.h> int main(void){ char* res; for(int i = 0; i < 10000000; i++){ char* hash = […]

Read more "SPO600 Project – blog #2"

Lab 06: Vectorization Lab

Source Code: #include #include int main(void){ int a1[1000]; int a2[1000]; int a3[1000]; int a, b, c, d, e; long n = 1000000; for(a = 0; a < 1000; a++){ a1[a] = rand()%100; a2[a] = rand()%100; } for(b = 0; b < 1000; b++){ a3[b] = (a1[b] + a2[b]); } for(c = 0; c < 1000; […]

Read more "Lab 06: Vectorization Lab"

Lab 04: Compiled C Lab

In this lab we were tasked to write a program and compile it with different compiler options in GCC, also check the difference withing the Disassembly part of the code in the objdump output. Both the code I wrote and the string to be printed can be found in the <main> section of the disassembly […]

Read more "Lab 04: Compiled C Lab"