From patchwork Tue Oct 19 09:16:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 46380 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ABAF33858027 for ; Tue, 19 Oct 2021 09:17:09 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 692183858D39 for ; Tue, 19 Oct 2021 09:16:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 692183858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 622C31FC9E for ; Tue, 19 Oct 2021 09:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634635012; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XI8yBMeIVN8O6nJYBNsQY2Q8Ru7PYJzQEaTC8o7HtXI=; b=KRf0RDWQ5SbB7N/NZX7tPds+3Rykr5YD5KAuBbACmtgs1wicD/5838mwN4gomXMPVZL7CD x4ABY7RHF5xGhywjrR/pJl3WTdRHXSacgi3y/1p31dqvtkhgItBpK8yxSwecUPconowIju aZSdIsY/FfYg+2/tAm6z5YdPa76sgF8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634635012; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XI8yBMeIVN8O6nJYBNsQY2Q8Ru7PYJzQEaTC8o7HtXI=; b=y+xOzzVxiHnjKJ9u0zfy9aojEW7xSpFJY4BV350TLhpSaOSvvBWRNaNOPQ7ClAZo3CDL80 gpo+ajVD/nfRK2Bw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 53AAC13FE1 for ; Tue, 19 Oct 2021 09:16:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0JA4EwSNbmHoJgAAMHmgww (envelope-from ) for ; Tue, 19 Oct 2021 09:16:52 +0000 Message-ID: <8dd8a6ab-24ca-9c59-1b3b-5fdca48896fa@suse.cz> Date: Tue, 19 Oct 2021 11:16:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH][aarch64] target: Support whitespaces in target attr/pragma. To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hello. The patch does the same as g:df592811f950301ed3b10a08e476dad0f2eff26a for aarch64. Tested locally with cross compiler. Ready for master? Thanks, Martin PR target/102375 gcc/ChangeLog: * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Strip whitespaces. gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr102375.c: New test. --- gcc/config/aarch64/aarch64.c | 1 + gcc/testsuite/gcc.target/aarch64/pr102375.c | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/pr102375.c diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 76d99d247ae..4c3e491ab14 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -17624,6 +17624,7 @@ aarch64_process_one_target_attr (char *arg_str) bool invert = false; size_t len = strlen (arg_str); + arg_str = strip_whitespaces (arg_str, &len); if (len == 0) { diff --git a/gcc/testsuite/gcc.target/aarch64/pr102375.c b/gcc/testsuite/gcc.target/aarch64/pr102375.c new file mode 100644 index 00000000000..fa75d319b2d --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr102375.c @@ -0,0 +1,4 @@ +/* PR target/102375 */ +/* { dg-do compile } */ + +void calculate(void) __attribute__ ((target ("+sve, +sve2")));