CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2024-04-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Apr  2 22:29:57 UTC 2024

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitNativeARM_64.c

Log Message:
sljit: Pacify -Wsign-compare.

If these sizes are negative, we're probably in trouble anyway, so
assert nonnegative here.

Needed to resolve PR 58103.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c

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



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2024-04-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Apr  2 22:29:57 UTC 2024

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitNativeARM_64.c

Log Message:
sljit: Pacify -Wsign-compare.

If these sizes are negative, we're probably in trouble anyway, so
assert nonnegative here.

Needed to resolve PR 58103.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.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/sljit/dist/sljit_src/sljitNativeARM_64.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c:1.4 src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c:1.5
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c:1.4	Sun Jan 20 23:14:16 2019
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c	Tue Apr  2 22:29:57 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljitNativeARM_64.c,v 1.4 2019/01/20 23:14:16 alnsn Exp $	*/
+/*	$NetBSD: sljitNativeARM_64.c,v 1.5 2024/04/02 22:29:57 riastradh Exp $	*/
 
 /*
  *Stack-less Just-In-Time compiler
@@ -1079,7 +1079,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit
 	local_size = (local_size + 15) & ~0xf;
 	compiler->local_size = local_size;
 
-	if (local_size <= (63 * sizeof(sljit_sw))) {
+	SLJIT_ASSERT(local_size >= 0);
+	if ((size_t)local_size <= (63 * sizeof(sljit_sw))) {
 		FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
 			| RN(TMP_SP) | ((-(local_size >> 3) & 0x7f) << 15)));
 		FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
@@ -1129,7 +1130,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit
 
 	SLJIT_ASSERT(prev == -1);
 
-	if (compiler->local_size > (63 * sizeof(sljit_sw))) {
+	SLJIT_ASSERT(compiler->local_size >= 0);
+	if ((size_t)compiler->local_size > (63 * sizeof(sljit_sw))) {
 		/* The local_size is already adjusted by the saved registers. */
 		if (local_size > 0xfff) {
 			FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | ((local_size >> 12) << 10) | (1 << 22)));
@@ -1179,7 +1181,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit
 	local_size = compiler->local_size;
 
 	saved_regs_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 0);
-	if (local_size <= (63 * sizeof(sljit_sw)))
+	SLJIT_ASSERT(local_size >= 0);
+	if ((size_t)local_size <= (63 * sizeof(sljit_sw)))
 		offs = (local_size - saved_regs_size) << (15 - 3);
 	else {
 		FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
@@ -1232,7 +1235,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit
 
 	SLJIT_ASSERT(prev == -1);
 
-	if (compiler->local_size <= (63 * sizeof(sljit_sw))) {
+	SLJIT_ASSERT(compiler->local_size >= 0);
+	if ((size_t)compiler->local_size <= (63 * sizeof(sljit_sw))) {
 		FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
 			| RN(TMP_SP) | (((local_size >> 3) & 0x7f) << 15)));
 	} else if (saved_regs_size > 0) {



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2021-11-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 30 12:32:10 UTC 2021

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitNativeX86_common.c

Log Message:
lint uses the gcc assembly syntax


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c

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



CVS commit: src/sys/external/bsd/sljit/dist/sljit_src

2021-11-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Nov 30 12:32:10 UTC 2021

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitNativeX86_common.c

Log Message:
lint uses the gcc assembly syntax


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.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/sljit/dist/sljit_src/sljitNativeX86_common.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:1.9 src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:1.10
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:1.9	Sun Jan 20 18:14:16 2019
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c	Tue Nov 30 07:32:09 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sljitNativeX86_common.c,v 1.9 2019/01/20 23:14:16 alnsn Exp $	*/
+/*	$NetBSD: sljitNativeX86_common.c,v 1.10 2021/11/30 12:32:09 christos Exp $	*/
 
 /*
  *Stack-less Just-In-Time compiler
@@ -317,7 +317,7 @@ static void get_cpu_features(void)
 	__cpuid(CPUInfo, 1);
 	features = (sljit_u32)CPUInfo[3];
 
-#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C)
+#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C) || defined(__lint__)
 
 	/* AT syntax. */
 	__asm__ (