diff --git a/mach/mips/as/instructions.dat b/mach/mips/as/instructions.dat index b1084675b..98c4dbbe9 100644 --- a/mach/mips/as/instructions.dat +++ b/mach/mips/as/instructions.dat @@ -182,6 +182,7 @@ 01000100000000101 "abs" F=fmt FD=fpr ',' FS=fpr 010001000000 "add" F=fmt FD=fpr ',' FS=fpr ',' FT=fpr 010011011110 "alnv" ".ps" FD=fpr ',' FS=fpr ',' FT=fpr ',' RS=gpr +0100010011 "c" CO=fcond F=fmt C=u3 ',' FS=fpr ',' FT=fpr 01000100000001010 "ceil" ".l" F=fmt FD=fpr ',' FS=fpr 01000100000001110 "ceil" ".w" F=fmt FD=fpr ',' FS=fpr 0100010001000000000000 "cfc1" RT=gpr ',' FS=fpr @@ -238,7 +239,6 @@ # Generic coprocessor instructions. -0100010011 "c" CO=fcond F=fmt C=u3 ',' FS=fpr ',' FT=fpr 0100010100000 "bc1f" C=u3 ',' OFF=offset16 0100010100000000 "bc1f" OFF=offset16 0100010100010 "bc1fl" C=u3 ',' OFF=offset16 diff --git a/mach/mips/as/mach4.c b/mach/mips/as/mach4.c index da7bc1bfb..c7f158234 100644 --- a/mach/mips/as/mach4.c +++ b/mach/mips/as/mach4.c @@ -1,12 +1,9 @@ #include "rules.y" - | OP_LI GPR ',' expr + | OP_LI GPR ',' extabsexp { word_t reg = $2; - word_t type = $4.typ & S_TYP; - word_t val = $4.val; - if (type != S_ABS) - serror("li cannot be used with values that need a fixup"); - + word_t val = $4; + if (val == 0) emit4(0x00000025 | (reg<<11)); /* or reg, zero, zero */ else if ((val < -0x8000) || (val > 0xffff))