subject
Engineering, 26.02.2020 02:22 123martinnnnn

Consider the following high-level recursive procedure:
long long int f(long long int n, long long int k) {
long long int b;
b=k+2;
if (n==0) b = 8;
else b = b + 4 * n + f(n-1,k+1);
return b + k;
}
Translate the high-level procedure f into ARMv8 machine code.

a. Use the ARMv8 preserved register convention;
b. Assume that the procedure starts at address 0x00400100;
c. Keep local variable b in X19;
d. Assume n and k are passed in X0 and X1 respectively and that the result is returned in X2.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Amass of m 1.5 kg of steam is contained in a closed rigid container. initially the pressure and temperature of the steam are: p 1.5 mpa and t 240°c (superheated state), respectively. then the temperature drops to t2= 100°c as the result of heat transfer to the surroundings. determine: a) quality of the steam at the end of the process, b) heat transfer with the surroundings. for: p1.5 mpa and t 240°c: enthalpy of superheated vapour is 2900 kj/kg, specific volume of superheated vapour is 0. 1483 m/kg, while for t 100°c: enthalpy of saturated liquid water is 419kj/kg, specific volume of saturated liquid water is 0.001043m/kg, enthalpy of saturated vapour is 2676 kj/kg, specific volume of saturated vapour is 1.672 m/kg and pressure is 0.1 mpa.
Answers: 3
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Burgers vector is generally parallel to the dislocation line. a)-true b)-false
Answers: 2
You know the right answer?
Consider the following high-level recursive procedure:
long long int f(long long int n, long...
Questions
question
Mathematics, 12.04.2021 18:00
question
Mathematics, 12.04.2021 18:00
Questions on the website: 13722359