void get_register_element(el_reg_t* el, int gpr, int element, int width) {
switch (width) {
case 64: el->l = int_regfile[gpr].l[element];
+ case 32: el->i = int_regfile[gpr].i[element];
+ case 16: el->s = int_regfile[gpr].s[element];
+ case 8 : el->b = int_regfile[gpr].b[element];
+ }
+ }
+ void set_register_element(el_reg_t* el, int gpr, int element, int width) {
+ switch (width) {
+ case 64: int_regfile[gpr].l[element] = el->l;
+ case 32: int_regfile[gpr].i[element] = el->i;
+ case 16: int_regfile[gpr].s[element] = el->s;
+ case 8 : int_regfile[gpr].b[element] = el->b;
}
}
```