[gem5-users] Re: Variable Definitions

2021-06-03 Thread Jason Z via gem5-users
Hi Giacomo,

Thank you so much for your response and for the great explanation, that helps a 
lot!

I noticed that I don't have the directory 
src/arch/isa/isa_parser/operand_types.py but I think I have the same code in 
the src/arch/isa_parser.py, but I downloaded the gem5 code a few months ago, so 
maybe I'll try downloading the code again as well.

Thank you again for your help, I'll keep plugging away!

Respectfully,

Jason Z.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


[gem5-users] Re: Variable Definitions

2021-06-03 Thread Giacomo Travaglini via gem5-users
Hi Jason,

At a certain point I should really come up with an ISA documentation to upload 
on gem5.org
Anyway, those are magic operands defined in the operands file [1].
(More specifically [2] and [3]).

When the ISA parser detect those magic words, it translates them into an 
appropriate action (generates some C++ code). For example
XDest is an integer destination register and the parser translates it into a 
GPR read [4] in case of:

val = XDest

and in a GPR write [5] in case of

XDest = val

Let me know if this helps

Kind Regards

Giacomo


[1]: https://github.com/gem5/gem5/blob/stable/src/arch/arm/isa/operands.isa
[2]: https://github.com/gem5/gem5/blob/stable/src/arch/arm/isa/operands.isa#L685
[3}: https://github.com/gem5/gem5/blob/stable/src/arch/arm/isa/operands.isa#L194
[4]: 
https://github.com/gem5/gem5/blob/stable/src/arch/isa_parser/operand_types.py#L199
[5]: 
https://github.com/gem5/gem5/blob/stable/src/arch/isa_parser/operand_types.py#L216

> -Original Message-
> From: Jason Z via gem5-users 
> Sent: 02 June 2021 19:09
> To: gem5-users@gem5.org
> Cc: Jason Z 
> Subject: [gem5-users] Variable Definitions
>
> Hello Everyone,
>
> I am in the process of trying to add a new instruction, so I am trying to make
> sure I understand the code and the things that I need to change/utilize, but I
> was wondering if there was a better way to determine what each of the
> variables are referring to in gem5 as I haven't been able to find where they
> would be defined.
>
> For instance, in the file src/arch/arm/isa/insts/str64.isa, I am looking into 
> the
> variables Mem_ud and XDest_ud to make sure I understand how a store
> works.
>
> I have been piecing together what I can based on the context and searching
> online, but I just wanted to make sure that I'm not going about it the hard
> way or if this is the correct approach by just considering the context they 
> are
> used.
>
> Thank you for your time!
>
> Respectfully,
>
> Jason Z.
> ___
> gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an
> email to gem5-users-
> le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s