5c: format assembly constant right shift encoding 0 as >>32
This commit is contained in:
parent
b46a0e97ea
commit
a5d8cd30bb
1 changed files with 6 additions and 2 deletions
|
@ -138,8 +138,12 @@ Dconv(Fmt *fp)
|
|||
op = "<<>>->@>" + (((v>>5) & 3) << 1);
|
||||
if(v & (1<<4))
|
||||
snprint(str, sizeof str, "R%d%c%cR%d", v&15, op[0], op[1], (v>>8)&15);
|
||||
else
|
||||
snprint(str, sizeof str, "R%d%c%c%d", v&15, op[0], op[1], (v>>7)&31);
|
||||
else {
|
||||
int sh = (v>>7)&31;
|
||||
if(sh == 0 && (v & (3<<5)) != 0)
|
||||
sh = 32;
|
||||
snprint(str, sizeof str, "R%d%c%c%d", v&15, op[0], op[1], sh);
|
||||
}
|
||||
if(a->reg != NREG)
|
||||
snprint(str+strlen(str), sizeof(str)-strlen(str), "(R%d)", a->reg);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue