Hello still unfamiliar with x86 just want to make sure i get

Hello, still unfamiliar with x86 just want to make sure i get them right, can s/o correct me

Translate f = g - h to x86. Assume f, g and h are in registers %rax, %rbx and %rcx.

movq %rbx, %rax

subq %rcx, %rax

Solution

MOVQ g %rbx

MOVQ h %rcx

SUBQ h g

MOVQ g f

MOVQ f %rcx

----------------------------------------------

mov 16(%rbp) %rcx

sub 8(%rbp) , %rcx

mov %rcx -8(%rbp)

Hello, still unfamiliar with x86 just want to make sure i get them right, can s/o correct me Translate f = g - h to x86. Assume f, g and h are in registers %rax

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site