Module Name: src Committed By: martin Date: Wed Jul 25 15:09:34 UTC 2012
Modified Files: src/distrib/vax/ramdisk [netbsd-6]: Makefile src/external/gpl3/binutils/dist/bfd [netbsd-6]: elf32-vax.c src/external/gpl3/binutils/dist/gas/config [netbsd-6]: tc-vax.c src/gnu/dist/gcc4/gcc/config/vax [netbsd-6]: builtins.md vax.md src/sys/arch/vax/conf [netbsd-6]: INSTALL Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.26.8.2 -r1.26.8.3 src/distrib/vax/ramdisk/Makefile cvs rdiff -u -r1.5 -r1.5.2.1 src/external/gpl3/binutils/dist/bfd/elf32-vax.c cvs rdiff -u -r1.5 -r1.5.4.1 \ src/external/gpl3/binutils/dist/gas/config/tc-vax.c cvs rdiff -u -r1.2.40.1 -r1.2.40.2 \ src/gnu/dist/gcc4/gcc/config/vax/builtins.md cvs rdiff -u -r1.15 -r1.15.2.1 src/gnu/dist/gcc4/gcc/config/vax/vax.md cvs rdiff -u -r1.58.2.2 -r1.58.2.3 src/sys/arch/vax/conf/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/vax/ramdisk/Makefile diff -u src/distrib/vax/ramdisk/Makefile:1.26.8.2 src/distrib/vax/ramdisk/Makefile:1.26.8.3 --- src/distrib/vax/ramdisk/Makefile:1.26.8.2 Thu Jul 5 18:22:49 2012 +++ src/distrib/vax/ramdisk/Makefile Wed Jul 25 15:09:34 2012 @@ -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 Index: src/external/gpl3/binutils/dist/bfd/elf32-vax.c diff -u src/external/gpl3/binutils/dist/bfd/elf32-vax.c:1.5 src/external/gpl3/binutils/dist/bfd/elf32-vax.c:1.5.2.1 --- src/external/gpl3/binutils/dist/bfd/elf32-vax.c:1.5 Fri Feb 10 01:47:37 2012 +++ src/external/gpl3/binutils/dist/bfd/elf32-vax.c Wed Jul 25 15:09:34 2012 @@ -973,39 +973,21 @@ elf_vax_adjust_dynamic_symbol (info, h) 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; - 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 @@ elf_vax_relocate_section (bfd *output_bf } } - 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) Index: src/external/gpl3/binutils/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.5 src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.5.4.1 --- src/external/gpl3/binutils/dist/gas/config/tc-vax.c:1.5 Sun Sep 25 04:32:37 2011 +++ src/external/gpl3/binutils/dist/gas/config/tc-vax.c Wed Jul 25 15:09:33 2012 @@ -3301,7 +3301,7 @@ md_assemble (char *instruction_string) 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 @@ md_assemble (char *instruction_string) 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); Index: src/gnu/dist/gcc4/gcc/config/vax/builtins.md diff -u src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2.40.1 src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2.40.2 --- src/gnu/dist/gcc4/gcc/config/vax/builtins.md:1.2.40.1 Thu Jul 12 18:29:57 2012 +++ src/gnu/dist/gcc4/gcc/config/vax/builtins.md Wed Jul 25 15:09:33 2012 @@ -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") Index: src/gnu/dist/gcc4/gcc/config/vax/vax.md diff -u src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15 src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15.2.1 --- src/gnu/dist/gcc4/gcc/config/vax/vax.md:1.15 Sun Feb 5 17:34:34 2012 +++ src/gnu/dist/gcc4/gcc/config/vax/vax.md Wed Jul 25 15:09:33 2012 @@ -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 Index: src/sys/arch/vax/conf/INSTALL diff -u src/sys/arch/vax/conf/INSTALL:1.58.2.2 src/sys/arch/vax/conf/INSTALL:1.58.2.3 --- src/sys/arch/vax/conf/INSTALL:1.58.2.2 Thu Jul 5 18:22:49 2012 +++ src/sys/arch/vax/conf/INSTALL Wed Jul 25 15:09:34 2012 @@ -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 @@ maxusers 8 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