diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-09-03 18:18:28 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-09-03 18:18:28 +0200 |
commit | a5d8cd30bb126b301cd79393540be63558dcfe89 (patch) | |
tree | 82ce3ef83f248da3fcb3ab2cae1b0dd979e22de3 /sys/src/cmd | |
parent | b46a0e97ea5ec8666924ec34a6fa1cd86f899fcc (diff) |
5c: format assembly constant right shift encoding 0 as >>32
Diffstat (limited to 'sys/src/cmd')
-rw-r--r-- | sys/src/cmd/5c/list.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/src/cmd/5c/list.c b/sys/src/cmd/5c/list.c index d1599dcb1..66094c851 100644 --- a/sys/src/cmd/5c/list.c +++ b/sys/src/cmd/5c/list.c @@ -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; |