MIPS code size strangeness

Michael Zhilin mizhka at gmail.com
Thu Nov 24 19:01:29 UTC 2016


Mm... size of libprivateucl.so.1 was 241560 and new size is 247224?
Strange. Could you please compare old & new versions?

On Thu, Nov 24, 2016 at 8:40 PM, Eugene Grosbein <eugen at grosbein.net> wrote:

> On 24.11.2016 23:28, Eugene Grosbein wrote:
> > On 24.11.2016 05:11, Adrian Chadd wrote:
> >> It's the mips-xtoolchain or xtoolchain-mips-gcc or something
> >
> > Thanks!
> >
> > I've changed the port devel/powerpc64-gcc (master port for
> devel/mips-gcc) slightly
> > to build gcc-6.2.0 instead of gcc-5.3.0 and it builds and installs just
> fine
> > using command make FREEBSD_EXTENSION=yes install
> >
> > Then, I've installed devel/mips-xtoolchain-gcc and run buildworld using
> CROSS_TOOLCHAIN=mips-gcc.
> > It fails:
> >
> > --- cancelpoints_sem_new.o ---
> > {standard input}: Assembler messages:
> > {standard input}:1347: Error: opcode not supported on this processor:
> mips1 (mips1) `ll $5,4($4)'
> > {standard input}:1350: Error: opcode not supported on this processor:
> mips1 (mips1) `sc $5,4($4)'
> > {standard input}:1360: Error: opcode not supported on this processor:
> mips1 (mips1) `sync'
> > {standard input}:1456: Error: opcode not supported on this processor:
> mips1 (mips1) `ll $4,0($17)'
> > {standard input}:1459: Error: opcode not supported on this processor:
> mips1 (mips1) `sc $4,0($17)'
> > {standard input}:1469: Error: opcode not supported on this processor:
> mips1 (mips1) `sync'
> > {standard input}:1697: Error: opcode not supported on this processor:
> mips1 (mips1) `sync'
> > {standard input}:1702: Error: opcode not supported on this processor:
> mips1 (mips1) `ll $5,4($4)'
> > {standard input}:1705: Error: opcode not supported on this processor:
> mips1 (mips1) `sc $5,4($4)'
> > *** [cancelpoints_sem_new.o] Error code 1
> >
> > I try to build code for TP-Link WDR3600.
> > I'm not familiar with MIPS assembler. Is there a way to alter gcc6 code
> generator to avoid this error?
>
> I've managed to build FreeBSD12/mips using gcc6 and additional src.conf
> knobs:
>
> CROSS_TOOLCHAIN=mips-gcc
> WITHOUT_CROSS_COMPILER=yes
> CROSSENV+=CFLAGS="-march=mips32"
>
> This time, ucl_hash_replace() function takes 628 bytes (0x274) instead of
> 25000:
>
> # nm -C -D --print-size --size-sort libprivateucl.so.1 | grep
> ucl_hash_replace
> 0003098c 00000274 T ucl_hash_replace
>
> However, libprivateucl.so.1 still takes 247224 bytes in case of
> FreeBSD12/mips
> comparing with 136064 bytes in case of FreeBSD11/amd64.
>
> _______________________________________________
> freebsd-mips at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe at freebsd.org"
>


More information about the freebsd-mips mailing list