CVS commit: src/lib/libc/compiler_rt

2024-03-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 10 18:00:13 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
compiler_rt: allow signed bit shifts for __negv

Standard C defines '1 << 31' as undefined behavior, but
https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html allows
it for GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.46 src/lib/libc/compiler_rt/Makefile.inc:1.47
--- src/lib/libc/compiler_rt/Makefile.inc:1.46	Tue Jan 23 15:32:18 2024
+++ src/lib/libc/compiler_rt/Makefile.inc	Sun Mar 10 18:00:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.46 2024/01/23 15:32:18 christos Exp $
+# $NetBSD: Makefile.inc,v 1.47 2024/03/10 18:00:13 rillig Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -396,9 +396,9 @@ LINTFLAGS.mulvti3.c += -X 117,351
 LINTFLAGS.negdf2.c += -X 309,351
 LINTFLAGS.negsf2.c += -X 132,351
 LINTFLAGS.negti2.c += -X 351
-LINTFLAGS.negvdi2.c += -X 351
-LINTFLAGS.negvsi2.c += -X 351
-LINTFLAGS.negvti2.c += -X 351
+LINTFLAGS.negvdi2.c += -X 141,351
+LINTFLAGS.negvsi2.c += -X 141,351
+LINTFLAGS.negvti2.c += -X 141,351
 LINTFLAGS.parityti2.c += -X 351
 LINTFLAGS.popcountdi2.c += -X 351
 LINTFLAGS.popcountsi2.c += -X 351



CVS commit: src/lib/libc/compiler_rt

2024-03-10 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 10 18:00:13 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
compiler_rt: allow signed bit shifts for __negv

Standard C defines '1 << 31' as undefined behavior, but
https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html allows
it for GCC.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/compiler_rt

2024-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 23 15:32:18 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
Add vax


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.45 src/lib/libc/compiler_rt/Makefile.inc:1.46
--- src/lib/libc/compiler_rt/Makefile.inc:1.45	Tue Jan 23 07:23:34 2024
+++ src/lib/libc/compiler_rt/Makefile.inc	Tue Jan 23 10:32:18 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.45 2024/01/23 12:23:34 christos Exp $
+# $NetBSD: Makefile.inc,v 1.46 2024/01/23 15:32:18 christos Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -317,10 +317,13 @@ COPTS.${src}+=	-D__SOFT_FP__
 .endfor
 
 LINTFLAGS.GCDAProfiling.c += -X 123,132,351 # Ok, this is just sloppy
+LINTFLAGS.GCDAProfiling.c += -X 298 # vax
 LINTFLAGS.InstrProfiling.c += -X 351
+LINTFLAGS.InstrProfiling.c += -X 298 # vax
 LINTFLAGS.InstrProfilingFile.c += -X 351
 LINTFLAGS.InstrProfilingPlatformLinux.c += -X 190,351
 LINTFLAGS.InstrProfilingValue.c += -X 132,231,275,351
+LINTFLAGS.InstrProfilingValue.c += -X 298 # vax
 LINTFLAGS.InstrProfilingWriter.c += -X 132
 LINTFLAGS.absvdi2.c += -X 117,351
 LINTFLAGS.absvsi2.c += -X 117,351
@@ -331,6 +334,7 @@ LINTFLAGS.addvsi3.c += -X 351
 LINTFLAGS.addvti3.c += -X 351
 LINTFLAGS.ashlti3.c += -X 351
 LINTFLAGS.ashrti3.c += -X 117,351
+LINTFLAGS.ashrdi3.c += -X 117 # vax
 LINTFLAGS.clzdi2.c += -X 351
 LINTFLAGS.clzsi2.c += -X 351
 LINTFLAGS.cmpti2.c += -X 351
@@ -339,6 +343,7 @@ LINTFLAGS.crzdi2.c += -X 351
 LINTFLAGS.ctzdi2.c += -X 351
 LINTFLAGS.ctzsi2.c += -X 351
 LINTFLAGS.ctzti2.c += -X 351
+LINTFLAGS.divdi3.c += -X 117 # vax
 LINTFLAGS.divmodsi4.c += -X 351
 LINTFLAGS.divsi3.c += -X 117
 LINTFLAGS.divti3.c += -X 117,351
@@ -377,6 +382,7 @@ LINTFLAGS.floatuntixf.c += -X 122,351
 LINTFLAGS.floatuntixf.c += -X 141 # alpha
 LINTFLAGS.int_util.c += -X 231
 LINTFLAGS.lshrti3.c += -X 351
