From patchwork Mon Feb 26 06:33:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 206274 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1899728dyb; Sun, 25 Feb 2024 22:34:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU5kOvmn9+wBhtSat64sDizHG87ujsZYIYkynFKVUzti93ukNq+5aum7kF4toa7u7Zc7nTvri7sSnGBRJuKU4yjV9bn3w== X-Google-Smtp-Source: AGHT+IGoODNGc51A+cS7WhbO1Hfqsy8rsoYMCtIc4rH942h+NAyrUepAAsNVcS1LFSTskl0zQQFm X-Received: by 2002:a05:622a:2a8e:b0:42e:6ee7:95d2 with SMTP id kf14-20020a05622a2a8e00b0042e6ee795d2mr8235944qtb.22.1708929258134; Sun, 25 Feb 2024 22:34:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708929258; cv=pass; d=google.com; s=arc-20160816; b=lg/d5vC14cVhZmGcWmz683vU6tt6kh9O/0FOIC9inXAjdmT0ne+xsv1tNjD8sY3dSz qMJ7DswBmch1Yp8j9i6PtzfNG0e9aQoPtAj2sDua2vdPFevnmEKstPpz4aY6toQ32SLI hex2ySS+CgmkIolVZXYvuS2mulO5Y/mWOoizpVJ2Ibc/kQdFhAHZVFlnYKv5jL5VHsSy YYQMX7qJouyNsjka+tVrib5dZC3CGArjiMSaDQCHPN/MNcZNKct+pZrZcMiDXBxGXuSS fbKYnK/b/JoXTnR7zAKtMHnXtsA3lDip/mRIFNW2IjLIgm7PO/uvUzFS2fgPKNt6suON CfEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=E+Kcxvv3X5gGE3HK6RlHfxnBaIV/sK9Qm92kibKa3dY=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=g44iBD+Ubc+JlkaY8hmlC1YZ4F/nLtnHuAt39w5U0j8aRnUfwd28ZrS3RTI/8ZW+t5 cqbwckFtViAcAOv/RlYriZiXfoL/RCQZ/dF9BRvjU47J8V0yfu8Hn5laTz7F86YcFMTU aHUuqGMYGmDfJ+RIdPwzwyhhw1LdQtNWLUheAJREusLamVDucmcVDRJqeAbVlCWIfuSO 6YJfIqEIQZW1znKkLcFonm7FZeiznfj/Y4fj+3vppQmY9eMzhftMJ4FMbGYAwF7fTphU wngc8tMaUIGw885J6GzNIeulMPE0uScQeWvXPUnVQYIZtzpJpN77z2Rb1lEbM5pOkYWk DB6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=blagzYWS; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id o23-20020ac86997000000b0042e7aaa9a6fsi3286713qtq.331.2024.02.25.22.34.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 22:34:18 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=blagzYWS; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D2CAD3858C32 for ; Mon, 26 Feb 2024 06:34:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DD2E13858D3C for ; Mon, 26 Feb 2024 06:33:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD2E13858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DD2E13858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708929215; cv=none; b=cN6d9wx+dVlZViBGS/axgeRcl4yR6MdzW95olVqEZjLjeKbnpRGTTC3xl40wBmqyq5tJD61c8ymcpSXKalLElLK4G+V/TJ90clVczTrobn+OYSmQ633/ZZPFkF31TVF8RCi0YsnFaGdCNJOikqD4i3X2nKGCPPqATLDhs+mikg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708929215; c=relaxed/simple; bh=d0j6lbqYzOaNvytWJIb87cPBF2CpoQ288/dQN/C+SqI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=jSU+6dzmGL7lgQ8Zl2YTrL8caIQmYh3v1J+KwZpyQbXLMAIKbnjhtdlZrUqQBWXiQ1QpIXeoxGoBWmwefj0BXHAbWYZQ7sJkb2vdSOg0AxIJCpn9jBS8blxb949Jle010w82UzO/wDdtKnA808TBsL+q1DzpeSOzSCEHsb7qPFY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708929213; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=E+Kcxvv3X5gGE3HK6RlHfxnBaIV/sK9Qm92kibKa3dY=; b=blagzYWSyKVCD+8VuJ6rj49WgaC1Yp4XYGgTUFcqP25G9zSAx1LlSWC56NnTT7VAYrWege 4GFmNznhMX7iOs43/BxeirNDqIfIlg1xz+fdrW+bX5AxJYoA6NChbA/KdaxCOlTs3e0m9r Uvd1xsuaqe0qYEhat+SsRT35ofLpQIs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-64-Qgpev6VIMuKwAXowpFaqLA-1; Mon, 26 Feb 2024 01:33:31 -0500 X-MC-Unique: Qgpev6VIMuKwAXowpFaqLA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 796A685A58A for ; Mon, 26 Feb 2024 06:33:31 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3CCDE492BC7 for ; Mon, 26 Feb 2024 06:33:31 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 41Q6XSQM1346627 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Mon, 26 Feb 2024 07:33:29 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 41Q6XSZN1346626 for gcc-patches@gcc.gnu.org; Mon, 26 Feb 2024 07:33:28 +0100 Date: Mon, 26 Feb 2024 07:33:28 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] i386: Fix up x86_function_profiler -masm=intel support [PR114094] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791942206008026404 X-GMAIL-MSGID: 1791942206008026404 Hi! In my r14-8214 changes I apparently forgot one \n at the end of an instruction. The corresponding AT&T line looks like: "1:\tcall\t*%s@GOTPCREL(%%rip)\n" but the Intel variant was "1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]" Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2024-02-26 Jakub Jelinek PR target/114094 * config/i386/i386.cc (x86_function_profiler): Add missing new-line to printed instruction. * gcc.target/i386/pr114094.c: New test. Jakub --- gcc/config/i386/i386.cc.jj 2024-02-22 10:10:18.675032283 +0100 +++ gcc/config/i386/i386.cc 2024-02-25 13:12:12.403323842 +0100 @@ -22909,7 +22909,7 @@ x86_function_profiler (FILE *file, int l if (!ix86_direct_extern_access) { if (ASSEMBLER_DIALECT == ASM_INTEL) - fprintf (file, "1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]", + fprintf (file, "1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]\n", mcount_name); else fprintf (file, "1:\tcall\t*%s@GOTPCREL(%%rip)\n", --- gcc/testsuite/gcc.target/i386/pr114094.c.jj 2024-02-25 22:36:24.673320296 +0100 +++ gcc/testsuite/gcc.target/i386/pr114094.c 2024-02-25 22:17:18.254178208 +0100 @@ -0,0 +1,10 @@ +/* PR target/114094 */ +/* { dg-do assemble { target *-*-linux* } } */ +/* { dg-require-effective-target masm_intel } */ +/* { dg-require-effective-target pie } */ +/* { dg-options "-fpie -fprofile -mno-direct-extern-access -masm=intel" } */ + +void +foo (void) +{ +}