Currently, all of the assembler and related logic is templated on types that match the register width of the target architecture (e.g. uint32_t for 32-bit, uint64_t for 64-bit) - and someplace also instruction width.
It would be interesting to see whether providing register width dynamically would only be a neglible slowdown as opposed to the current implementation. If so, I personally think it's a valid tradeoff, given that we can simplify a bunch of code and remove templates.
Currently, all of the assembler and related logic is templated on types that match the register width of the target architecture (e.g.
uint32_t
for 32-bit,uint64_t
for 64-bit) - and someplace also instruction width.This absolutely infects all of the related code, which usually is an indication that it's not a good design pattern, e.g.: https://github.com/mortbopet/Ripes/blob/master/src/assembler/assembler.h#L61-L76
It would be interesting to see whether providing register width dynamically would only be a neglible slowdown as opposed to the current implementation. If so, I personally think it's a valid tradeoff, given that we can simplify a bunch of code and remove templates.