In C langue:
#define Temp el2
asm("msr x, " #Temp)
=> asm("msr x, el2")
In Rust langue:
const Temp: &str = "el2";
asm!(concat!("msr x, " , stringfy!(Temp)))
=> asm!("msr x, Temp")
The results are different
I think by changing “const Temp: &str = "el2";†or stringfy!(Temp), the result is the same as C.
1 post - 1 participant