Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/compiler_rt



On Sun, Mar 08, 2020 at 06:30:06AM +0000, Rin Okuyama wrote:
> Module Name:	src
> Committed By:	rin
> Date:		Sun Mar  8 06:30:06 UTC 2020
> 
> Modified Files:
> 	src/lib/libc/compiler_rt: Makefile.inc
> 
> Log Message:
> Fix broken printf(3) %d output for numbers more than two digits, e.g.,
> 
>   printf("%d\n", 42) ---> "::" instead of "42"
> 
> Our __{,u}modsi3 codes assume that __udivsi3 returns remainder to
> %d1 (volatile register). __udivsi3 in libgcc does not, and therefore
> mixing them up results in mess.

This looks like the wrong fix to me. This is not about libgcc at all.
The depency in the src/common code should be fixed IMO. If __{,u}modsi3
wants to make assumptions about the remainder being implicitly computed,
it really should be using the divmod primitive instead.

Joerg


Home | Main Index | Thread Index | Old Index