Question: Your next task is to get your computer to execute an operation for you. In particular, you will have your computer count the number of

Your next task is to get your computer to execute an operation for you. In particular, you will have your computer count the number of bits that are set to 1 in the value of the RAX register and place the result in RBX. In this task, you will no longer use Gdb functionality to set the values of registers. Instead, you will program your Kex computer itself to perform this operation. You will do that by writing an assembly instruction to the memory of your computer and then allowing your computer to execute that instruction. T

o do this you will need to write the bytes that correspond to the IA64 opcode for the popcnt instruction: popcnt %rax, %rbx

The opcode for this instruction is: 0xf3, 0x48, 0x0f, 0xb8, 0xd8

You will need to have the CPU execute this instruction and then examine the register values to see if things look right. After that, you will need to write the appropriate q2 Gdb function in q2.gdb and ensure that make q2 passes.

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!