[ARM64_PRINTER] Fix some case of DecodeBit not working for 64bits values

This commit is contained in:
ptitSeb 2024-04-20 15:10:12 +02:00
parent cdcb0a46dc
commit e0ef248943

View File

@ -34,10 +34,12 @@ uint64_t DecodeBitMasks(int N, int imms, int immr)
if(s==levels) return 0;
uint64_t mask = (1LL<<(s+1))-1;
if(r) { // rotate
mask=(mask>>r)|(mask<<(e-r));
mask&=((1LL<<e)-1);
mask=(mask>>r)|(mask<<(e-r));
if(e<64) {
mask&=((1LL<<e)-1);
}
}
while (e<64) { // replicate
while(e<64) { // replicate
mask|=(mask<<e);
e<<=1;
}