+LINTFLAGS.moddi3.c += -X 117 # vax
 LINTFLAGS.modsi3.c += -X 117,351
 LINTFLAGS.modti3.c += -X 117,351
 LINTFLAGS.muldc3.c += -X 117,351
@@ -405,6 +411,7 @@ LINTFLAGS.subvsi3.c += -X 351
 LINTFLAGS.subvti3.c += -X 351
 LINTFLAGS.ucmpti2.c += -X 351
 LINTFLAGS.ucmpti2.c += -X 351
+LINTFLAGS.udivmoddi4.c += -X 117 # vax
 LINTFLAGS.udivmodti4.c += -X 117,132
 LINTFLAGS.udivsi3.c += -X 117
 LINTFLAGS.udivti3.c += -X 351



CVS commit: src/lib/libc/compiler_rt

2024-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 23 15:32:18 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
Add vax


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/compiler_rt

2024-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 23 12:23:34 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
more annotation for powerpc


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.44 src/lib/libc/compiler_rt/Makefile.inc:1.45
--- src/lib/libc/compiler_rt/Makefile.inc:1.44	Sat Jan 20 19:43:34 2024
+++ src/lib/libc/compiler_rt/Makefile.inc	Tue Jan 23 07:23:34 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.44 2024/01/21 00:43:34 christos Exp $
+# $NetBSD: Makefile.inc,v 1.45 2024/01/23 12:23:34 christos Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -342,6 +342,7 @@ LINTFLAGS.ctzti2.c += -X 351
 LINTFLAGS.divmodsi4.c += -X 351
 LINTFLAGS.divsi3.c += -X 117
 LINTFLAGS.divti3.c += -X 117,351
+LINTFLAGS.divtc3.c += -X 351	# ppc
 LINTFLAGS.dlfcn_elf.c += -X 351
 LINTFLAGS.ffsdi2.c += -X 132,351
 LINTFLAGS.ffsti2.c += -X 132,351



CVS commit: src/lib/libc/compiler_rt

2024-01-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 23 12:23:34 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
more annotation for powerpc


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/compiler_rt

2024-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 21 00:43:35 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
fix more alpha


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/compiler_rt

2024-01-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 21 00:43:35 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
fix more alpha


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.43 src/lib/libc/compiler_rt/Makefile.inc:1.44
--- src/lib/libc/compiler_rt/Makefile.inc:1.43	Fri Jan 19 13:45:01 2024
+++ src/lib/libc/compiler_rt/Makefile.inc	Sat Jan 20 19:43:34 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.43 2024/01/19 18:45:01 christos Exp $
+# $NetBSD: Makefile.inc,v 1.44 2024/01/21 00:43:34 christos Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -360,15 +360,20 @@ LINTFLAGS.fixunsxfti.c += -X 132,351
 LINTFLAGS.fixxfdi.c += -X 351
 LINTFLAGS.fixxfti.c += -X 117,132,351
 LINTFLAGS.floatdidf.c += -X 351
+LINTFLAGS.floatdidf.c += -X 117	# alpha
 LINTFLAGS.floatdisf.c += -X 351
+LINTFLAGS.floatdisf.c += -X 117	# alpha
 LINTFLAGS.floatdixf.c += -X 351
+LINTFLAGS.floatdixf.c += -X 117	# alpha
 LINTFLAGS.floattidf.c += -X 117,122,141,267,351
 LINTFLAGS.floattisf.c += -X 117,351
 LINTFLAGS.floattisf.c += -X 117,351
 LINTFLAGS.floattixf.c += -X 117,122,351
+LINTFLAGS.floattixf.c += -X 141	# alpha
 LINTFLAGS.floatuntidf.c += -X 122,141,267,351
 LINTFLAGS.floatuntisf.c += -X 351
 LINTFLAGS.floatuntixf.c += -X 122,351
+LINTFLAGS.floatuntixf.c += -X 141 # alpha
 LINTFLAGS.int_util.c += -X 231
 LINTFLAGS.lshrti3.c += -X 351
 LINTFLAGS.modsi3.c += -X 117,351



CVS commit: src/lib/libc/compiler_rt

2024-01-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 19 18:45:01 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
add lint flags for compiler_rt


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.42 src/lib/libc/compiler_rt/Makefile.inc:1.43
--- src/lib/libc/compiler_rt/Makefile.inc:1.42	Thu Nov  9 02:29:26 2023
+++ src/lib/libc/compiler_rt/Makefile.inc	Fri Jan 19 13:45:01 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.42 2023/11/09 07:29:26 rin Exp $
+# $NetBSD: Makefile.inc,v 1.43 2024/01/19 18:45:01 christos Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -316,4 +316,93 @@ COPTS.${src}+=	-D__SOFT_FP__
 .endif
 .endfor
 
