Question: Use the following C code: struct Node{ char c; double value; struct Node* next; int flag; struct Node* left; struct Node* right; }; typedef struct

Use the following C code:

 struct Node{ char c; double value; struct Node* next; int flag; struct Node* left; struct Node* right; }; typedef struct Node* pNode; /* NodeTree is an array of N pointers to Node structs */ pNode NodeTree[N];

Use the following C code: struct Node{ char c; double value; struct

For each of the four C references below, please indicate which assembly code section (labeled A F) places the value of that C reference into register %eax. If no match is found, please write NONE next to the C reference.:

1. NodeTree [i] -> flag?

2. NodeTree [i] -> left -> left -> c?

3. NodeTree[i] -> next -> next -> flag?

4. NodeTree [i] -> right -> left -> left?

The initial register-to-variable mapping for each assembly code section is: %eax = starting address of the Node Tree array %edx = i . sall $2, %edx leal ( ,dx), mov 16(), b. sall $2,%edx leal ( , dx), movl (%eax), %eax 24(), mov 20(%eax), vl 20(%eax), . sall $2,%edx leal ( ,%edx),%eax 20(), mov 20(%eax), ovsbl (), d. sall $2,%edx leal ( ,%edx),%eax (), mov 16(), . sall $2, %edx leal(%eax , dx), movl %eax), %eax mov 16(), mov 16(), mov 20(%eax), f. sall $2, %edx leal (%eax, %edx), %eax movl %eax), %eax mov 12(), 12(), mov 16(), The initial register-to-variable mapping for each assembly code section is: %eax = starting address of the Node Tree array %edx = i . sall $2, %edx leal ( ,dx), mov 16(), b. sall $2,%edx leal ( , dx), movl (%eax), %eax 24(), mov 20(%eax), vl 20(%eax), . sall $2,%edx leal ( ,%edx),%eax 20(), mov 20(%eax), ovsbl (), d. sall $2,%edx leal ( ,%edx),%eax (), mov 16(), . sall $2, %edx leal(%eax , dx), movl %eax), %eax mov 16(), mov 16(), mov 20(%eax), f. sall $2, %edx leal (%eax, %edx), %eax movl %eax), %eax mov 12(), 12(), mov 16()

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!