Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src Pull up following revision(s) (requested by abs in ticket...
details: https://anonhg.NetBSD.org/src/rev/e5e6c1971da0
branches: netbsd-6
changeset: 774354:e5e6c1971da0
user: martin <martin%NetBSD.org@localhost>
date: Wed Jul 25 15:09:33 2012 +0000
description:
Pull up following revision(s) (requested by abs in ticket #446):
gnu/dist/gcc4/gcc/config/vax/vax.md: revision 1.16
external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.6
distrib/vax/ramdisk/Makefile: revision 1.27
gnu/dist/gcc4/gcc/config/vax/builtins.md: revision 1.4
external/gpl3/binutils/dist/bfd/elf32-vax.c: revision 1.6
sys/arch/vax/conf/INSTALL: revision 1.59
Two fixes. Better PLT pruning (don't emit PLTs for local functions).
If emitting a reloc against a readonly section in a shared image,
cause TEXTREL to be set.
Warn about using a symbol as a displacement in PIC mode.
Fix ffssi2 again.
Use a UNSPEC for the internal ffs.
use (match_dup 1) since Z will be set if it is 0 just as if tst:SI was done.
This can let gcc produce better code if you code appropriately.
Bump the ramdisk size so that the contents fits again.
diffstat:
distrib/vax/ramdisk/Makefile | 4 +-
external/gpl3/binutils/dist/bfd/elf32-vax.c | 51 ++++++++----------------
external/gpl3/binutils/dist/gas/config/tc-vax.c | 10 ++++-
gnu/dist/gcc4/gcc/config/vax/builtins.md | 14 ++++-
gnu/dist/gcc4/gcc/config/vax/vax.md | 2 +
sys/arch/vax/conf/INSTALL | 4 +-
6 files changed, 42 insertions(+), 43 deletions(-)
diffs (180 lines):
diff -r 4b877f7e4ec1 -r e5e6c1971da0 distrib/vax/ramdisk/Makefile
--- a/distrib/vax/ramdisk/Makefile Wed Jul 25 09:04:37 2012 +0000
+++ b/distrib/vax/ramdisk/Makefile Wed Jul 25 15:09:33 2012 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.26.8.2 2012/07/05 18:22:49 riz Exp $
+# $NetBSD: Makefile,v 1.26.8.3 2012/07/25 15:09:34 martin Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
IMAGE= ramdisk.fs
-IMAGESIZE= 1536k
+IMAGESIZE= 1664k
MAKEFS_FLAGS= -f 15
WARNS= 1
diff -r 4b877f7e4ec1 -r e5e6c1971da0 external/gpl3/binutils/dist/bfd/elf32-vax.c
--- a/external/gpl3/binutils/dist/bfd/elf32-vax.c Wed Jul 25 09:04:37 2012 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf32-vax.c Wed Jul 25 15:09:33 2012 +0000
@@ -973,39 +973,21 @@
if (h->type == STT_FUNC
|| h->needs_plt)
{
- if (! info->shared
- && !h->def_dynamic
- && !h->ref_dynamic
- /* We must always create the plt entry if it was referenced
- by a PLTxxO relocation. In this case we already recorded
- it as a dynamic symbol. */
- && h->dynindx == -1)
+ if (h->plt.refcount == 0
+ || SYMBOL_CALLS_LOCAL (info, 0)
+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak))
{
/* This case can occur if we saw a PLTxx reloc in an input
file, but the symbol was never referred to by a dynamic
- object. In such a case, we don't actually need to build
- a procedure linkage table, and we can just do a PCxx
- reloc instead. */
- BFD_ASSERT (h->needs_plt);
+ object, or if all references were garbage collected.. In
+ such a case, we don't actually need to build a procedure
+ linkage table, and we can just do a PCxx reloc instead. */
h->plt.offset = (bfd_vma) -1;
+ h->needs_plt = 0;
return TRUE;
}
- /* GC may have rendered this entry unused. */
- if (h->plt.refcount <= 0)
- {
- h->needs_plt = 0;
- h->plt.offset = (bfd_vma) -1;
- return TRUE;
- }
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
s = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (s != NULL);
@@ -1751,14 +1733,15 @@
}
}
- if (strcmp (bfd_get_section_name (input_bfd, input_section),
- ".text") == 0 ||
- (info->shared
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_32
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT))
+ if (input_section->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
+
+ if (input_section->flags & SEC_READONLY
+ || (ELF32_R_TYPE(outrel.r_info) != R_VAX_32
+ && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
+ && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY
+ && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT
+ && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT))
{
if (h != NULL)
(*_bfd_error_handler)
diff -r 4b877f7e4ec1 -r e5e6c1971da0 external/gpl3/binutils/dist/gas/config/tc-vax.c
--- a/external/gpl3/binutils/dist/gas/config/tc-vax.c Wed Jul 25 09:04:37 2012 +0000
+++ b/external/gpl3/binutils/dist/gas/config/tc-vax.c Wed Jul 25 15:09:33 2012 +0000
@@ -3301,7 +3301,7 @@
if (flag_want_pic && operandP->vop_mode == 8
&& this_add_symbol != NULL)
{
- as_warn (_("Symbol %s used as immediate operand in PIC mode."),
+ as_warn (_("Symbol '%s' used as immediate operand in PIC mode."),
S_GET_NAME (this_add_symbol));
}
#endif
@@ -3377,7 +3377,15 @@
length = 4;
}
}
+#ifdef OBJ_ELF
+ if (flag_want_pic && this_add_symbol != NULL)
+ {
+ as_warn (_("Symbol '%s' used as displacement in PIC mode."),
+ S_GET_NAME (this_add_symbol));
+ }
+#endif
p = frag_more (1 + length);
+ know (operandP->vop_reg != 0xf);
know (operandP->vop_reg >= 0);
p[0] = operandP->vop_reg
| ((at | "?\12\14?\16"[length]) << 4);
diff -r 4b877f7e4ec1 -r e5e6c1971da0 gnu/dist/gcc4/gcc/config/vax/builtins.md
--- a/gnu/dist/gcc4/gcc/config/vax/builtins.md Wed Jul 25 09:04:37 2012 +0000
+++ b/gnu/dist/gcc4/gcc/config/vax/builtins.md Wed Jul 25 15:09:33 2012 +0000
@@ -25,7 +25,7 @@
"
{
rtx label = gen_label_rtx ();
- emit_insn (gen_ffssi2_internal (operands[0], operands[1], operands[1]));
+ emit_insn (gen_unspec_ffssi2 (operands[0], operands[1]));
emit_jump_insn (gen_bne (label));
emit_insn (gen_negsi2 (operands[0], const1_rtx));
emit_label (label);
@@ -33,9 +33,15 @@
DONE;
}")
-(define_insn "ffssi2_internal"
+;;
+;; Set cc0 to match argument 1 since if it is 0, Z will be set just as
+;; if a tst:SI was performed. If we did a match_dup 0, that wouldn't be
+;; right since 0 will be set to (0+32) [the position (relative to the base)
+;; of a bit one position to the left of the specified field].
+;;
+(define_insn "unspec_ffssi2"
[(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (ffs:SI (match_operand:SI 1 "general_operand" "nrQ")))
- (set (cc0) (ffs:SI (match_operand:SI 2 "general_operand" "1")))]
+ (unspec:SI [(match_operand:SI 1 "general_operand" "nrQ")] VUNSPEC_FFS))
+ (set (cc0) (match_dup 1))]
""
"ffs $0,$32,%1,%0")
diff -r 4b877f7e4ec1 -r e5e6c1971da0 gnu/dist/gcc4/gcc/config/vax/vax.md
--- a/gnu/dist/gcc4/gcc/config/vax/vax.md Wed Jul 25 09:04:37 2012 +0000
+++ b/gnu/dist/gcc4/gcc/config/vax/vax.md Wed Jul 25 15:09:33 2012 +0000
@@ -34,6 +34,8 @@
[(VUNSPEC_BLOCKAGE 0) ; `blockage' insn to prevent scheduling across an
; insn in the code.
(VUNSPEC_SYNC_ISTREAM 1) ; sequence of insns to sync the I-stream
+ (VUNSPEC_FFS 2) ; internal FFS for the expand
+ (VUNSPEC_FFC 3) ; internal FFC for the expand
(VAX_AP_REGNUM 12) ; Register 12 contains the argument pointer
(VAX_FP_REGNUM 13) ; Register 13 contains the frame pointer
(VAX_SP_REGNUM 14) ; Register 14 contains the stack pointer
diff -r 4b877f7e4ec1 -r e5e6c1971da0 sys/arch/vax/conf/INSTALL
--- a/sys/arch/vax/conf/INSTALL Wed Jul 25 09:04:37 2012 +0000
+++ b/sys/arch/vax/conf/INSTALL Wed Jul 25 15:09:33 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.58.2.2 2012/07/05 18:22:49 riz Exp $
+# $NetBSD: INSTALL,v 1.58.2.3 2012/07/25 15:09:34 martin Exp $
#
# INSTALL kernel; all supported devices but nothing fancy.
#
@@ -33,7 +33,7 @@
options MEMORY_DISK_HOOKS
options MEMORY_DISK_IS_ROOT # force root on memory disk
options MEMORY_DISK_SERVER=0 # no userspace memory disk support
-options MEMORY_DISK_ROOT_SIZE=3072 # size of memory disk, in blocks
+options MEMORY_DISK_ROOT_SIZE=3328 # size of memory disk, in blocks
options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode
# Kernel compiled-in symbolic debugger & system call tracer
Home |
Main Index |
Thread Index |
Old Index