Hi,

If you are just planning on introducing a single register, you could consider 
extending the number of IntRegs, or to add this extra register as a MiscReg 
(but be careful in the latter case, as MiscRegs are not renamed).

If you really want to define a new register class, we have recently pushed some 
patches which are implementing FEAT_SME in gem5 by adding matrix registers.
I suggest you have a look at the following patches:

https://gem5-review.googlesource.com/c/public/gem5/+/64333/1
https://gem5-review.googlesource.com/c/public/gem5/+/64334/1

You could use them as an example/to get an idea on what should be done

Kind Regards

Giacomo

From: 等价无穷小 via gem5-users <gem5-users@gem5.org>
Date: Tuesday, 29 November 2022 at 11:15
To: gem5-users <gem5-users@gem5.org>
Cc: 等价无穷小 <zhang...@foxmail.com>
Subject: [gem5-users] Add custom Register In ARM
Hi all,
Recently, I wanted to add a new custom register in gem5, and the load/store 
instruction can take the custom register as src/dest register to move data from 
memory. Is there some suggestions about this?

And I have some confusion about the register implementation in gem5. In 
src/cpu/reg_class.hh/cc file, defining the RegClass and RegId class, if I add a 
new custom register, should I add a new Regclass, like CustomClass, and give it 
new RegId? And in the src/arch/arm, there are five files about the register: 
ccregs.hh、intregs.hh、miscregs.hh/cc 、registers.hh .In these files, everyone of 
these file almost enumorate the RegIndex, I understand it just a signature of a 
register, how can i map the register to the signature?

Thanks,
ZhangMeng
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

Reply via email to