diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-03-29 06:35:41 +0100 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-03-29 06:35:41 +0100 |
| commit | dea28126ae9cf24556ae7a1957368df4377e06aa (patch) | |
| tree | 9bcb7fe3266aeb4477d7020670e2f19cb000c45e | |
| parent | 99f79e390d46e8c51ad7a628919e29e8b27335f0 (diff) | |
| download | plan9front-dea28126ae9cf24556ae7a1957368df4377e06aa.tar.xz | |
5c: dont substibute (destination) registers contained in MOVM reglist
this fixes the miscompilation of 6l with 5c resulting in bogus
vlong -> long conversion at the top of asmandsz():
asmandsz 0x0000aec4 MOVW.W R14,#-0x2c(R13)
asmandsz+0x4 0x0000aec8 MOVW rex+8(FP),R5
asmandsz+0x8 0x0000aecc MOVW $andptr-SB(SB),R7
asmandsz+0xc 0x0000aed0 MOVW R0,R6
asmandsz+0x10 0x0000aed4 AND $#0x44,R5,R8
asmandsz+0x14 0x0000aed8 MOVW R8,rex+8(FP)
asmandsz+0x18 0x0000aedc MOVW R0,R4
asmandsz+0x1c 0x0000aee0 MOVM.IA (R0),[R1,R3] <- R1 used here
asmandsz+0x20 0x0000aee4 MOVW R8,v-4(SP) <- substituted by R8
| -rw-r--r-- | sys/src/cmd/5c/peep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/5c/peep.c b/sys/src/cmd/5c/peep.c index c7f52512b..8ae41af6c 100644 --- a/sys/src/cmd/5c/peep.c +++ b/sys/src/cmd/5c/peep.c @@ -337,7 +337,7 @@ subprop(Reg *r0) break; case AMOVM: - t = 1<<v2->reg; + t = (1<<v1->reg) | (1<<v2->reg); if((p->from.type == D_CONST && (p->from.offset&t)) || (p->to.type == D_CONST && (p->to.offset&t))) return 0; |