+LINTFLAGS.GCDAProfiling.c += -X 123,132,351 # Ok, this is just sloppy
+LINTFLAGS.InstrProfiling.c += -X 351
+LINTFLAGS.InstrProfilingFile.c += -X 351
+LINTFLAGS.InstrProfilingPlatformLinux.c += -X 190,351
+LINTFLAGS.InstrProfilingValue.c += -X 132,231,275,351
+LINTFLAGS.InstrProfilingWriter.c += -X 132
+LINTFLAGS.absvdi2.c += -X 117,351
+LINTFLAGS.absvsi2.c += -X 117,351
+LINTFLAGS.absvsi3.c += -X 351
+LINTFLAGS.absvti2.c += -X 117,351
+LINTFLAGS.addvdi3.c += -X 351
+LINTFLAGS.addvsi3.c += -X 351
+LINTFLAGS.addvti3.c += -X 351
+LINTFLAGS.ashlti3.c += -X 351
+LINTFLAGS.ashrti3.c += -X 117,351
+LINTFLAGS.clzdi2.c += -X 351
+LINTFLAGS.clzsi2.c += -X 351
+LINTFLAGS.cmpti2.c += -X 351
+LINTFLAGS.crtzi.c += -X 351
+LINTFLAGS.crzdi2.c += -X 351
+LINTFLAGS.ctzdi2.c += -X 351
+LINTFLAGS.ctzsi2.c += -X 351
+LINTFLAGS.ctzti2.c += -X 351
+LINTFLAGS.divmodsi4.c += -X 351
+LINTFLAGS.divsi3.c += -X 117
+LINTFLAGS.divti3.c += -X 117,351
+LINTFLAGS.dlfcn_elf.c += -X 351
+LINTFLAGS.ffsdi2.c += -X 132,351
+LINTFLAGS.ffsti2.c += -X 132,351
+LINTFLAGS.fixdfdi.c += -X 132,309,351
+LINTFLAGS.fixdfsi.c += -X 132
+LINTFLAGS.fixsfdi.c += -X 132,351
+LINTFLAGS.fixunsdfdi.c += -X 132,309,351
+LINTFLAGS.fixunsdfsi.c += -X 132,309,351
+LINTFLAGS.fixunsdfti.c += -X 132,309,351
+LINTFLAGS.fixunssfdi.c += -X 132,309,351
+LINTFLAGS.fixunssfsi.c += -X 132,351
+LINTFLAGS.fixunssfti.c += -X 132,351
+LINTFLAGS.fixunsxfdi.c += -X 351
+LINTFLAGS.fixunsxfsi.c += -X 132,309,351
+LINTFLAGS.fixunsxfti.c += -X 132,351
+LINTFLAGS.fixxfdi.c += -X 351
+LINTFLAGS.fixxfti.c += -X 117,132,351
+LINTFLAGS.floatdidf.c += -X 351
+LINTFLAGS.floatdisf.c += -X 351
+LINTFLAGS.floatdixf.c += -X 351
+LINTFLAGS.floattidf.c += -X 117,122,141,267,351
+LINTFLAGS.floattisf.c += -X 117,351
+LINTFLAGS.floattisf.c += -X 117,351
+LINTFLAGS.floattixf.c += -X 117,122,351
+LINTFLAGS.floatuntidf.c += -X 122,141,267,351
+LINTFLAGS.floatuntisf.c += -X 351
+LINTFLAGS.floatuntixf.c += -X 122,351
+LINTFLAGS.int_util.c += -X 231
+LINTFLAGS.lshrti3.c += -X 351
+LINTFLAGS.modsi3.c += -X 117,351
+LINTFLAGS.modti3.c += -X 117,351
+LINTFLAGS.muldc3.c += -X 117,351
+LINTFLAGS.mulodi4.c += -X 117,351
+LINTFLAGS.mulosi4.c += -X 117,351
+LINTFLAGS.muloti4.c += -X 117,351
+LINTFLAGS.multi3.c += -X 351
+LINTFLAGS.mulvdi3.c += -X 117,351
+LINTFLAGS.mulvsi3.c += -X 117,351
+LINTFLAGS.mulvti3.c += -X 117,351
+LINTFLAGS.negdf2.c += -X 309,351
+LINTFLAGS.negsf2.c += -X 132,351
+LINTFLAGS.negti2.c += -X 351
+LINTFLAGS.negvdi2.c += -X 351
+LINTFLAGS.negvsi2.c += -X 351
+LINTFLAGS.negvti2.c += -X 351
+LINTFLAGS.parityti2.c += -X 351
+LINTFLAGS.popcountdi2.c += -X 351
+LINTFLAGS.popcountsi2.c += -X 351
+LINTFLAGS.popcountti2.c += -X 122,132,351
+LINTFLAGS.powidf2.c += -X 161,351
+LINTFLAGS.powisf2.c += -X 161,351
+LINTFLAGS.powixf2.c += -X 161,351
+LINTFLAGS.subvdi3.c += -X 351
+LINTFLAGS.subvsi3.c += -X 351
+LINTFLAGS.subvti3.c += -X 351
+LINTFLAGS.ucmpti2.c += -X 351
+LINTFLAGS.ucmpti2.c += -X 351
+LINTFLAGS.udivmodti4.c += -X 117,132
+LINTFLAGS.udivsi3.c += -X 117
+LINTFLAGS.udivti3.c += -X 351
+LINTFLAGS.umodsi3.c += -X 351
+LINTFLAGS.umodti3.c += -X 351
+
 .include "${COMPILER_RT_DIR}/abi.mk"



