Question: Write the LEGv8 assembly for the following code snippet. One trick is to figure out how to get the large constant in a register when
Write the LEGv8 assembly for the following code snippet. One trick is to figure out how to get the large constant in a register when the ADDI instruction only allows 12-bit constants. Assume a is stored in register X9.
if(a == 1024){
a = 8 * a;
}
else {
a = a / 4;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
