The examples all compile now (probably incorrectly, and the libc doesn't
compile yet).
This commit is contained in:
parent
9d80756253
commit
26c0228b14
|
@ -233,6 +233,8 @@
|
|||
010011<RS-><RT->00000<FD->001101 "suxc1" FD=fpr ',' RT=gpr '(' RS=gpr ')'
|
||||
111001<RS-><FT-><IMM-----------> "swc1" FT=fpr ',' IMM=e16 '(' RS=gpr ')'
|
||||
010011<RS-><RT->00000<FD->001000 "swxc1" FD=fpr ',' RT=gpr '(' RS=gpr ')'
|
||||
010001<F-->00000<FS-><FD->001001 "trunc" ".l" F=fmt FS=fpr ',' FD=fpr
|
||||
010001<F-->00000<FS-><FD->001101 "trunc" ".w" F=fmt FS=fpr ',' FD=fpr
|
||||
|
||||
# Generic coprocessor instructions.
|
||||
|
||||
|
|
|
@ -208,20 +208,20 @@ struct hop* platform_move(struct basicblock* bb, struct hreg* src, struct hreg*
|
|||
switch (type)
|
||||
{
|
||||
case burm_int_ATTR:
|
||||
hop_add_insel(hop, "stw %H, %S(fp) ! %H", src, dest, dest);
|
||||
break;
|
||||
|
||||
case burm_float_ATTR:
|
||||
hop_add_insel(hop, "stfs %H, %S(fp) ! %H", src, dest, dest);
|
||||
hop_add_insel(hop, "sw %H, %S(fp) ! %H", src, dest, dest);
|
||||
break;
|
||||
|
||||
case burm_long_ATTR:
|
||||
hop_add_insel(hop, "stw %0H, 4+%S(fp) ! %H", src, dest, dest);
|
||||
hop_add_insel(hop, "stw %1H, 0+%S(fp) ! %H", src, dest, dest);
|
||||
hop_add_insel(hop, "sw %0H, 0+%S(fp) ! %H", src, dest, dest);
|
||||
hop_add_insel(hop, "sw %1H, 4+%S(fp) ! %H", src, dest, dest);
|
||||
break;
|
||||
|
||||
case burm_float_ATTR:
|
||||
hop_add_insel(hop, "swc1 %H, %S(fp) ! %H", src, dest, dest);
|
||||
break;
|
||||
|
||||
case burm_double_ATTR:
|
||||
hop_add_insel(hop, "stfd %H, %S(fp) ! %H", src, dest, dest);
|
||||
hop_add_insel(hop, "sdc1 %H, %S(fp) ! %H", src, dest, dest);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -233,15 +233,22 @@ struct hop* platform_move(struct basicblock* bb, struct hreg* src, struct hreg*
|
|||
switch (type)
|
||||
{
|
||||
case burm_int_ATTR:
|
||||
hop_add_insel(hop, "lwz %H, %S(fp) ! %H", dest, src, src);
|
||||
hop_add_insel(hop, "lw %H, %S(fp) ! %H", dest, src, src);
|
||||
break;
|
||||
|
||||
case burm_long_ATTR:
|
||||
/* Can't load straight into dest because it might overlap with src. */
|
||||
hop_add_insel(hop, "lw at, 0+%S(fp) ! %H", dest, src, src);
|
||||
hop_add_insel(hop, "lw %1H, 4+%S(fp) ! %H", dest, src, src);
|
||||
hop_add_insel(hop, "mov %0H, at", dest);
|
||||
break;
|
||||
|
||||
case burm_float_ATTR:
|
||||
hop_add_insel(hop, "lfs %H, %S(fp) ! %H", dest, src, src);
|
||||
hop_add_insel(hop, "lwc1 %H, %S(fp) ! %H", dest, src, src);
|
||||
break;
|
||||
|
||||
case burm_double_ATTR:
|
||||
hop_add_insel(hop, "lfd %H, %S(fp) ! %H", dest, src, src);
|
||||
hop_add_insel(hop, "ldc1 %H, %S(fp) ! %H", dest, src, src);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -679,7 +679,12 @@ PATTERNS
|
|||
|
||||
out:(double)reg = COPYL.D(in:(long)reg)
|
||||
emit "mtc1 %in.0, %out" /* mtc1 has reversed parameters */
|
||||
emit "mthic1 %in.1, %out" /* mtc1 has reversed parameters */
|
||||
emit "mthc1 %in.1, %out" /* mtc1 has reversed parameters */
|
||||
cost 8;
|
||||
|
||||
out:(long)reg = COPYD.L(in:(double)reg)
|
||||
emit "mfc1 %out.0, %in"
|
||||
emit "mfhc1 %out.1, %in"
|
||||
cost 8;
|
||||
|
||||
/* Floats */
|
||||
|
@ -710,5 +715,13 @@ PATTERNS
|
|||
emit "mfc1 %out, f31"
|
||||
cost 8;
|
||||
|
||||
out:(double)reg = COPYI.F(in:(long)reg)
|
||||
emit "mtc1 %in, %out" /* mtc1 has reversed parameters */
|
||||
cost 8;
|
||||
|
||||
out:(long)reg = COPYF.I(in:(double)reg)
|
||||
emit "mfc1 %out, %in"
|
||||
cost 8;
|
||||
|
||||
/* vim: set sw=4 ts=4 expandtab : */
|
||||
|
||||
|
|
Loading…
Reference in a new issue