diff options
Diffstat (limited to 'src/vm_mips.dasc')
-rw-r--r-- | src/vm_mips.dasc | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc index 962e9290..9ab68981 100644 --- a/src/vm_mips.dasc +++ b/src/vm_mips.dasc | |||
@@ -1716,41 +1716,6 @@ static void build_subroutines(BuildCtx *ctx) | |||
1716 | | b ->fff_restv | 1716 | | b ->fff_restv |
1717 | |. li CARG3, LJ_TSTR | 1717 | |. li CARG3, LJ_TSTR |
1718 | | | 1718 | | |
1719 | |.ffunc string_rep // Only handle the 1-char case inline. | ||
1720 | | ffgccheck | ||
1721 | | lw TMP0, HI(BASE) | ||
1722 | | addiu AT, NARGS8:RC, -16 // Exactly 2 arguments. | ||
1723 | | lw CARG4, 8+HI(BASE) | ||
1724 | | lw STR:CARG1, LO(BASE) | ||
1725 | | addiu TMP0, TMP0, -LJ_TSTR | ||
1726 | | ldc1 f0, 8(BASE) | ||
1727 | | or AT, AT, TMP0 | ||
1728 | | bnez AT, ->fff_fallback | ||
1729 | |. sltiu AT, CARG4, LJ_TISNUM | ||
1730 | | trunc.w.d f0, f0 | ||
1731 | | beqz AT, ->fff_fallback | ||
1732 | |. lw TMP0, STR:CARG1->len | ||
1733 | | mfc1 CARG3, f0 | ||
1734 | | lw CARG2, DISPATCH_GL(tmpbuf.b)(DISPATCH) | ||
1735 | | lw TMP1, DISPATCH_GL(tmpbuf.e)(DISPATCH) | ||
1736 | | li AT, 1 | ||
1737 | | blez CARG3, ->fff_emptystr // Count <= 0? | ||
1738 | |. sltu AT, AT, TMP0 | ||
1739 | | beqz TMP0, ->fff_emptystr // Zero length string? | ||
1740 | |. addu TMP3, CARG2, CARG3 | ||
1741 | | sltu TMP0, TMP1, TMP3 | ||
1742 | | or AT, AT, TMP0 | ||
1743 | | bnez AT, ->fff_fallback // Fallback for > 1-char strings. | ||
1744 | |. lbu TMP0, STR:CARG1[1] | ||
1745 | | addu TMP2, CARG2, CARG3 | ||
1746 | |1: // Fill buffer with char. Yes, this is suboptimal code (do you care?). | ||
1747 | | addiu TMP2, TMP2, -1 | ||
1748 | | sltu AT, CARG2, TMP2 | ||
1749 | | bnez AT, <1 | ||
1750 | |. sb TMP0, 0(TMP2) | ||
1751 | | b ->fff_newstr | ||
1752 | |. nop | ||
1753 | | | ||
1754 | |.macro ffstring_op, name | 1719 | |.macro ffstring_op, name |
1755 | | .ffunc string_ .. name | 1720 | | .ffunc string_ .. name |
1756 | | ffgccheck | 1721 | | ffgccheck |