[PATCH v3 1/6] mips: Restrict the use of addiupc for microMIPSr6

Maciej W. Rozycki macro@orcam.me.uk
Mon Sep 22 12:24:20 GMT 2025


On Wed, 17 Sep 2025, Adhemerval Zanella Netto wrote:

> >> As a side note, it seems that mips16 is broken with --enable-profile
> >> or a long time and since 2.34 (035c012e32c11e84d64905efaf55e74f704d3668)
> >> without it:
> >>
> >> $ mips64-glibc-linux-gnu-gcc -mabi=32 -mips16 ../sysdeps/mips/start.S
> >> [...]
> >> libc/build/mips-linux-gnu-mips16/csu/start.o
> >> ../sysdeps/mips/start.S: Assembler messages:
> >> ../sysdeps/mips/start.S:147: Error: invalid operands `sw $0,16($sp)'

 It can be trivially fixed:

	sw	$4, 16($sp)

(since $4 holds 0 at this point due to the previous instruction).
Likewise:

	sw	$7, 16($sp)

in the # else block below.

> >> Should we remove mips16 support?

 I have MIPS16 hardware nowadays, I can have a look at what broke.  I'd
suspect trivial stuff only.

> > Does mips16 support 32-bit displacement for TLS? If not, it may have the same
> > issue as ColdFire:
> > 
> > https://sourceware.org/bugzilla/show_bug.cgi?id=33429
> 
> I am not sure, maybe someone from htecgroup could answer. But it has been
> broken since 2021 without complains or bug reports.

 It does, there were some fixes recently made in binutils in this area, as 
a part of a larger change.

  Maciej


More information about the Libc-alpha mailing list