Register values: Register 64-bit Contents %rax 10x100 %rsi 10x1 Relevant area of
ID: 3872551 • Letter: R
Question
Register values: Register 64-bit Contents %rax 10x100 %rsi 10x1 Relevant area of Memory Address 32-5it contents 0x100 Ox70 0x104 0x80 x108 0x42 x110 Ox100 Values are decimal unless preceded by 0x. The movl instruction moves 32 bits of data from the given source to the given destination. For each instruction below, indicate what is updated (if register, give name including %. If memory, give as Maddress, where address is in hex-M[0x2] is an example) and ,what the new value is. Treat each instruction independently - this is not a sequence of instructions. New Value Instruction What changed? movl 0x1 cc, %rax movl 0x1 cc (%rax) movl 0x99, 8(%rax) movl %rdi,(%rax, %rdi) movl 16(%rax),%rdi movl (%rax, %rsi,8),9érax movl 4(%rax,%rdi,2),%rsi movl %rdi,16(%rax,%rax,2)Explanation / Answer
The 'What changed?" and "New Value" columns are updated in table below for each given instruction along with explanation.
Instruction What changed? New Value Explanation movl 0x1cc, %rax M[0x1CC] 0x100 Move value in register %rax into memory address 0x1CC movl 0x1cc, (%rax) M[0x1CC] 0x70 Move value at address 0x100 (%rax) into memory address 0x1CC movl 0x99, 8(%rax) M[0x099] 0x42 Move value at address 0x108 (%rax + 8) into memory address 0x099 movl %rdi, (%rax,%rdi) %rdi 0x80 Move value at address 0x104 (%rax + %rdi) into register %rdi movl 16(%rax), %rdi M[0x10F] 0x4 Move value in register %rax into memory address 0x110 (%rax + 0x10) movl (%rax,%rsi,8), %rax M[0x108] 0x100 Move value in register %rax into memory address 0x108 (%rax + %rsi * 8) movl 4(%rax,%rdi,2), %rsi M[0x10C] 0x1 Move value in regiser %rsi into memory address 0x10C (%rax + %rdi * 2 + 4) movl %rdi, 16(%rax,%rax,2) %rdi Value at address M[0x310] Move value at address 0x310 (%rax + %rax * 2 + 16) into register %rdi