gem5-users@gem5.org

The gem5 Users mailing list

View all threads

curMacroop Size and Hex representation

AS
Abdelrahman S. Hussein
Wed, Nov 8, 2023 7:32 AM

Hi,

I am working on fetch.cc of the O3 CPU src directory. I am looking at
curMacroop which is declared as "StaticInstPtr" . I am working with x86
ISA.

For each fetched macroop represented by curMacroop, I need to get the
instruction size and the hex representation (machine code of the
instruction). For example, for the following instruction,
mov    rdi,rsp

I would like to be able to get the following hex representation of this
instruction, that is  48 89 e7. Also, its size as well.

So, any guidance on this would be extremely appreciated.

Thanks,

--

Best,Abdelrahman Hussein

Hi, I am working on fetch.cc of the O3 CPU src directory. I am looking at curMacroop which is declared as "StaticInstPtr" . I am working with *x86 ISA.* For each fetched macroop represented by curMacroop, I need to get the instruction size and the hex representation (machine code of the instruction). For example, for the following instruction, mov rdi,rsp I would like to be able to get the following hex representation of this instruction, that is 48 89 e7. Also, its size as well. So, any guidance on this would be extremely appreciated. Thanks, -- *Best,Abdelrahman Hussein*