CVS commit: src/lib/libc/compiler_rt

2024-01-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 19 18:45:01 UTC 2024

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
add lint flags for compiler_rt


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/compiler_rt

2023-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Nov  9 07:29:26 UTC 2023

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
libc/compiler_rt: Consistently use LIBC_MACHINE_{ARCH,CPU}

Instead of MACHINE_{ARCH,CPU}, respectively.

With this change, unnecessary comparetf2.c is no longer
compiled in for 32-bit compat libc on aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.41 src/lib/libc/compiler_rt/Makefile.inc:1.42
--- src/lib/libc/compiler_rt/Makefile.inc:1.41	Wed Oct  5 10:28:19 2022
+++ src/lib/libc/compiler_rt/Makefile.inc	Thu Nov  9 07:29:26 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.41 2022/10/05 10:28:19 nia Exp $
+# $NetBSD: Makefile.inc,v 1.42 2023/11/09 07:29:26 rin Exp $
 
 COMPILER_RT_DIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt
 COMPILER_RT_SRCDIR=	${COMPILER_RT_DIR}/dist
@@ -76,7 +76,7 @@ GENERIC_SRCS+= \
 	umodti3.c
 
 # only used for machines using IEEE 754 floating point formats
-.if ${MACHINE_ARCH} != "vax"
+.if ${LIBC_MACHINE_ARCH} != "vax"
 
 .if 0
 # Conflicts with soft-float
@@ -127,13 +127,13 @@ GENERIC_SRCS+=	\
 
 .endif # IEEE 754 only machines
 
-.if ${MACHINE_ARCH} != "m68k"
+.if ${LIBC_MACHINE_ARCH} != "m68k"
 GENERIC_SRCS+= \
 	fixxfdi.c
 .endif
 
 
-.if ${MACHINE_CPU} == "aarch64"
+.if ${LIBC_MACHINE_CPU} == "aarch64"
 GENERIC_SRCS+= \
 	comparetf2.c
 .endif



CVS commit: src/lib/libc/compiler_rt

2023-11-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Nov  9 07:29:26 UTC 2023

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
libc/compiler_rt: Consistently use LIBC_MACHINE_{ARCH,CPU}

Instead of MACHINE_{ARCH,CPU}, respectively.

With this change, unnecessary comparetf2.c is no longer
compiled in for 32-bit compat libc on aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Switch to compiler_rt from assembler codes? (Re: CVS commit: src/lib/libc/compiler_rt)

2020-03-10 Thread Rin Okuyama

(added port-sun2@)

On 2020/03/09 3:33, Joerg Sonnenberger wrote:

On Sun, Mar 08, 2020 at 06:30:06AM +, 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.


Strictly speaking, this is bug in __{,u}modsi3. However:

(1) This is for optimization. There is no need for stack push and pop if
they can use our special version of __udivsi3, instead of __divmodsi4.
If they were ``fixed'' correctly, the resulted codes would have no big
difference from the C version provided by compiler_rt.

(2) Problems occur only when they are mixed with libgcc version of
__udivsi3. For standalone programs, i.e., kernel and bootloader, this
``wrong'' version works well.

(3) They are used only for m68000 (68010; sun2). For m68k (68020 and
later; other m68k ports), GCC does not generate references to these
functions at all.

