From owner-svn-src-user@FreeBSD.ORG Tue Mar 2 23:49:28 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41536106564A; Tue, 2 Mar 2010 23:49:28 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 308EC8FC15; Tue, 2 Mar 2010 23:49:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o22NnSx7079770; Tue, 2 Mar 2010 23:49:28 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o22NnS80079768; Tue, 2 Mar 2010 23:49:28 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003022349.o22NnS80079768@svn.freebsd.org> From: Juli Mallett Date: Tue, 2 Mar 2010 23:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204609 - user/jmallett/octeon/contrib/gcc/config/mips X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 23:49:28 -0000 Author: jmallett Date: Tue Mar 2 23:49:27 2010 New Revision: 204609 URL: http://svn.freebsd.org/changeset/base/204609 Log: Whoops. Actually merge JC's ABI-related changes. Add ISA checks that are required with Warner's new asm.h. Modified: user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h Modified: user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h ============================================================================== --- user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h Tue Mar 2 22:25:50 2010 (r204608) +++ user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h Tue Mar 2 23:49:27 2010 (r204609) @@ -130,29 +130,101 @@ Boston, MA 02110-1301, USA. */ if (TARGET_MIPS16) \ builtin_define ("__mips16"); \ \ + if (mips_abi == ABI_N32) \ + { \ + builtin_define ("__mips_n32"); \ + builtin_define ("_ABIN32=2"); \ + builtin_define ("_MIPS_SIM=_ABIN32"); \ + builtin_define ("_MIPS_SZLONG=32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + else if (mips_abi == ABI_64) \ + { \ + builtin_define ("__mips_n64"); \ + builtin_define ("_ABI64=3"); \ + builtin_define ("_MIPS_SIM=_ABI64"); \ + builtin_define ("_MIPS_SZLONG=64"); \ + builtin_define ("_MIPS_SZPTR=64"); \ + } \ + else if (mips_abi == ABI_O64) \ + { \ + builtin_define ("__mips_o64"); \ + builtin_define ("_ABIO64=4"); \ + builtin_define ("_MIPS_SIM=_ABIO64"); \ + builtin_define ("_MIPS_SZLONG=64"); \ + builtin_define ("_MIPS_SZPTR=64"); \ + } \ + else if (mips_abi == ABI_EABI) \ + { \ + builtin_define ("__mips_eabi"); \ + builtin_define ("_ABIEMB=5"); \ + builtin_define ("_MIPS_SIM=_ABIEMB"); \ + if (TARGET_LONG64) \ + builtin_define ("_MIPS_SZLONG=64"); \ + else \ + builtin_define ("_MIPS_SZLONG=32"); \ + if (TARGET_64BIT) \ + builtin_define ("_MIPS_SZPTR=64"); \ + else \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + else \ + { \ + builtin_define ("__mips_o32"); \ + builtin_define ("_ABIO32=1"); \ + builtin_define ("_MIPS_SIM=_ABIO32"); \ + builtin_define ("_MIPS_SZLONG=32"); \ + builtin_define ("_MIPS_SZPTR=32"); \ + } \ + if (TARGET_FLOAT64) \ + builtin_define ("_MIPS_FPSET=32"); \ + else \ + builtin_define ("_MIPS_FPSET=16"); \ + \ + builtin_define ("_MIPS_SZINT=32"); \ + \ MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \ MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \ \ - if (ISA_MIPS3) \ - builtin_define ("__mips=3"); \ + if (ISA_MIPS1) \ + { \ + builtin_define ("__mips=1"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS1"); \ + } \ + else if (ISA_MIPS2) \ + { \ + builtin_define ("__mips=2"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS2"); \ + } \ + else if (ISA_MIPS3) \ + { \ + builtin_define ("__mips=3"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS3"); \ + } \ else if (ISA_MIPS4) \ - builtin_define ("__mips=4"); \ + { \ + builtin_define ("__mips=4"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS4"); \ + } \ else if (ISA_MIPS32) \ { \ builtin_define ("__mips=32"); \ builtin_define ("__mips_isa_rev=1"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32"); \ } \ else if (ISA_MIPS32R2) \ { \ builtin_define ("__mips=32"); \ builtin_define ("__mips_isa_rev=2"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS32"); \ } \ else if (ISA_MIPS64) \ { \ builtin_define ("__mips=64"); \ builtin_define ("__mips_isa_rev=1"); \ + builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64"); \ } \ - \ + \ if (TARGET_HARD_FLOAT) \ builtin_define ("__mips_hard_float"); \ else if (TARGET_SOFT_FLOAT) \ @@ -167,25 +239,6 @@ Boston, MA 02110-1301, USA. */ builtin_define ("__MIPSEL__"); \ \ /* No language dialect defines. */ \ - \ - if (mips_abi == ABI_EABI) \ - builtin_define ("__mips_eabi"); \ - else if (mips_abi == ABI_N32) { \ - builtin_define ("_ABIN32=2"); \ - builtin_define ("_MIPS_SIM=_ABIN32"); \ - builtin_define ("__mips_n32"); \ - } else if (mips_abi == ABI_64) { \ - builtin_define ("_ABI64=3"); \ - builtin_define ("_MIPS_SIM=_ABI64"); \ - builtin_define ("__mips_n64"); \ - } else if (mips_abi == ABI_O64) \ - builtin_define ("__mips_o64"); \ - else { \ - builtin_define ("_ABIO32=1"); \ - builtin_define ("_MIPS_SIM=_ABIO32"); \ - builtin_define ("__mips_o32"); \ - } \ - \ if (TARGET_ABICALLS) \ builtin_define ("__ABICALLS__"); \ } \ @@ -248,6 +301,5 @@ Boston, MA 02110-1301, USA. */ #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." - /************************[ Debugger stuff ]*********************************/