From patchwork Tue Oct 23 09:43:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Shawcroft X-Patchwork-Id: 193411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id ECA642C00F3 for ; Tue, 23 Oct 2012 20:45:35 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351590336; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=YmYWd/Er/UD/yOrxI5kNITTrBq4=; b=M5Ep66rusxAbUjv czGv0VY44u1ahh1+PDUnxZ+Uke/WkRfdMJ6n7lUUppYGdHSqMGpyoZ65xZzMhWRo iiF5CYRjr/Zsw8TidJXkRBrkMrXmtQnaQ8R4GTUUf4mQiD+f3Zx1Ih+ZdqB4n/rY Vo1hUGwoLNeHYNL5fHKFRabH8NtU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:X-MC-Unique:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rq5rlBd2dwD9/XWD9GoMiBc1YH7kxpMHsGkM1bS4zfvWfDpGuNWhdzw3UgfEHO q1PQh7xv766JgvvvHaXrYXlHpiMyq2rxYByeKci7HL7lUvXB3pC5NsezEReMdR0s kqKjNLBKgL9NU5/5vljuXCZ8Bjw6X8Dxg/Ihxhq4ykuv4=; Received: (qmail 9610 invoked by alias); 23 Oct 2012 09:43:15 -0000 Received: (qmail 9532 invoked by uid 22791); 23 Oct 2012 09:43:13 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_CX X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Oct 2012 09:43:05 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 23 Oct 2012 10:43:03 +0100 Received: from [10.1.72.50] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Oct 2012 10:43:03 +0100 Message-ID: <508666A7.2000005@arm.com> Date: Tue, 23 Oct 2012 10:43:03 +0100 From: Marcus Shawcroft User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [PATCH] [10/10] AArch64 Port References: <50865E58.4020507@arm.com> <50865F45.2030707@arm.com> <50865F98.8020403@arm.com> <50865FF6.4040301@arm.com> <5086603D.8080003@arm.com> <5086604F.8060700@arm.com> <5086605C.3020502@arm.com> <50866077.5040300@arm.com> <50866080.7040807@arm.com> In-Reply-To: <50866080.7040807@arm.com> X-MC-Unique: 112102310430314401 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch provides the AArch64 libstdc++-v3 port, it contains both the required configury adjustment to config.host and the new file introduced by the AArch64 port. Proposed ChangeLog: * config/cpu/aarch64/cxxabi_tweaks.h: New file. * configure.host: Enable aarch64. diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host index ed9e72109d41774c179190d9546b53d0dd4feef1..af5d3ffbff48eb82dd85ef55c290a3e5d2be9f89 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -99,6 +99,9 @@ error_constants_dir="os/generic" # variants into the established source config/cpu/* sub-directories. # THIS TABLE IS SORTED. KEEP IT THAT WAY. case "${host_cpu}" in + aarch64*) + try_cpu=aarch64 + ;; alpha*) try_cpu=alpha ;; diff --git a/libstdc++-v3/config/cpu/aarch64/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/aarch64/cxxabi_tweaks.h index ...31a423f4fd56bffaead1d1f2b0057cdb80cda1fb 100644 --- a/libstdc++-v3/config/cpu/aarch64/cxxabi_tweaks.h +++ b/libstdc++-v3/config/cpu/aarch64/cxxabi_tweaks.h @@ -0,0 +1,60 @@ +// Control various target specific ABI tweaks. AArch64 version. + +// Copyright (C) 2004, 2006, 2008, 2009, 2011, 2012 +// Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + +/** @file cxxabi_tweaks.h + * The header provides an CPU-variable interface to the C++ ABI. + */ + +#ifndef _CXXABI_TWEAKS_H +#define _CXXABI_TWEAKS_H 1 + +#ifdef __cplusplus +namespace __cxxabiv1 +{ + extern "C" + { +#endif + + // The AArch64 ABI uses the least significant bit of a 64-bit + // guard variable. +#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0) +#define _GLIBCXX_GUARD_SET(x) *(x) = 1 +#define _GLIBCXX_GUARD_BIT 1 +#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1) +#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1) + __extension__ typedef int __guard __attribute__((mode (__DI__))); + + // __cxa_vec_ctor has void return type. + typedef void __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return + // Constructors and destructors do not return a value. + typedef void __cxa_cdtor_return_type; + +#ifdef __cplusplus + } +} // namespace __cxxabiv1 +#endif + +#endif