CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm
Module Name:src Committed By: skrll Date: Wed Jun 30 21:18:00 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm: aeabi_cfcmp.S divmodsi4.S divsi3.S modsi3.S Log Message: Do previous differently by pushing even number of registers and remove strange r7 usage. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S:1.2 Tue Jun 29 23:26:00 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S Wed Jun 30 21:18:00 2021 @@ -27,12 +27,11 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmpeq) -push {r0-r3, lr} -sub sp, #4 +// Save ip to ensure stack alignment (could be any register) +push {r0-r3, ip, lr} bl __aeabi_cfcmpeq_check_nan cmp r0, #1 -add sp, #4 -pop {r0-r3, lr} +pop {r0-r3, ip, lr} // NaN has been ruled out, so __aeabi_cfcmple can't trap bne __aeabi_cfcmple @@ -57,17 +56,15 @@ END_COMPILERRT_FUNCTION(__aeabi_cfcmpeq) DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmple) // Per the RTABI, this function must preserve r0-r11. // Save lr in the same instruction for compactness -push {r0-r3, lr} -sub sp, #4 +// Save ip to ensure stack alignment (could be any register) +push {r0-r3, ip, lr} bl __aeabi_fcmplt cmp r0, #1 moveq ip, #0 beq 1f -add sp, #4 ldm sp, {r0-r3} -sub sp, #4 bl __aeabi_fcmpeq cmp r0, #1 moveq ip, #(APSR_C | APSR_Z) @@ -75,8 +72,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmp 1: msr CPSR_f, ip -add sp, #4 -pop {r0-r3} +pop {r0-r3, ip} POP_PC() END_COMPILERRT_FUNCTION(__aeabi_cfcmple) Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S:1.2 Tue Jun 29 23:26:00 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S Wed Jun 30 21:18:00 2021 @@ -16,12 +16,9 @@ #include "../assembly.h" #define ESTABLISH_FRAME\ -push {r4-r7, lr} ;\ -add r7, sp, #12 ;\ -sub sp, #4 +push {r4-r6, lr} #define CLEAR_FRAME_AND_RETURN \ -add sp, #4 ;\ -pop{r4-r7, pc} +pop{r4-r6, pc} .syntax unified .text Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S:1.2 Tue Jun 29 23:26:00 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S Wed Jun 30 21:18:00 2021 @@ -15,12 +15,9 @@ #include "../assembly.h" #define ESTABLISH_FRAME \ -push {r4, r7, lr};\ -add r7, sp, #4 ;\ -sub sp, #4 +push {r4, lr} #define CLEAR_FRAME_AND_RETURN \ -add sp, #4 ;\ -pop{r4, r7, pc} +pop{r4, pc} .syntax unified .text Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S:1.2 Tue Jun 29 23:26:00 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S Wed Jun 30 21:18:00 2021 @@ -15,12 +15,9 @@ #include "../assembly.h" #define ESTABLISH_FRAME \ -push {r4, r7, lr};\ -add r7, sp, #4 ;\ -sub sp, #4 +push {r4, lr} #define CLEAR_FRAME_AND_RETURN \ -add sp, #4 ;\ -pop{r4, r7, pc} +pop{r4, pc} .syntax unified .text
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm
Module Name:src Committed By: rin Date: Tue Jun 29 23:26:00 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm: aeabi_cfcmp.S divmodsi4.S divsi3.S modsi3.S Log Message: Align sp to 8-byte boundary as required by EABI. This is especially important for non-leaf functions; GCC optimizes codes based on assumption that sp is aligned properly. Mostly fix broken earmv5 userland compiled by GCC10 due to alignment faults in ld.elf_so, where {ld,st}rd are used for [sp, #8x]. No regression for ATF is observed for earmv[67]{,hf}{,eb}. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S cvs rdiff -u -r1.1.1.4 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S:1.1.1.1 Sat Feb 27 18:59:31 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S Tue Jun 29 23:26:00 2021 @@ -28,8 +28,10 @@ .p2align 2 DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmpeq) push {r0-r3, lr} +sub sp, #4 bl __aeabi_cfcmpeq_check_nan cmp r0, #1 +add sp, #4 pop {r0-r3, lr} // NaN has been ruled out, so __aeabi_cfcmple can't trap @@ -56,13 +58,16 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmp // Per the RTABI, this function must preserve r0-r11. // Save lr in the same instruction for compactness push {r0-r3, lr} +sub sp, #4 bl __aeabi_fcmplt cmp r0, #1 moveq ip, #0 beq 1f +add sp, #4 ldm sp, {r0-r3} +sub sp, #4 bl __aeabi_fcmpeq cmp r0, #1 moveq ip, #(APSR_C | APSR_Z) @@ -70,6 +75,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_cfcmp 1: msr CPSR_f, ip +add sp, #4 pop {r0-r3} POP_PC() END_COMPILERRT_FUNCTION(__aeabi_cfcmple) Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S:1.1.1.4 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S:1.1.1.4 Sat Feb 27 18:59:31 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S Tue Jun 29 23:26:00 2021 @@ -17,8 +17,10 @@ #define ESTABLISH_FRAME\ push {r4-r7, lr} ;\ -add r7, sp, #12 +add r7, sp, #12 ;\ +sub sp, #4 #define CLEAR_FRAME_AND_RETURN \ +add sp, #4 ;\ pop{r4-r7, pc} .syntax unified Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S:1.1.1.4 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S:1.1.1.4 Sat Feb 27 18:59:31 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S Tue Jun 29 23:26:00 2021 @@ -16,8 +16,10 @@ #define ESTABLISH_FRAME \ push {r4, r7, lr};\ -add r7, sp, #4 +add r7, sp, #4 ;\ +sub sp, #4 #define CLEAR_FRAME_AND_RETURN \ +add sp, #4 ;\ pop{r4, r7, pc} .syntax unified Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S:1.1.1.4 src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S:1.1.1.4 Sat Feb 27 18:59:31 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S Tue Jun 29 23:26:00 2021 @@ -16,8 +16,10 @@ #define ESTABLISH_FRAME \ push {r4, r7, lr};\ -add r7, sp, #4 +add r7, sp, #4 ;\ +sub sp, #4 #define CLEAR_FRAME_AND_RETURN \ +add sp, #4 ;\ pop{r4, r7, pc} .syntax unified
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: rin Date: Wed Jun 16 05:07:49 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: adddf3.c addsf3.c ashldi3.c ashrdi3.c comparedf2.c comparesf2.c divdf3.c divsf3.c divsi3.c extendhfsf2.c extendsfdf2.c fixdfdi.c fixdfsi.c fixsfdi.c fixsfsi.c fixunsdfdi.c fixunsdfsi.c fixunssfdi.c fixunssfsi.c floatdidf.c floatdisf.c floatsidf.c floatsisf.c floatundidf.c floatundisf.c floatunsidf.c floatunsisf.c int_lib.h lshrdi3.c muldf3.c muldi3.c mulsf3.c negdf2.c negsf2.c subdf3.c subsf3.c truncdfhf2.c truncdfsf2.c truncsfhf2.c udivsi3.c Log Message: PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 314851: https://github.com/llvm/llvm-project/commit/0d586d06a756b126a7eb43a21ecc12bd243d7cd8#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 [PATCH] [compiler-rt] Add back ARM EABI aliases where legal. r303188 removed all the uses of aliases for EABI functions from compiler-rt, because some of them had mismatched calling conventions. Obviously, we can't use aliases for functions which don't have the same calling convention, but that's only an issue for floating-point functions with the hardfloat ABI. In other cases, the stubs increase size and reduce performance for no benefit. This patch adds back the aliases, with appropriate checks to make sure they're only used in cases where the calling convention matches. llvm-svn: 314851 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c:1.2 Wed Jun 16 05:06:45 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c Wed Jun 16 05:07:49 2021 @@ -20,8 +20,11 @@ COMPILER_RT_ABI double __adddf3(double a } #if
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: rin Date: Wed Jun 16 05:07:18 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: floatdidf.c Log Message: PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 303207: https://github.com/llvm/llvm-project/commit/4a45838d10085defac0f3b3003a5263e34536f3b#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 [PATCH] builtins: fix guard __AEABI__ -> __ARM_EABI__ llvm-svn: 303207 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c:1.3 src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c:1.4 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c:1.3 Wed Jun 16 05:06:45 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c Wed Jun 16 05:07:18 2021 @@ -104,7 +104,7 @@ __floatdidf(di_int a) } #endif -#if defined(__AEABI__) +#if defined(__ARM_EABI__) AEABI_RTABI double __aeabi_l2d(di_int a) { return __floatdidf(a); }
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: rin Date: Wed Jun 16 05:06:46 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: adddf3.c addsf3.c ashldi3.c ashrdi3.c comparedf2.c comparesf2.c divdf3.c divsf3.c divsi3.c extendhfsf2.c extendsfdf2.c fixdfdi.c fixdfsi.c fixsfdi.c fixsfsi.c fixunsdfdi.c fixunsdfsi.c fixunssfdi.c fixunssfsi.c floatdidf.c floatdisf.c floatsidf.c floatsisf.c floatundidf.c floatundisf.c floatunsidf.c floatunsisf.c int_lib.h lshrdi3.c muldf3.c muldi3.c mulsf3.c negdf2.c negsf2.c subdf3.c subsf3.c truncdfhf2.c truncdfsf2.c truncsfhf2.c udivsi3.c src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm: aeabi_cdcmpeq_check_nan.c aeabi_cfcmpeq_check_nan.c aeabi_div0.c aeabi_drsub.c aeabi_frsub.c Log Message: PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 303188: https://github.com/llvm/llvm-project/commit/36ac5ddff7377586390a71cb3261f0a40d274308#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 [PATCH] builtins: expand out the AEABI function stubs These actually may change calling conventions. We cannot simply provide function aliases as the aliased function may have a different calling convention. Provide a forwarding function instead to permit the compiler to synthesize the calling convention adjustment thunk. Remove the `ARM_EABI_FNALIAS` macro as that is not safe to use. Resolves PR33030! llvm-svn: 303188 To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c cvs rdiff -u -r1.1.1.4 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_div0.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_drsub.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_frsub.c Please note that diffs are not public domain; they are subject to the copyright notices on
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: rin Date: Wed Jun 16 05:06:21 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: int_lib.h Log Message: PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 303138: https://github.com/llvm/llvm-project/commit/44c45717b9e9f3dc194508d2eeeb8599a9d76949#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 [PATCH] builtins: use reserved spelling (NFC) llvm-svn: 303138 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.3 src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.4 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.3 Wed Jun 16 05:05:49 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Wed Jun 16 05:06:21 2021 @@ -35,7 +35,7 @@ # ifdef COMPILER_RT_ARMHF_TARGET # define COMPILER_RT_ABI # else -# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) +# define COMPILER_RT_ABI __attribute__((__pcs__("aapcs"))) # endif #else # define ARM_EABI_FNALIAS(aeabi_name, name)
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: rin Date: Wed Jun 16 05:05:49 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: int_lib.h Log Message: PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 298974 for lib/builtins/int_lib.h. https://github.com/llvm/llvm-project/commit/d8ca74176e25bd4080ee81982819e2ef7a36553f#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 [Builtin] Unxfail tests for armhf Summary: Originally, a few tests fail for armhf target due to: 1) COMPILER_RT_ARMHF_TARGET was not set when building the lib 2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests This address https://bugs.llvm.org//show_bug.cgi?id=32261 mulsc3_test.c is a newly exposed issue, which will be addressed separately. Reviewers: rengolin, compnerd Reviewed By: compnerd Subscribers: aemerson, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D31448 llvm-svn: 298974 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.2 Wed Jun 16 05:05:03 2021 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Wed Jun 16 05:05:49 2021 @@ -32,7 +32,11 @@ #if __ARM_EABI__ # define ARM_EABI_FNALIAS(aeabi_name, name) \ void __aeabi_##aeabi_name() __attribute__((alias("__" #name))); -# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) +# ifdef COMPILER_RT_ARMHF_TARGET +# define COMPILER_RT_ABI +# else +# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) +# endif #else # define ARM_EABI_FNALIAS(aeabi_name, name) # define COMPILER_RT_ABI
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: rin Date: Wed Jun 16 05:05:03 UTC 2021 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: int_lib.h Log Message: PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 266891: https://github.com/llvm/llvm-project/commit/28e1b977d4694c6b3a5c4d8107570a969be71e77#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 [PATCH] builtins: remove use of __attribute__((pcs("aapcs"))) on Windows Windows does not honour the __attribute__((pcs)) on ARM. Although this will result in ABI mismatches, compiler-rt should largely be unneeded for resolving dependencies as we generate MS ABI compliant library calls now for the most part. llvm-svn: 266891 To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.1.1.4 src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h:1.1.1.4 Sat Feb 27 18:59:30 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h Wed Jun 16 05:05:03 2021 @@ -35,11 +35,7 @@ # define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) #else # define ARM_EABI_FNALIAS(aeabi_name, name) -# if defined(__arm__) && defined(_WIN32) && (!defined(_MSC_VER) || defined(__clang__)) -# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) -# else -# define COMPILER_RT_ABI -# endif +# define COMPILER_RT_ABI #endif #ifdef _MSC_VER
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: jmcneill Date: Tue May 5 12:47:16 UTC 2020 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: clear_cache.c Log Message: Align addresses to cache lines in __clear_cache for aarch64. This corrects an issue where if the start and end address fall in different lines, and the end address is not cache line size aligned, the last line will not be invalidated properly. Patch from compiler-rt upstream: https://reviews.llvm.org/rCRT323315 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/clear_cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/clear_cache.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/clear_cache.c:1.3 src/sys/external/bsd/compiler_rt/dist/lib/builtins/clear_cache.c:1.4 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/clear_cache.c:1.3 Fri Jun 16 21:22:14 2017 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/clear_cache.c Tue May 5 12:47:16 2020 @@ -143,12 +143,14 @@ void __clear_cache(void *start, void *en * uintptr_t in case this runs in an IPL32 environment. */ const size_t dcache_line_size = 4 << ((ctr_el0 >> 16) & 15); - for (addr = xstart; addr < xend; addr += dcache_line_size) + for (addr = xstart & ~(dcache_line_size - 1); addr < xend; + addr += dcache_line_size) __asm __volatile("dc cvau, %0" :: "r"(addr)); __asm __volatile("dsb ish"); const size_t icache_line_size = 4 << ((ctr_el0 >> 0) & 15); - for (addr = xstart; addr < xend; addr += icache_line_size) + for (addr = xstart & ~(icache_line_size - 1); addr < xend; + addr += icache_line_size) __asm __volatile("ic ivau, %0" :: "r"(addr)); __asm __volatile("isb sy"); #elif defined(__sparc__)
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Sat Apr 4 23:17:34 UTC 2020 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_platform_limits_netbsd.cc Log Message: Fix LLVM sanitizers build after removal of netsmb Cherry-pick upstream commit: >From 695ca346eb0c724fb79c6f166cfecd736eae6608 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Sun, 5 Apr 2020 00:54:55 +0200 Subject: [PATCH] [compiler-rt] Fix build on NetBSD 9.99.52+ Add a fallback definition of the netsmb device driver that was removed. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.6 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.7 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.6 Sun Mar 15 23:51:27 2020 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Sat Apr 4 23:17:34 2020 @@ -208,7 +208,75 @@ typedef struct ipfobj { #endif #include #include +#if !__NetBSD_Prereq__(9, 99, 51) #include +#else +struct smbioc_flags { + int ioc_level; + int ioc_mask; + int ioc_flags; +}; +struct smbioc_oshare { + int ioc_opt; + int ioc_stype; + char ioc_share[129]; + char ioc_password[129]; + uid_t ioc_owner; + gid_t ioc_group; + mode_t ioc_mode; + mode_t ioc_rights; +}; +struct smbioc_ossn { + int ioc_opt; + uint32_t ioc_svlen; + struct sockaddr *ioc_server; + uint32_t ioc_lolen; + struct sockaddr *ioc_local; + char ioc_srvname[16]; + int ioc_timeout; + int ioc_retrycount; + char ioc_localcs[16]; + char ioc_servercs[16]; + char ioc_user[129]; + char ioc_workgroup[129]; + char ioc_password[129]; + uid_t ioc_owner; + gid_t ioc_group; + mode_t ioc_mode; + mode_t ioc_rights; +}; +struct smbioc_lookup { + int ioc_level; + int ioc_flags; + struct smbioc_ossn ioc_ssn; + struct smbioc_oshare ioc_sh; +}; +struct smbioc_rq { + u_char ioc_cmd; + u_char ioc_twc; + void *ioc_twords; + u_short ioc_tbc; + void *ioc_tbytes; + int ioc_rpbufsz; + char *ioc_rpbuf; + u_char ioc_rwc; + u_short ioc_rbc; +}; +struct smbioc_rw { + u_int16_t ioc_fh; + char *ioc_base; + off_t ioc_offset; + int ioc_cnt; +}; +#define SMBIOC_OPENSESSION _IOW('n', 100, struct smbioc_ossn) +#define SMBIOC_OPENSHARE _IOW('n', 101, struct smbioc_oshare) +#define SMBIOC_REQUEST _IOWR('n', 102, struct smbioc_rq) +#define SMBIOC_T2RQ _IOWR('n', 103, struct smbioc_t2rq) +#define SMBIOC_SETFLAGS _IOW('n', 104, struct smbioc_flags) +#define SMBIOC_LOOKUP _IOW('n', 106, struct smbioc_lookup) +#define SMBIOC_READ _IOWR('n', 107, struct smbioc_rw) +#define SMBIOC_WRITE _IOWR('n', 108, struct smbioc_rw) +#endif #include #include #include
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Sun Mar 15 23:51:28 UTC 2020 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_platform_limits_netbsd.cc Log Message: Fix compiler-rt build with MKIPFILTER=no Cherry-pick upstream patch: >From 7f6b25ad1bb3f8057655a9bad2a3b69621f4a543 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 16 Mar 2020 00:39:02 +0100 Subject: [PATCH] [compiler-rt] [netbsd] Add support for the MKIPFILTER=no distribution Add fallback definition for the IPFilter ioctl commands. https://github.com/llvm/llvm-project/commit/7f6b25ad1bb3f8057655a9bad2a3b69621f4a543.patch PR bin/55070 by Roy Marples To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.5 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.6 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.5 Fri Jan 31 14:01:36 2020 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Sun Mar 15 23:51:27 2020 @@ -162,9 +162,50 @@ #include #include #include +#if __has_include() #include #include #include +#else +/* Fallback for MKIPFILTER=no */ + +typedef struct ap_control { + char apc_label[16]; + char apc_config[16]; + unsigned char apc_p; + unsigned long apc_cmd; + unsigned long apc_arg; + void *apc_data; + size_t apc_dsize; +} ap_ctl_t; + +typedef struct ipftq { + ipfmutex_t ifq_lock; + unsigned int ifq_ttl; + void *ifq_head; + void **ifq_tail; + void *ifq_next; + void **ifq_pnext; + int ifq_ref; + unsigned int ifq_flags; +} ipftq_t; + +typedef struct ipfobj { + uint32_t ipfo_rev; + uint32_t ipfo_size; + void *ipfo_ptr; + int ipfo_type; + int ipfo_offset; + int ipfo_retval; + unsigned char ipfo_xxxpad[28]; +} ipfobj_t; + +#define SIOCADNAT _IOW('r', 60, struct ipfobj) +#define SIOCRMNAT _IOW('r', 61, struct ipfobj) +#define SIOCGNATS _IOWR('r', 62, struct ipfobj) +#define SIOCGNATL _IOWR('r', 63, struct ipfobj) +#define SIOCPURGENAT _IOWR('r', 100, struct ipfobj) +#endif #include #include #include
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Jan 31 14:01:36 UTC 2020 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_interceptors_ioctl_netbsd.inc sanitizer_platform_limits_netbsd.cc Log Message: Fix the build of LLVM sanitizers after the urio(4) removal Cherry-pick a part of the upstream commit: [compiler-rt] Fix build on NetBSD 9.99.44 Fix build on >= 9.99.44 after the removal of urio(4). Add compat code for the device as NetBSD-9.0 is supported. https://github.com/llvm/llvm-project/commit/3a200f3f2e52e671b8d9911e3724d6b11dbbbe08 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.3 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.4 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.3 Wed Dec 18 14:51:24 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc Fri Jan 31 14:01:36 2020 @@ -447,9 +447,6 @@ static void ioctl_table_fill() { _(STICIO_STOPQ, NONE, 0); /* Entries from file: dev/usb/ukyopon.h */ _(UKYOPON_IDENTIFY, WRITE, struct_ukyopon_identify_sz); - /* Entries from file: dev/usb/urio.h */ - _(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz); - _(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz); /* Entries from file: dev/usb/usb.h */ _(USB_REQUEST, READWRITE, struct_usb_ctl_request_sz); _(USB_SETDEBUG, READ, sizeof(int)); @@ -1406,6 +1403,9 @@ static void ioctl_table_fill() { /* Entries from file: dev/filemon/filemon.h (compat <= 9.99.26) */ _(FILEMON_SET_FD, READWRITE, sizeof(int)); _(FILEMON_SET_PID, READWRITE, sizeof(int)); + /* Entries from file: dev/usb/urio.h (compat <= 9.99.43) */ + _(URIO_SEND_COMMAND, READWRITE, struct_urio_command_sz); + _(URIO_RECV_COMMAND, READWRITE, struct_urio_command_sz); #undef _ } // NOLINT Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.4 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.5 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.4 Tue Dec 24 19:51:00 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Fri Jan 31 14:01:36 2020 @@ -191,7 +191,21 @@ #include #include #include +#if !__NetBSD_Prereq__(9, 99, 44) #include +#else +struct urio_command { + unsigned short length; + int request; + int requesttype; + int value; + int index; + void *buffer; + int timeout; +}; +#define URIO_SEND_COMMAND _IOWR('U', 200, struct urio_command) +#define URIO_RECV_COMMAND _IOWR('U', 201, struct urio_command) +#endif #include #include #include
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Dec 27 00:35:05 UTC 2019 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_linux_libcdep.cc Log Message: Cherry-pick LLVM upstream patch to fix build of compiler-rt commit 52b5fe5f45b1908e140e05a4eceaaac7002be768 Author: Kamil Rytarowski Date: Wed Dec 25 04:05:10 2019 +0100 [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build The TLS base (LWP private pointer) functions are namespaced and hidden i.e. inside the _RTLD_SOURCE namespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc:1.1.1.1 Tue Jan 8 05:40:29 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Fri Dec 27 00:35:05 2019 @@ -28,6 +28,10 @@ #include "sanitizer_placement_new.h" #include "sanitizer_procmaps.h" +#if SANITIZER_NETBSD +#define _RTLD_SOURCE // Fast LWP private pointer getters in ThreadSelfTlsTcb(). +#endif + #include // for dlsym() #include #include
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Tue Dec 24 19:51:00 UTC 2019 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_platform_limits_netbsd.cc sanitizer_platform_limits_netbsd.h sanitizer_syscalls_netbsd.inc Log Message: Fix compiler-rt sanitizer build with >= 9.99.30 Cherry-pick (patched): [compiler-rt] Adapt for ptrace(2) changes in NetBSD-9.99.30 Enable compat support for now legacy PT_LWPINFO. Support PT_LWPSTATUS and PT_LWPNEXT. https://github.com/llvm/llvm-project/commit/4b8232d4f0bf5fd9f11ebef2b0f9e8e15f130fb3 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.3 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.4 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.3 Wed Dec 18 14:51:24 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Tue Dec 24 19:51:00 2019 @@ -18,6 +18,7 @@ #define _KMEMUSER #define RAY_DO_SIGLEV +#define __LEGACY_PT_LWPINFO // clang-format off #include @@ -72,6 +73,15 @@ #include #include #include + +// Compat for NetBSD < 9.99.30. +#ifndef PT_LWPSTATUS +#define PT_LWPSTATUS 24 +#endif +#ifndef PT_LWPSTATUS +#define PT_LWPSTATUS 25 +#endif + #include #include #include @@ -292,6 +302,8 @@ int ptrace_pt_get_event_mask = PT_GET_EV int ptrace_pt_get_process_state = PT_GET_PROCESS_STATE; int ptrace_pt_set_siginfo = PT_SET_SIGINFO; int ptrace_pt_get_siginfo = PT_GET_SIGINFO; +int ptrace_pt_lwpstatus = PT_LWPSTATUS; +int ptrace_pt_lwpnext = PT_LWPNEXT; int ptrace_piod_read_d = PIOD_READ_D; int ptrace_piod_write_d = PIOD_WRITE_D; int ptrace_piod_read_i = PIOD_READ_I; @@ -324,6 +336,8 @@ int ptrace_pt_getdbregs = -1; unsigned struct_ptrace_ptrace_io_desc_struct_sz = sizeof(struct ptrace_io_desc); unsigned struct_ptrace_ptrace_lwpinfo_struct_sz = sizeof(struct ptrace_lwpinfo); +unsigned struct_ptrace_ptrace_lwpstatus_struct_sz = +sizeof(struct __sanitizer_ptrace_lwpstatus); unsigned struct_ptrace_ptrace_event_struct_sz = sizeof(ptrace_event_t); unsigned struct_ptrace_ptrace_siginfo_struct_sz = sizeof(ptrace_siginfo_t); Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.4 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3 Wed Dec 18 14:51:24 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h Tue Dec 24 19:51:00 2019 @@ -407,6 +407,8 @@ extern int ptrace_pt_get_event_mask; extern int ptrace_pt_get_process_state; extern int ptrace_pt_set_siginfo; extern int ptrace_pt_get_siginfo; +extern int ptrace_pt_lwpstatus; +extern int ptrace_pt_lwpnext; extern int ptrace_piod_read_d; extern int ptrace_piod_write_d; extern int ptrace_piod_read_i; @@ -431,8 +433,17 @@ struct __sanitizer_ptrace_lwpinfo { int pl_event; }; +struct __sanitizer_ptrace_lwpstatus { + __sanitizer_lwpid_t pl_lwpid; + __sanitizer_sigset_t pl_sigpend; + __sanitizer_sigset_t pl_sigmask; + char pl_name[20]; + void *pl_private; +}; + extern unsigned struct_ptrace_ptrace_io_desc_struct_sz; extern unsigned struct_ptrace_ptrace_lwpinfo_struct_sz; +extern unsigned struct_ptrace_ptrace_lwpstatus_struct_sz; extern unsigned struct_ptrace_ptrace_event_struct_sz; extern unsigned struct_ptrace_ptrace_siginfo_struct_sz; Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc:1.1.1.1 Tue Jan 8 05:40:30 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc Tue Dec 24 19:51:00 2019 @@ -324,6 +324,16 @@ PRE_SYSCALL(ptrace) PRE_READ(addr_,
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Wed Dec 18 14:51:24 UTC 2019 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_interceptors_ioctl_netbsd.inc sanitizer_platform_limits_netbsd.cc sanitizer_platform_limits_netbsd.h Log Message: Fix compiler-rt build after removal of filemon Cherry-pick [patched locally]: [compiler-rt] Sync NetBSD ioctl definitions with 9.99.26 Document the minimal version supported to 9.0. https://github.com/llvm/llvm-project/commit/e14ff22694c28b5e731502bfc30192b3208d4d8d To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.2 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc:1.2 Wed Aug 14 00:51:48 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc Wed Dec 18 14:51:24 2019 @@ -25,7 +25,7 @@ struct ioctl_desc { const char *name; }; -const unsigned ioctl_table_max = 1236; +const unsigned ioctl_table_max = 1238; static ioctl_desc ioctl_table[ioctl_table_max]; static unsigned ioctl_table_size = 0; @@ -167,9 +167,6 @@ static void ioctl_table_fill() { _(FE_ENABLE_HIGH_LNB_VOLTAGE, READ, sizeof(int)); _(FE_SET_FRONTEND_TUNE_MODE, READ, sizeof(unsigned int)); _(FE_DISHNETWORK_SEND_LEGACY_CMD, READ, sizeof(unsigned long)); - /* Entries from file: dev/filemon/filemon.h */ - _(FILEMON_SET_FD, READWRITE, sizeof(int)); - _(FILEMON_SET_PID, READWRITE, sizeof(int)); /* Entries from file: dev/hdaudio/hdaudioio.h */ _(HDAUDIO_FGRP_INFO, READWRITE, struct_plistref_sz); _(HDAUDIO_FGRP_GETCONFIG, READWRITE, struct_plistref_sz); @@ -654,6 +651,7 @@ static void ioctl_table_fill() { _(NVMM_IOC_MACHINE_CONFIGURE, READ, struct_nvmm_ioc_machine_configure_sz); _(NVMM_IOC_VCPU_CREATE, READ, struct_nvmm_ioc_vcpu_create_sz); _(NVMM_IOC_VCPU_DESTROY, READ, struct_nvmm_ioc_vcpu_destroy_sz); + _(NVMM_IOC_VCPU_CONFIGURE, READ, struct_nvmm_ioc_vcpu_configure_sz); _(NVMM_IOC_VCPU_SETSTATE, READ, struct_nvmm_ioc_vcpu_setstate_sz); _(NVMM_IOC_VCPU_GETSTATE, READ, struct_nvmm_ioc_vcpu_getstate_sz); _(NVMM_IOC_VCPU_INJECT, READ, struct_nvmm_ioc_vcpu_inject_sz); @@ -736,6 +734,7 @@ static void ioctl_table_fill() { _(IOC_NPF_SAVE, WRITE, struct_nvlist_ref_sz); _(IOC_NPF_RULE, READWRITE, struct_nvlist_ref_sz); _(IOC_NPF_CONN_LOOKUP, READWRITE, struct_nvlist_ref_sz); + _(IOC_NPF_TABLE_REPLACE, READWRITE, struct_nvlist_ref_sz); /* Entries from file: net/if_pppoe.h */ _(PPPOESETPARMS, READ, struct_pppoediscparms_sz); _(PPPOEGETPARMS, READWRITE, struct_pppoediscparms_sz); @@ -1404,8 +1403,11 @@ static void ioctl_table_fill() { _(SNDCTL_DSP_SETRECVOL, READ, sizeof(unsigned int)); _(SNDCTL_DSP_SKIP, NONE, 0); _(SNDCTL_DSP_SILENCE, NONE, 0); + /* Entries from file: dev/filemon/filemon.h (compat <= 9.99.26) */ + _(FILEMON_SET_FD, READWRITE, sizeof(int)); + _(FILEMON_SET_PID, READWRITE, sizeof(int)); #undef _ -} +} // NOLINT static bool ioctl_initialized = false; Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.2 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.2 Wed Aug 14 00:51:48 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Wed Dec 18 14:51:24 2019 @@ -110,7 +110,12 @@ #include #include #include +#if !__NetBSD_Prereq__(9,9,26) #include +#else +#define FILEMON_SET_FD _IOWR('S', 1, int) +#define FILEMON_SET_PID _IOWR('S', 2, pid_t) +#endif #include #include #include @@ -698,6 +703,7 @@ unsigned struct_nvmm_ioc_machine_configu sizeof(nvmm_ioc_machine_configure); unsigned struct_nvmm_ioc_vcpu_create_sz = sizeof(nvmm_ioc_vcpu_create); unsigned struct_nvmm_ioc_vcpu_destroy_sz = sizeof(nvmm_ioc_vcpu_destroy); +unsigned struct_nvmm_ioc_vcpu_configure_sz = sizeof(nvmm_ioc_vcpu_configure);
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/lsan
Module Name:src Committed By: kamil Date: Tue Jan 8 05:44:58 UTC 2019 Added Files: src/sys/external/bsd/compiler_rt/dist/lib/lsan: lsan.cc lsan.h lsan_allocator.cc lsan_allocator.h lsan_common.cc lsan_common.h lsan_common_linux.cc lsan_interceptors.cc lsan_thread.cc lsan_thread.h Log Message: merge new version To generate a diff of this commit: cvs rdiff -u -r0 -r1.3 src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.cc \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.h \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_allocator.cc \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_allocator.h \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_common.cc \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_common.h \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_common_linux.cc \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_interceptors.cc \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_thread.cc \ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan_thread.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.cc diff -u /dev/null src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.cc:1.3 --- /dev/null Tue Jan 8 05:44:58 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.cc Tue Jan 8 05:44:58 2019 @@ -0,0 +1,118 @@ +//=-- lsan.cc -===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// +// +// This file is a part of LeakSanitizer. +// Standalone LSan RTL. +// +//===--===// + +#include "lsan.h" + +#include "sanitizer_common/sanitizer_flags.h" +#include "sanitizer_common/sanitizer_flag_parser.h" +#include "sanitizer_common/sanitizer_stacktrace.h" +#include "lsan_allocator.h" +#include "lsan_common.h" +#include "lsan_thread.h" + +bool lsan_inited; +bool lsan_init_is_running; + +namespace __lsan { + +/ Interface to the common LSan module. / +bool WordIsPoisoned(uptr addr) { + return false; +} + +} // namespace __lsan + +using namespace __lsan; // NOLINT + +static void InitializeFlags() { + // Set all the default values. + SetCommonFlagsDefaults(); + { +CommonFlags cf; +cf.CopyFrom(*common_flags()); +cf.external_symbolizer_path = GetEnv("LSAN_SYMBOLIZER_PATH"); +cf.malloc_context_size = 30; +cf.intercept_tls_get_addr = true; +cf.detect_leaks = true; +cf.exitcode = 23; +OverrideCommonFlags(cf); + } + + Flags *f = flags(); + f->SetDefaults(); + + FlagParser parser; + RegisterLsanFlags(, f); + RegisterCommonFlags(); + + // Override from user-specified string. + const char *lsan_default_options = MaybeCallLsanDefaultOptions(); + parser.ParseString(lsan_default_options); + parser.ParseString(GetEnv("LSAN_OPTIONS")); + + SetVerbosity(common_flags()->verbosity); + + if (Verbosity()) ReportUnrecognizedFlags(); + + if (common_flags()->help) parser.PrintFlagDescriptions(); + + __sanitizer_set_report_path(common_flags()->log_path); +} + +static void OnStackUnwind(const SignalContext , const void *, + BufferedStackTrace *stack) { + GetStackTrace(stack, kStackTraceMax, sig.pc, sig.bp, sig.context, +common_flags()->fast_unwind_on_fatal); +} + +static void LsanOnDeadlySignal(int signo, void *siginfo, void *context) { + HandleDeadlySignal(siginfo, context, GetCurrentThread(), , + nullptr); +} + +extern "C" void __lsan_init() { + CHECK(!lsan_init_is_running); + if (lsan_inited) +return; + lsan_init_is_running = true; + SanitizerToolName = "LeakSanitizer"; + CacheBinaryName(); + AvoidCVE_2016_2143(); + InitializeFlags(); + InitCommonLsan(); + InitializeAllocator(); + ReplaceSystemMalloc(); + InitTlsSize(); + InitializeInterceptors(); + InitializeThreadRegistry(); + InstallDeadlySignalHandlers(LsanOnDeadlySignal); + u32 tid = ThreadCreate(0, 0, true); + CHECK_EQ(tid, 0); + ThreadStart(tid, GetTid()); + SetCurrentThread(tid); + + if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) +Atexit(DoLeakCheck); + + InitializeCoverage(common_flags()->coverage, common_flags()->coverage_dir); + + lsan_inited = true; + lsan_init_is_running = false; +} + +extern "C" SANITIZER_INTERFACE_ATTRIBUTE +void __sanitizer_print_stack_trace() { + GET_STACK_TRACE_FATAL; + stack.Print(); +} Index: src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.h diff -u /dev/null src/sys/external/bsd/compiler_rt/dist/lib/lsan/lsan.h:1.3 --- /dev/null Tue Jan 8 05:44:58 2019 +++
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/profile
Module Name:src Committed By: kamil Date: Fri Jan 5 17:54:31 UTC 2018 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/profile: GCDAProfiling.c Log Message: Include namespace.h in GCDAProfiling.c (compiler_rt) The NetBSD Standard C Library uses internally some of its functions with a mangled symbol name, usually "_symbol". The internal functions shall not use the global (public) symbols. This change eliminates usage of the global name of the following symbols: - fdopen -> _fdopen - mmap -> _mmap - strdup -> _strdup Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.1.1.5 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c:1.1.1.5 src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c:1.1.1.5 Sat Feb 27 18:59:31 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c Fri Jan 5 17:54:31 2018 @@ -20,6 +20,10 @@ |* \*===--===*/ +#ifdef _LIBC +#include "namespace.h" +#endif + #include "InstrProfilingUtil.h" #include
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: martin Date: Sat Mar 26 07:21:11 UTC 2016 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: floatdidf.c floatundidf.c Log Message: Make the softfloat variant compile To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c:1.1.1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c:1.1.1.2 Sat Feb 27 18:59:29 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c Sat Mar 26 07:21:11 2016 @@ -98,10 +98,10 @@ __floatdidf(di_int a) /* a is now rounded to DBL_MANT_DIG bits */ } double_bits fb; -fb.u.high = ((su_int)s & 0x8000) |/* sign */ +fb.u.s.high = ((su_int)s & 0x8000) |/* sign */ ((e + 1023) << 20) |/* exponent */ ((su_int)(a >> 32) & 0x000F); /* mantissa-high */ -fb.u.low = (su_int)a; /* mantissa-low */ +fb.u.s.low = (su_int)a; /* mantissa-low */ return fb.f; } #endif Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c:1.1.1.3 src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c:1.1.1.3 Sat Feb 27 18:59:29 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c Sat Mar 26 07:21:11 2016 @@ -98,9 +98,9 @@ __floatundidf(du_int a) /* a is now rounded to DBL_MANT_DIG bits */ } double_bits fb; -fb.u.high = ((e + 1023) << 20) |/* exponent */ +fb.u.s.high = ((e + 1023) << 20) |/* exponent */ ((su_int)(a >> 32) & 0x000F); /* mantissa-high */ -fb.u.low = (su_int)a; /* mantissa-low */ +fb.u.s.low = (su_int)a; /* mantissa-low */ return fb.f; } #endif
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: riastradh Date: Fri Mar 25 03:51:19 UTC 2016 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: int_types.h Log Message: No CRT_HAS_128BIT for pcc, which lacks attribute((mode(TI))). To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h:1.1.1.4 src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h:1.1.1.4 Sat Feb 27 18:59:30 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_types.h Fri Mar 25 03:51:19 2016 @@ -62,7 +62,8 @@ typedef union /* MIPS64 issue: PR 20098 */ #if (defined(__LP64__) || defined(__wasm__)) && \ -!(defined(__mips__) && defined(__clang__)) +!(defined(__mips__) && defined(__clang__)) && \ +!defined(__PCC__) #define CRT_HAS_128BIT #endif
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: christos Date: Fri Mar 4 17:49:07 UTC 2016 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: clzdi2.c ctzdi2.c Log Message: Fix infinite recursion caused by gcc lossage. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/ctzdi2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c:1.1.1.1 Wed Feb 26 17:31:29 2014 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/clzdi2.c Fri Mar 4 12:49:06 2016 @@ -16,6 +16,12 @@ /* Returns: the number of leading 0-bits */ +#if !defined(__clang__) && (defined(__sparc64__) || defined(__mips64)) +/* gcc resolves __builtin_clz -> __clzdi2 leading to infinite recursion */ +#define __builtin_clz(a) __clzsi2(a) +extern si_int __clzsi2(si_int); +#endif + /* Precondition: a != 0 */ COMPILER_RT_ABI si_int Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/ctzdi2.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/ctzdi2.c:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/builtins/ctzdi2.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/ctzdi2.c:1.1.1.1 Wed Feb 26 17:31:29 2014 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/ctzdi2.c Fri Mar 4 12:49:06 2016 @@ -16,6 +16,12 @@ /* Returns: the number of trailing 0-bits */ +#if !defined(__clang__) && (defined(__sparc64__) || defined(__mips64)) +/* gcc resolves __builtin_ctz -> __ctzdi2 leading to infinite recursion */ +#define __builtin_ctz(a) __ctzsi2(a) +extern si_int __ctzsi2(si_int); +#endif + /* Precondition: a != 0 */ COMPILER_RT_ABI si_int
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib
Module Name:src Committed By: christos Date: Sat Feb 27 22:19:35 UTC 2016 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: int_math.h src/sys/external/bsd/compiler_rt/dist/lib/profile: InstrProfilingPort.h Log Message: Add lint bits. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_math.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingPort.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_math.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_math.h:1.1.1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_math.h:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_math.h:1.1.1.2 Sat Feb 27 13:59:30 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/int_math.h Sat Feb 27 17:19:35 2016 @@ -54,6 +54,8 @@ __typeof((x)) x_ = (x); \ !crt_isinf(x_) && !crt_isnan(x_); \ })) +#elif defined(__lint__) +# define crt_isfinite(x) 0 #else # error "Do not know how to check for infinity" #endif /* __has_builtin(__builtin_isfinite) */ Index: src/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingPort.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingPort.h:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingPort.h:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingPort.h:1.1.1.1 Sat Feb 27 13:59:32 2016 +++ src/sys/external/bsd/compiler_rt/dist/lib/profile/InstrProfilingPort.h Sat Feb 27 17:19:35 2016 @@ -18,6 +18,10 @@ #define COMPILER_RT_ALIGNAS(x) __attribute__((aligned(x))) #define COMPILER_RT_VISIBILITY __attribute__((visibility("hidden"))) #define COMPILER_RT_WEAK __attribute__((weak)) +#elif defined(__lint__) +#define COMPILER_RT_ALIGNAS(x) +#define COMPILER_RT_VISIBILITY +#define COMPILER_RT_WEAK #endif #define COMPILER_RT_SECTION(Sect) __attribute__((section(Sect)))
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: joerg Date: Sat Feb 27 19:05:27 UTC 2016 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: gcc_personality_v0.c Log Message: Merge compiler-rt-259194. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c:1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c:1.3 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c:1.2 Mon Mar 9 17:28:11 2015 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c Sat Feb 27 19:05:27 2016 @@ -11,47 +11,7 @@ #include "int_lib.h" -/* - * _Unwind_* stuff based on C++ ABI public documentation - * http://refspecs.freestandards.org/abi-eh-1.21.html - */ - -typedef enum { -_URC_NO_REASON = 0, -_URC_FOREIGN_EXCEPTION_CAUGHT = 1, -_URC_FATAL_PHASE2_ERROR = 2, -_URC_FATAL_PHASE1_ERROR = 3, -_URC_NORMAL_STOP = 4, -_URC_END_OF_STACK = 5, -_URC_HANDLER_FOUND = 6, -_URC_INSTALL_CONTEXT = 7, -_URC_CONTINUE_UNWIND = 8 -} _Unwind_Reason_Code; - -typedef enum { -_UA_SEARCH_PHASE = 1, -_UA_CLEANUP_PHASE = 2, -_UA_HANDLER_FRAME = 4, -_UA_FORCE_UNWIND = 8, -_UA_END_OF_STACK = 16 -} _Unwind_Action; - -typedef struct _Unwind_Context* _Unwind_Context_t; - -struct _Unwind_Exception { -uint64_texception_class; -void(*exception_cleanup)(_Unwind_Reason_Code reason, - struct _Unwind_Exception* exc); -uintptr_tprivate_1; -uintptr_tprivate_2; -}; - -COMPILER_RT_ABI const uint8_t*_Unwind_GetLanguageSpecificData(_Unwind_Context_t c); -COMPILER_RT_ABI void _Unwind_SetGR(_Unwind_Context_t c, int i, uintptr_t n); -COMPILER_RT_ABI void _Unwind_SetIP(_Unwind_Context_t, uintptr_t new_value); -COMPILER_RT_ABI uintptr_t _Unwind_GetIP(_Unwind_Context_t context); -COMPILER_RT_ABI uintptr_t _Unwind_GetRegionStart(_Unwind_Context_t context); - +#include /* * Pointer encodings documented at: @@ -181,16 +141,17 @@ static uintptr_t readEncodedPointer(cons * throw through a C function compiled with -fexceptions. */ #if __USING_SJLJ_EXCEPTIONS__ -// the setjump-longjump based exceptions personality routine has a different name +/* the setjump-longjump based exceptions personality routine has a + * different name */ COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_sj0(int version, _Unwind_Action actions, uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject, - _Unwind_Context_t context) + struct _Unwind_Context *context) #else COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_v0(int version, _Unwind_Action actions, uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject, - _Unwind_Context_t context) + struct _Unwind_Context *context) #endif { /* Since C does not have catch clauses, there is nothing to do during */ @@ -199,7 +160,7 @@ __gcc_personality_v0(int version, _Unwin return _URC_CONTINUE_UNWIND; /* There is nothing to do if there is no LSDA for this frame. */ -const uint8_t* lsda = _Unwind_GetLanguageSpecificData(context); +const uint8_t* lsda = (uint8_t*)_Unwind_GetLanguageSpecificData(context); if ( lsda == (uint8_t*) 0 ) return _URC_CONTINUE_UNWIND; @@ -234,15 +195,15 @@ __gcc_personality_v0(int version, _Unwin * Set Instruction Pointer to so we re-enter function * at landing pad. The landing pad is created by the compiler * to take two parameters in registers. - */ -_Unwind_SetGR(context, __builtin_eh_return_data_regno(0), -(uintptr_t)exceptionObject); + */ +_Unwind_SetGR(context, __builtin_eh_return_data_regno(0), + (uintptr_t)exceptionObject); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), 0); -_Unwind_SetIP(context, funcStart+landingPad); +_Unwind_SetIP(context, (funcStart + landingPad)); return _URC_INSTALL_CONTEXT; } } - + /* No landing pad found, continue unwinding. */ return _URC_CONTINUE_UNWIND; }
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/builtins
Module Name:src Committed By: joerg Date: Mon Mar 9 17:28:11 UTC 2015 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/builtins: gcc_personality_v0.c Log Message: Don't use __gcc_personality_sj0 on ARM. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c:1.1.1.2 src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c:1.1.1.2 Tue Mar 18 22:28:43 2014 +++ src/sys/external/bsd/compiler_rt/dist/lib/builtins/gcc_personality_v0.c Mon Mar 9 17:28:11 2015 @@ -180,7 +180,7 @@ static uintptr_t readEncodedPointer(cons * on each frame as the stack is unwound during a C++ exception * throw through a C function compiled with -fexceptions. */ -#if __arm__ +#if __USING_SJLJ_EXCEPTIONS__ // the setjump-longjump based exceptions personality routine has a different name COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_sj0(int version, _Unwind_Action actions,
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib
Module Name:src Committed By: joerg Date: Wed Feb 26 22:40:09 UTC 2014 Removed Files: src/sys/external/bsd/compiler_rt/dist/lib: absvdi2.c absvsi2.c absvti2.c adddf3.c addsf3.c addvdi3.c addvsi3.c addvti3.c ashldi3.c ashlti3.c ashrdi3.c ashrti3.c assembly.h atomic.c clear_cache.c clzdi2.c clzsi2.c clzti2.c cmpdi2.c cmpti2.c comparedf2.c comparesf2.c ctzdi2.c ctzsi2.c ctzti2.c divdc3.c divdf3.c divdi3.c divmoddi4.c divmodsi4.c divsc3.c divsf3.c divsi3.c divti3.c divxc3.c enable_execute_stack.c eprintf.c extendsfdf2.c ffsdi2.c ffsti2.c fixdfdi.c fixdfsi.c fixdfti.c fixsfdi.c fixsfsi.c fixsfti.c fixunsdfdi.c fixunsdfsi.c fixunsdfti.c fixunssfdi.c fixunssfsi.c fixunssfti.c fixunsxfdi.c fixunsxfsi.c fixunsxfti.c fixxfdi.c fixxfti.c floatdidf.c floatdisf.c floatdixf.c floatsidf.c floatsisf.c floattidf.c floattisf.c floattixf.c floatundidf.c floatundisf.c floatundixf.c floatunsidf.c floatunsisf.c floatuntidf.c floatuntisf.c floatuntixf.c fp_lib.h gcc_personality_v0.c int_endianness.h int_lib.h int_math.h int_types.h int_util.c int_util.h lshrdi3.c lshrti3.c moddi3.c modsi3.c modti3.c muldc3.c muldf3.c muldi3.c mulodi4.c mulosi4.c muloti4.c mulsc3.c mulsf3.c multi3.c mulvdi3.c mulvsi3.c mulvti3.c mulxc3.c negdf2.c negdi2.c negsf2.c negti2.c negvdi2.c negvsi2.c negvti2.c paritydi2.c paritysi2.c parityti2.c popcountdi2.c popcountsi2.c popcountti2.c powidf2.c powisf2.c powitf2.c powixf2.c subdf3.c subsf3.c subvdi3.c subvsi3.c subvti3.c svn-commit.tmp trampoline_setup.c truncdfsf2.c ucmpdi2.c ucmpti2.c udivdi3.c udivmoddi4.c udivmodsi4.c udivmodti4.c udivsi3.c udivti3.c umoddi3.c umodsi3.c umodti3.c src/sys/external/bsd/compiler_rt/dist/lib/arm: adddf3vfp.S addsf3vfp.S aeabi_dcmp.S aeabi_fcmp.S aeabi_idivmod.S aeabi_ldivmod.S aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S aeabi_uidivmod.S aeabi_uldivmod.S bswapdi2.S bswapsi2.S clzdi2.S clzsi2.S comparesf2.S divdf3vfp.S divmodsi4.S divsf3vfp.S divsi3.S eqdf2vfp.S eqsf2vfp.S extendsfdf2vfp.S fixdfsivfp.S fixsfsivfp.S fixunsdfsivfp.S fixunssfsivfp.S floatsidfvfp.S floatsisfvfp.S floatunssidfvfp.S floatunssisfvfp.S gedf2vfp.S gesf2vfp.S gtdf2vfp.S gtsf2vfp.S ledf2vfp.S lesf2vfp.S ltdf2vfp.S ltsf2vfp.S modsi3.S muldf3vfp.S mulsf3vfp.S nedf2vfp.S negdf2vfp.S negsf2vfp.S nesf2vfp.S restore_vfp_d8_d15_regs.S save_vfp_d8_d15_regs.S softfloat-alias.list subdf3vfp.S subsf3vfp.S switch16.S switch32.S switch8.S switchu8.S sync_synchronize.S truncdfsf2vfp.S udivmodsi4.S udivsi3.S umodsi3.S unorddf2vfp.S unordsf2vfp.S src/sys/external/bsd/compiler_rt/dist/lib/i386: ashldi3.S ashrdi3.S divdi3.S floatdidf.S floatdisf.S floatdixf.S floatundidf.S floatundisf.S floatundixf.S lshrdi3.S moddi3.S muldi3.S udivdi3.S umoddi3.S src/sys/external/bsd/compiler_rt/dist/lib/lsan: CMakeLists.txt lsan.cc lsan.h lsan_allocator.cc lsan_allocator.h lsan_common.cc lsan_common.h lsan_common_linux.cc lsan_interceptors.cc lsan_thread.cc lsan_thread.h src/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests: CMakeLists.txt lit.common.cfg src/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests/AsanConfig: lit.cfg lit.site.cfg.in src/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests/LsanConfig: lit.cfg lit.site.cfg.in src/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests/TestCases: disabler.cc disabler_in_tsd_destructor.cc ignore_object.cc ignore_object_errors.cc large_allocation_leak.cc link_turned_off.cc stale_stack_leak.cc suppressions_default.cc suppressions_file.cc suppressions_file.cc.supp use_globals_initialized.cc use_globals_uninitialized.cc use_registers.cc use_stacks.cc use_stacks_threaded.cc use_tls_dynamic.cc use_tls_pthread_specific_dynamic.cc use_tls_pthread_specific_static.cc use_tls_static.cc use_unaligned.cc src/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests/TestCases/SharedLibs: huge_tls_lib_so.cc lit.local.cfg src/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests/Unit: lit.site.cfg.in src/sys/external/bsd/compiler_rt/dist/lib/lsan/tests: CMakeLists.txt lsan_dummy_unittest.cc lsan_testlib.cc src/sys/external/bsd/compiler_rt/dist/lib/ppc: DD.h divtc3.c fixtfdi.c fixunstfdi.c floatditf.c floatunditf.c gcc_qadd.c gcc_qdiv.c gcc_qmul.c gcc_qsub.c
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib
Module Name:src Committed By: christos Date: Tue Feb 18 20:53:44 UTC 2014 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib: int_util.c Log Message: - include sys/cdefs.h for compiler definitions - add a lint comment To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/int_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/int_util.c diff -u src/sys/external/bsd/compiler_rt/dist/lib/int_util.c:1.1.1.2 src/sys/external/bsd/compiler_rt/dist/lib/int_util.c:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/int_util.c:1.1.1.2 Wed Jan 15 16:06:10 2014 +++ src/sys/external/bsd/compiler_rt/dist/lib/int_util.c Tue Feb 18 15:53:44 2014 @@ -7,7 +7,7 @@ * * ===--=== */ - +#include sys/cdefs.h #include int_util.h #include int_lib.h @@ -54,6 +54,7 @@ void compilerrt_abort_impl(const char *f __attribute__((weak)) __attribute__((visibility(hidden))) #endif +/*ARGSUSED*/ void compilerrt_abort_impl(const char *file, int line, const char *function) { abort(); }
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib
Module Name:src Committed By: christos Date: Tue Feb 18 20:54:34 UTC 2014 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib: int_util.h Log Message: prefer __func__ instead of __FUNCTION__ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/int_util.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/int_util.h diff -u src/sys/external/bsd/compiler_rt/dist/lib/int_util.h:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/int_util.h:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/int_util.h:1.1.1.1 Thu Jul 4 18:09:52 2013 +++ src/sys/external/bsd/compiler_rt/dist/lib/int_util.h Tue Feb 18 15:54:34 2014 @@ -20,8 +20,7 @@ #define INT_UTIL_H /** \brief Trigger a program abort (or panic for kernel code). */ -#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \ - __FUNCTION__) +#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, __func__) void compilerrt_abort_impl(const char *file, int line, const char *function) __attribute__((noreturn));