Question

What would be the correct y86-64 assembly code equivalent of the x86-64 line of assembly below?...

What would be the correct y86-64 assembly code equivalent of the x86-64 line of assembly below?
leaq   8(%rsi), %rsi

Also, if you could provide a few other examples of common, difficult conversions from x86-64 to y86-64 assembly code, I would greatly appreciate it. I know a few of the single- and two-line assembly equivalents in y86-64 (such as movq -> irmovq or mrmovq), but quite a few others like the one above aren't quite as intuitive for me. Perhaps a table containing some of the more difficult conversions would be helpful? Thank you!

Homework Answers

Answer #1

solution:-

Given Instruction is -- leaq   8(%rsi), %rsi

this is a x86-64 code which is used to load effective address (leaq) in designated register. Here given register is %rsi and 8 is offset. the content of %rsi register a memory address and offset 8 is added to memory address. Now this effective addressstored to the register %rsi.

Now if we implement this instruction in  y86-64 code then we use "rrmovq" instrucion. this instruction simply moves the content of a register to another register. So required instruction in y86-64 code is-

rrmovq 8(%rsi), (%rsi)

Some other examples are-

In y86-64 code

irmovq: immediate to register (ex: irmovq $18600, %r8)

rrmovq: register to register (ex: rrmovq %r8, %r9)

mrmovq: memory to register (ex: mrmovq (%rbp), %rdx )

rmmovq: register to memory (ex: rmmovq %rdx, (%rbp))

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • Compare and contrast Cross-Site Scripting and SQL Injection attacks, including with the effort needed and value...
    asked 4 minutes ago
  • C++ 1a) Assume that you have an integer variable named myint. Call xyzfunc and pass myint...
    asked 16 minutes ago
  • For each of the following, write the requested program or subroutine in pseudocode (as described in...
    asked 27 minutes ago
  • Ask the user for integers. If the user did not enter an integer, ask again. (Type...
    asked 29 minutes ago
  • Consider the ElGamal encryption scheme over an elliptic curve E: y2 =x3+x+6 over GF(11) and let...
    asked 33 minutes ago
  • Childress Company produces three products, K1, S5, and G9. Each product uses the same type of...
    asked 42 minutes ago
  • Using Inheritance Consider the following (base) class. class Employee(object): def __init__(self, name, salary): self._name = name...
    asked 51 minutes ago
  • Conditional Probability Problem: An urn contains 5 red balls, 4 green balls, and 4 yellow balls...
    asked 1 hour ago
  • A high performance 4 stroke supercharged gasoline engine is being designed. The target specifications are as...
    asked 1 hour ago
  • Create a web page containing a form allowing the user to enter variables for some type...
    asked 1 hour ago
  • ABC Company has a cash cycle of 11.06 days, an operating cycle of 23.05 days, and...
    asked 2 hours ago
  • Determine whether the following variables are. a. qualitative/Quantitative b. Discrete/Continuous c. Identify the level of measurement(nominal,...
    asked 2 hours ago