Question: The function: long decode2 (long x, long y, long z); ... compiles, using gcc -og -s , to: decode2: mova suba imulq salg sarq xora

 The function: long decode2 (long x, long y, long z); ...

The function: long decode2 (long x, long y, long z); ... compiles, using gcc -og -s , to: decode2: mova suba imulq salg sarq xora adda ret trdi, frax frdx, frax frax, frdi $63, frax $63, frax trdi, frax $rsi, frax Your task is to write C code for decode2 that compiles exactly to these instructions. To check your solution, compile hw3.c using: $ gcc -Og -s hw3.c $ nano hw3.3 I recommend that you first identify which registers correspond to x, y, z. For this, you could try to see what is the assembly produced if decode2 were simply: The function: long decode2 (long x, long y, long z); ... compiles, using gcc -og -s , to: decode2: mova suba imulq salg sarq xora adda ret trdi, frax frdx, frax frax, frdi $63, frax $63, frax trdi, frax $rsi, frax Your task is to write C code for decode2 that compiles exactly to these instructions. To check your solution, compile hw3.c using: $ gcc -Og -s hw3.c $ nano hw3.3 I recommend that you first identify which registers correspond to x, y, z. For this, you could try to see what is the assembly produced if decode2 were simply

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!