Therefore, I propose:

(A) Continue to use these assembler codes only in standalone programs
(kernel and bootloader). For userland (libc), switch to the C version
provided by compiler_rt. Again, this affects only for 68010, i.e., sun2,
and not for other m68k ports.

Alternatively, we can:

(b) Switch both standalone and userland to compiler_rt.

I've checked both (A) and (B) version of live-image work fine on TME.
I prefer (A) over (B), since there is no problem if they are used only
in a controlled situation. Also, we are suffering from increase in
kernel size on sun2. But how do you everyone think?

Thanks,
rin


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

2020-03-08 Thread Joerg Sonnenberger
On Sun, Mar 08, 2020 at 06:30:06AM +, 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


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

2020-03-07 Thread Rin Okuyama

Oops, forgot to note that this is only for 68010, and other
systems including m68k are not affected.

Thanks,
rin

On 2020/03/08 15:30, 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.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.36 
src/lib/libc/compiler_rt/Makefile.inc:1.37
--- src/lib/libc/compiler_rt/Makefile.inc:1.36  Tue Oct 29 16:08:50 2019
+++ src/lib/libc/compiler_rt/Makefile.inc   Sun Mar  8 06:30:06 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.36 2019/10/29 16:08:50 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.37 2020/03/08 06:30:06 rin Exp $
  
  COMPILER_RT_SRCDIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
  
@@ -170,9 +170,16 @@ GENERIC_SRCS+= \

  GENERIC_SRCS+= \
divmodsi4.c \
divsi3.c \
-   modsi3.c \
udivmodsi4.c \
+
+. if ${LIBC_MACHINE_ARCH} != "m68000"
+# 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.
+GENERIC_SRCS+= \
+   modsi3.c \
umodsi3.c
+. endif
  
  . if ${LIBC_MACHINE_CPU} != "sh3"

  # On sh3 __udivsi3 is gcc "millicode" with special calling convention



CVS commit: src/lib/libc/compiler_rt

2019-10-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Oct 29 16:08:50 UTC 2019

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
Always include soft-float compare and order logic in libc when using
compiler-rt.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/compiler_rt

2019-10-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Oct 29 16:08:50 UTC 2019

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
Always include soft-float compare and order logic in libc when using
compiler-rt.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.35 src/lib/libc/compiler_rt/Makefile.inc:1.36
--- src/lib/libc/compiler_rt/Makefile.inc:1.35	Sun Jul 23 09:50:54 2017
+++ src/lib/libc/compiler_rt/Makefile.inc	Tue Oct 29 16:08:50 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.35 2017/07/23 09:50:54 martin Exp $
+# $NetBSD: Makefile.inc,v 1.36 2019/10/29 16:08:50 joerg Exp $
 
 COMPILER_RT_SRCDIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
 
@@ -144,6 +144,9 @@ GENERIC_SRCS+= \
 	floatuntidf.c \
 	floatuntisf.c \
 	floatuntixf.c
+.else
+GENERIC_SRCS+= \
+	comparetf2.c
 .endif
 
 # These have h/w instructions which are always used.



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

2013-12-03 Thread Joerg Sonnenberger
On Mon, Dec 02, 2013 at 11:10:43PM -0800, Matt Thomas wrote:
 
 On Dec 2, 2013, at 6:28 PM, Joerg Sonnenberger jo...@netbsd.org wrote:
 
  Module Name:src
  Committed By:   joerg
  Date:   Tue Dec  3 02:28:51 UTC 2013
  
  Modified Files:
  src/lib/libc/compiler_rt: Makefile.inc
  
  Log Message:
  Add ARM (EABI) specific sources. Split off code that requires C11,
  unwind support in libc or overlaps with soft-float in preparation for
  using compiler-rt in the non-clang case.
 
 How will interact with libkern?

I have a plugin Makefile which is structured similar to this.
I'm currently in the process of testing a random subset of architectures
for building...

Joerg


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

2013-12-02 Thread Matt Thomas

On Dec 2, 2013, at 6:28 PM, Joerg Sonnenberger jo...@netbsd.org wrote:

 Module Name:  src
 Committed By: joerg
 Date: Tue Dec  3 02:28:51 UTC 2013
 
 Modified Files:
   src/lib/libc/compiler_rt: Makefile.inc
 
 Log Message:
 Add ARM (EABI) specific sources. Split off code that requires C11,
 unwind support in libc or overlaps with soft-float in preparation for
 using compiler-rt in the non-clang case.

How will interact with libkern?