I've wanted to do userspace mips16 since around 2002. I've generated a
minimum changeset needed to get basic OpenWrt+luci running. This boots
and runs on mips/mipsel malta qemu, mipsel malta Imperas sim, and a
D-Link DIR-601-A1. It has not been tested on non-mips32r2
(i.e. non-mips16e) at all.
The benefits are unclear. Squashfs sizes are very
similar. Memory/TLB/cache pressure is reduced slightly which might
help a little on 16M machines. Wall clock times for things like
"/etc/init.d/firewall restart" are slightly slower.
uclibc remains -mno-mips16 for now. Among other things, gcc does not
support thread-local storage in mips16 as of gcc 4.6. (Should there be
any TLS symbols with CONFIG_TLS_SUPPORT=n?)
Covering more of uclibc would help. Realtek even uses some mips16 in their
kernel, but I worry about tickling processor errata.
To activate this, add "-minterlink-mips16 -mips16" to
CONFIG_TARGET_OPTIMIZATION.
Jay Carlson (5):
Separate TARGET_AS and TARGET_ASFLAGS; append -mno-mips16 to
TARGET_ASFLAGS if otherwise in CFLAGS.
Since we get a bunch of modified static libraries, get a new arch
name for the toolchain directory.
Compile uClibc as 32-bit MIPS; marking syscall- and TLS-using files
was too scary.
.init and .fini need to pick one ISA and stick with it. In this case,
no-mips16.
Pass in TARGET_ASFLAGS to OpenSSL; needed for .S assembly in mips16 mode.
package/openssl/Makefile | 2 ++
rules.mk | 7 ++++++-
.../gcc/patches/4.6-linaro/900-bad-mips16-crt | 9 +++++++++
toolchain/uClibc/common.mk | 2 ++
4 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 toolchain/gcc/patches/4.6-linaro/900-bad-mips16-crt
--
1.7.9.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel