ISA parser: Simplify operand type handling.
Review Request #655 - Created April 24, 2011 and submitted
| Information | |
|---|---|
| Gabe Black | |
| gem5 | |
| Reviewers | |
| Default | |
| ali, gblack, nate, stever | |
ISA parser: Simplify operand type handling. This change simplifies the code surrounding operand type handling and makes it depend only on the ctype that goes with each operand type. Future changes will allow defining operand types by their ctypes directly, convert the ISAs over to that style of definition, and then remove support for the old style. These changes are to make it easier to use non-builtin types like classes or structures as the type for operands.
Posted (May 28, 2011, 2:58 p.m.)
The description is a little general; can you be more specific about what this change is doing? I see that you're getting rid of the size from the memory access operands and encoding that in the ctype instead, which seems fine. However it seems like you've gotten rid of a lot of the signed vs. unsigned code, and made everything look unsigned, and I don't see how that still works.
-
src/arch/mips/isa/decoder.isa (Diff revision 1) -
This confuses me... how is it that lb & lbu (and lh & lhu) have identical definitions now? What is it that makes lb and lh signed?
Posted (July 1, 2011, 4:29 a.m.)
-
src/arch/power/isa/decoder.isa (Diff revision 3) -
I'm still not super happy with these explicit casts... don't they go away when you finally get to supporting arbitrary types anyway? Can we just flatten this series of changes to get rid of this interim step?
Posted (July 2, 2011, 2:21 a.m.)
-
src/arch/power/isa/formats/mem.isa (Diff revision 4) -
val doesn't seem to be used anywhere else; why not get rid of it and rewrite this as: getMem(pkt, *((%(mem_acc_type)s*)&Mem), traceData); Is there any case where Mem is not of mem_acc_type? If not, it could be a lot simpler even...
