Module Name: src
Committed By: martin
Date: Wed Aug 20 13:49:28 UTC 2014
Modified Files:
src/external/gpl3/gcc/dist/gcc/config/vax [netbsd-7]: builtins.md vax.c
src/lib/libc/compiler_rt [netbsd-7]: Makefile.inc
src/libexec/ld.elf_so/arch/vax [netbsd-7]: rtld_start.S
Log Message:
Pullup the following to netbsd-7 (requested by matt in ticket #37):
external/gpl3/gcc/dist/gcc/config/vax/builtins.md 1.4
external/gpl3/gcc/dist/gcc/config/vax/vax.c 1.10
Rework so that the ctzsi builtin is supported.
lib/libc/compiler_rt/Makefile.inc 1.26
VAX does need __clzsi2
libexec/ld.elf_so/arch/vax/rtld_start.S 1.23
libexec/ld.elf_so/arch/vax/rtld_start.S 1.24
add a missing register prefix.
Add proper registers for register counts.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 \
src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md
cvs rdiff -u -r1.9 -r1.9.2.1 src/external/gpl3/gcc/dist/gcc/config/vax/vax.c
cvs rdiff -u -r1.24 -r1.24.2.1 src/lib/libc/compiler_rt/Makefile.inc
cvs rdiff -u -r1.22 -r1.22.4.1 src/libexec/ld.elf_so/arch/vax/rtld_start.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md
diff -u src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.3 src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.3.4.1
--- src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md:1.3 Sat Mar 1 08:58:33 2014
+++ src/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Wed Aug 20 13:49:28 2014
@@ -37,17 +37,17 @@
"
{
rtx label = gen_label_rtx ();
- emit_insn (gen_ffssi2_internal (operands[0], operands[1]));
+ emit_insn (gen_ctzsi2 (operands[0], operands[1]));
emit_jump_insn (gen_condjump (gen_rtx_NE(VOIDmode, cc0_rtx, const0_rtx), label));
- emit_insn (gen_negsi2 (operands[0], const1_rtx));
+ emit_move_insn (operands[0], constm1_rtx);
emit_label (label);
emit_insn (gen_addsi3 (operands[0], operands[0], const1_rtx));
DONE;
}")
-(define_insn "ffssi2_internal"
+(define_insn "ctzsi2"
[(set (match_operand:SI 0 "nonimmediate_operand" "=rQ")
- (ffs:SI (match_operand:SI 1 "general_operand" "nrmT")))
+ (ctz:SI (match_operand:SI 1 "general_operand" "nrmT")))
(set (cc0) (match_dup 0))]
""
"ffs $0,$32,%1,%0")
Index: src/external/gpl3/gcc/dist/gcc/config/vax/vax.c
diff -u src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.9 src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.9.2.1
--- src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.9 Wed Jun 4 16:11:32 2014
+++ src/external/gpl3/gcc/dist/gcc/config/vax/vax.c Wed Aug 20 13:49:28 2014
@@ -1117,6 +1117,7 @@ vax_notice_update_cc (rtx exp, rtx insn
case IOR:
case XOR:
case NOT:
+ case CTZ:
case MEM:
case REG:
cc_status.flags = CC_NO_OVERFLOW;
Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.24 src/lib/libc/compiler_rt/Makefile.inc:1.24.2.1
--- src/lib/libc/compiler_rt/Makefile.inc:1.24 Sun Aug 10 23:39:08 2014
+++ src/lib/libc/compiler_rt/Makefile.inc Wed Aug 20 13:49:28 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.24 2014/08/10 23:39:08 matt Exp $
+# $NetBSD: Makefile.inc,v 1.24.2.1 2014/08/20 13:49:28 martin Exp $
COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
@@ -136,9 +136,15 @@ GENERIC_SRCS+= \
# These have h/w instructions which are always used.
.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc" \
+ && ${LIBC_MACHINE_CPU} != "aarch64"
+GENERIC_SRCS+= \
+ clzsi2.c
+.endif
+
+# These have h/w instructions which are always used.
+.if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc" \
&& ${LIBC_MACHINE_CPU} != "aarch64" && ${LIBC_MACHINE_ARCH} != "vax"
GENERIC_SRCS+= \
- clzsi2.c \
ctzsi2.c \
divmodsi4.c \
divsi3.c \
Index: src/libexec/ld.elf_so/arch/vax/rtld_start.S
diff -u src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.22 src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.22.4.1
--- src/libexec/ld.elf_so/arch/vax/rtld_start.S:1.22 Sat Mar 22 15:13:10 2014
+++ src/libexec/ld.elf_so/arch/vax/rtld_start.S Wed Aug 20 13:49:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld_start.S,v 1.22 2014/03/22 15:13:10 matt Exp $ */
+/* $NetBSD: rtld_start.S,v 1.22.4.1 2014/08/20 13:49:28 martin Exp $ */
/*
* Copyright 1996 Matt Thomas <[email protected]>
@@ -152,7 +152,7 @@ ALTENTRY(_rtld_bind_start)
extzv %r2,$4,%r3,%r5 /* extract count */
movq 4(%fp),%r2 /* fetch callframe status & saved AP */
insv %r1,$16,$12,%r2 /* update save mask */
- addl3 %r3,r4,%r1 /* add counts and discard them */
+ addl3 %r4,%r5,%r1 /* add counts and discard them */
movq 12(%fp),%r4 /* fetch callframe saved FP & PC */
moval 20(%fp)[%r1],%sp/* pop callframe */
extzv $16,$12,%r2,%r1 /* get save mask back */