[BUGFIX] Register Bank has no is_pc - #114
Conversation
| % if not isinstance(reg, (arch.Memory, arch.Alias, arch.RegisterBank)): | ||
| % if not reg.is_pc: | ||
| % if isinstance(reg.ty, type_info.ArrayType): | ||
| for (int i = 0; i < ${arch.get_const_or_val(reg.ty.length)}; ++i) |
There was a problem hiding this comment.
Good catch that my solution was a bit sloppy here.
Excluding RegisterBanks seems a bit contradictory, as we explicitly initialize a RegisterBank in the following three lines.
I would suggest moving the if not reg.is_pc check into the else branch instead.
As ArrayType=RegisterBank and PrimitiveType=Register
Does that fix your issue?
I assume this is also just there to avoid pointing your PC to the Interrupt Vector Table aka 0
There was a problem hiding this comment.
Fine by me!
Works for me. The problem for me was simply, that if the register bank is not in there, it crashed on the if is_pc check, since the register bank does not support this attribute.
I have rebuilt everything with your solution, so it works for me!
Thanks for fixing it :-)
|
@MercurCodes Does this commit fix your problems? |
No description provided.