Overview
In the Memory trait, we have separate get/set functions for byte, halfword, word, and doubleword accesses. All of the implementations are the same, barring the field size.
We should look to reduce this boilerplate a bit, and create a single get/set function for all access widths. num-traits would likely be the best way to do this, but unfortunately, it does not have const handles for a type's bit length, min value, or max value.
Overview
In the
Memorytrait, we have separateget/setfunctions for byte, halfword, word, and doubleword accesses. All of the implementations are the same, barring the field size.We should look to reduce this boilerplate a bit, and create a single
get/setfunction for all access widths.num-traitswould likely be the best way to do this, but unfortunately, it does not haveconsthandles for a type's bit length, min value, or max value.