Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src Pullup the following to netbsd-7 (requested by matt in t...
details: https://anonhg.NetBSD.org/src/rev/04f264af405b
branches: netbsd-7
changeset: 798270:04f264af405b
user: martin <martin%NetBSD.org@localhost>
date: Wed Aug 20 13:49:28 2014 +0000
description:
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.
diffstat:
external/gpl3/gcc/dist/gcc/config/vax/builtins.md | 8 ++++----
external/gpl3/gcc/dist/gcc/config/vax/vax.c | 1 +
lib/libc/compiler_rt/Makefile.inc | 10 ++++++++--
libexec/ld.elf_so/arch/vax/rtld_start.S | 4 ++--
4 files changed, 15 insertions(+), 8 deletions(-)
diffs (80 lines):
diff -r 281221a55883 -r 04f264af405b external/gpl3/gcc/dist/gcc/config/vax/builtins.md
--- a/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Wed Aug 20 13:46:17 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/vax/builtins.md Wed Aug 20 13:49:28 2014 +0000
@@ -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")
diff -r 281221a55883 -r 04f264af405b external/gpl3/gcc/dist/gcc/config/vax/vax.c
--- a/external/gpl3/gcc/dist/gcc/config/vax/vax.c Wed Aug 20 13:46:17 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/vax/vax.c Wed Aug 20 13:49:28 2014 +0000
@@ -1117,6 +1117,7 @@
case IOR:
case XOR:
case NOT:
+ case CTZ:
case MEM:
case REG:
cc_status.flags = CC_NO_OVERFLOW;
diff -r 281221a55883 -r 04f264af405b lib/libc/compiler_rt/Makefile.inc
--- a/lib/libc/compiler_rt/Makefile.inc Wed Aug 20 13:46:17 2014 +0000
+++ b/lib/libc/compiler_rt/Makefile.inc Wed Aug 20 13:49:28 2014 +0000
@@ -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 @@
# 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 \
diff -r 281221a55883 -r 04f264af405b libexec/ld.elf_so/arch/vax/rtld_start.S
--- a/libexec/ld.elf_so/arch/vax/rtld_start.S Wed Aug 20 13:46:17 2014 +0000
+++ b/libexec/ld.elf_so/arch/vax/rtld_start.S Wed Aug 20 13:49:28 2014 +0000
@@ -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 <matt%3am-software.com@localhost>
@@ -152,7 +152,7 @@
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 */
Home |
Main Index |
Thread Index |
Old Index