Question: Consider the assembly code on the next page that comes straight from a compilation on shannon, with the -O2 optimization ag, of C code that

Consider the assembly code on the next page that comes straight from a compilation on shannon, with the -O2 optimization ag, of C code that has the following overall form: long loop(long x, int n) {

long result = _______;

long mask;

for (mask = _______; mask _______ ; mask = _______) {

result ^= _______; }

return result;

}

Here is a screenshot of the assembly code: https://gyazo.com/cab6c0af9c0f5b4d7109c4f12a348f8d

Please explain how you filled in the code using assembly code. thank you

Also: how does mask and result get updated?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!