jasmin
jasmin copied to clipboard
Internal error for addresses with MMX variables
This program
export
fn main() -> reg u64 {
reg u64 x;
x = 0x1000;
#mmx reg u64 y;
y = x;
[y] = 0;
return x;
}
fails, which is expected, but with an internal error: internal compilation error in function main: asmgen: Invalid register name : MM0
. I think it should be a user error. Same happens for reg ptr
.
Thanks for the report. In this case, I think that register allocation should fail. Is that right?
I'm not sure who's supposed to report the error here, for this case I would be ok with changing the error at assembly generation. But it's true that in general maybe it's better add constraints to the register allocation graph, restricting which registers can be allocated to variables of addresses.