Q1:Convert the following C codes to equivalent IA-64assembly codes as per the GCC conventions.:
a) If else if else :
int compare(int a, int *b, int c) {
if (a > *b) return 1;
else if (a < *b)
if (c != a)
return 0;
else if (c > *b)
return -1;
else
return 0;
else return -1;}
===
b) Assume the functions get(), test(), and set() are alreadydefined.
char ch1, ch2; // assume their values are taken from userinput
switch (ch1) {
case âsâ:
set(ch1);
case âtâ:
ch2 = get(ch1);
switch(ch2) {
case 0:
test(0);
break;
default:
test(1);
}
break;}
====
c) Assume given a matrix A with number of rows N = 5and number of columns M = 4.
int i, j, product =
PayPal Gateway not configured
PayPal Gateway not configured