Closed bchurchill closed 8 years ago
Unfortunately, I don't know an easy way to fix this because the parser for Operands doesn't have enough conctext to know what opcode it's going to be associated with.
Apparently there's code (which I probably wrote) involving the "set_type_maybe_unless_I_know_better_hack" function that's supposed to handle this, but it's not working properly. To fix this, someone would need to investigate.
That's code the two of use wrote together to fix some other issue. Sounds like we really need to fix the operand hierarchy and make sure we don't cast things from one thing to another all over the place. This has cause SO MANY problems, and probably is even the cause for several open tickets (I'm pretty sure it's the cause of https://github.com/StanfordPL/stoke/issues/765).
We could get together in Gates some time and just work through this together and fix it once and for all, without any stupid hacks.
This generally isn't a problem for assembling parsed code, but it's a problem if you rely on the reported width of a memory operand being correct (via Operand::size()).