From owner-p4-projects@FreeBSD.ORG Sat May 24 11:08:50 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6865B37B404; Sat, 24 May 2003 11:08:49 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14BAA37B401 for ; Sat, 24 May 2003 11:08:49 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90A2D43F75 for ; Sat, 24 May 2003 11:08:48 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4OI8m0U089740 for ; Sat, 24 May 2003 11:08:48 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4OI8mZl089737 for perforce@freebsd.org; Sat, 24 May 2003 11:08:48 -0700 (PDT) Date: Sat, 24 May 2003 11:08:48 -0700 (PDT) Message-Id: <200305241808.h4OI8mZl089737@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31798 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 18:08:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=31798 Change 31798 by peter@peter_hammer on 2003/05/24 11:08:02 Go for a build-time patch instead of a source patch. This might be committable. Affected files ... .. //depot/projects/hammer/contrib/gcc/config/i386/i386.c#7 edit .. //depot/projects/hammer/gnu/usr.bin/cc/cc_int/Makefile#3 edit .. //depot/projects/hammer/gnu/usr.bin/cc/cc_int/amd64.patch#1 add Differences ... ==== //depot/projects/hammer/contrib/gcc/config/i386/i386.c#7 (text+ko) ==== @@ -6764,7 +6764,7 @@ int value, rel; { if (TARGET_64BIT) - fprintf (file, "%s%s%d-%s%d\n", + fprintf (file, "%s%s%d-.+(.-%s%d)\n", ASM_LONG, LPREFIX, value, LPREFIX, rel); else if (HAVE_AS_GOTOFF_IN_DATA) fprintf (file, "%s%s%d@GOTOFF\n", ASM_LONG, LPREFIX, value); @@ -8823,24 +8823,15 @@ Do an lea to the last part and use only one colliding move. */ else if (collisions > 1) { - rtx base; - collisions = 1; - - base = part[0][nparts - 1]; - - /* Handle the case when the last part isn't valid for lea. - Happens in 64-bit mode storing the 12-byte XFmode. */ - if (GET_MODE (base) != Pmode) - base = gen_rtx_REG (Pmode, REGNO (base)); - - emit_insn (gen_rtx_SET (VOIDmode, base, XEXP (part[1][0], 0))); - part[1][0] = replace_equiv_address (part[1][0], base); - part[1][1] = replace_equiv_address (part[1][1], - plus_constant (base, UNITS_PER_WORD)); + emit_insn (gen_rtx_SET (VOIDmode, part[0][nparts - 1], + XEXP (part[1][0], 0))); + part[1][0] = change_address (part[1][0], + TARGET_64BIT ? DImode : SImode, + part[0][nparts - 1]); + part[1][1] = adjust_address (part[1][0], VOIDmode, UNITS_PER_WORD); if (nparts == 3) - part[1][2] = replace_equiv_address (part[1][2], - plus_constant (base, 8)); + part[1][2] = adjust_address (part[1][0], VOIDmode, 8); } } ==== //depot/projects/hammer/gnu/usr.bin/cc/cc_int/Makefile#3 (text+ko) ==== @@ -23,8 +23,19 @@ toplev.c tree.c unroll.c varasm.c version.c xcoffout.c \ alias.c bitmap.c dyn-string.c \ gcse.c genrtl.c profile.c regmove.c varray.c \ - attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c \ - ${GCC_CPU}.c + attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c + +.if ${MACHINE_ARCH} != "amd64" +SRCS+= ${GCC_CPU}.c +.else +SRCS+= i386-hacked.c +CLEANFILES+= i386-hacked.c + +i386-hacked.c: ${GCCDIR}/config/i386/i386.c amd64.patch + rm -f i386-hacked.c # in case p4 readonly copied + cp ${GCCDIR}/config/i386/i386.c i386-hacked.c + patch -b .orig < ${.CURDIR}/amd64.patch +.endif SRCS+= bb-reorder.c conflict.c ggc-common.c \ ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \