Course Solutions Uncategorized (Answered) : Q1 Convert Following C Codes Equivalent Ia 64 Assembly Codes Per Gcc Conventions Else Else Q28864706

(Answered) : Q1 Convert Following C Codes Equivalent Ia 64 Assembly Codes Per Gcc Conventions Else Else Q28864706

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 =

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post