diff options
Diffstat (limited to 'src/cmd/5l/asm.c')
-rw-r--r-- | src/cmd/5l/asm.c | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/src/cmd/5l/asm.c b/src/cmd/5l/asm.c index 34565629f..7163997c0 100644 --- a/src/cmd/5l/asm.c +++ b/src/cmd/5l/asm.c @@ -637,13 +637,6 @@ wput(int32 l) cflush(); } -void -wputl(ushort w) -{ - cput(w); - cput(w>>8); -} - void hput(int32 l) @@ -672,20 +665,6 @@ lput(int32 l) } void -lputl(int32 l) -{ - - cbp[3] = l>>24; - cbp[2] = l>>16; - cbp[1] = l>>8; - cbp[0] = l; - cbp += 4; - cbc -= 4; - if(cbc <= 0) - cflush(); -} - -void cflush(void) { int n; @@ -1491,15 +1470,24 @@ if(debug['G']) print("%ux: %s: arm %d %d %d\n", (uint32)(p->pc), p->from.sym->na o1 |= (p->scond & C_SCOND) << 28; break; case 80: /* fmov zfcon,freg */ - if((p->scond & C_SCOND) != C_SCOND_NONE) - diag("floating point cannot be conditional"); // cant happen - o1 = 0xf3000110; // EOR 64 - - // always clears the double float register + if(p->as == AMOVD) { + o1 = 0xeeb00b00; // VMOV imm 64 + o2 = oprrr(ASUBD, p->scond); + } else { + o1 = 0x0eb00a00; // VMOV imm 32 + o2 = oprrr(ASUBF, p->scond); + } + v = 0x70; // 1.0 r = p->to.reg; - o1 |= r << 0; + + // movf $1.0, r + o1 |= (p->scond & C_SCOND) << 28; o1 |= r << 12; - o1 |= r << 16; + o1 |= (v&0xf) << 0; + o1 |= (v&0xf0) << 12; + + // subf r,r,r + o2 |= r | (r<<16) | (r<<12); break; case 81: /* fmov sfcon,freg */ o1 = 0x0eb00a00; // VMOV imm 32 |