From patchwork Tue Jan 23 09:38:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Indu Bhagat X-Patchwork-Id: 190805 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp221105dyi; Tue, 23 Jan 2024 01:41:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1ZZZMk3pGbSfckorXLMCA/gbQ5eAa+2/beGOt5VPIyCGE1CP4v0NStyk0liAM4I5P6FSB X-Received: by 2002:a05:6214:76e:b0:681:88ea:3699 with SMTP id f14-20020a056214076e00b0068188ea3699mr516856qvz.90.1706002890092; Tue, 23 Jan 2024 01:41:30 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1706002890; cv=pass; d=google.com; s=arc-20160816; b=oVonqH5iJyR0RuqqwstxD/H1KjXzFJ2HpmCzwvHRdCsPZi6OOtyJ7fYuE2YJYOYvhD Yao1qYvhchHfuHGmi3V2TN+YiozVYDfPsKerOWa8Bd4VfloULHzAp5qN6NoDSWBeiTM/ 7oSmhlGFXQ2rbNLv0Y5OxSN8LaY2kusqgBCeanWEO9Q/5TzFjQyEI5UF8e76u1sVYjkW Q2UnPlzKHnmoTS++JXG+RToOjOITFykbM2nwXQiocc5bUHFkVCb6IWmBVHRLSejioi29 4lADzeHzsCfCJ2KifwaDglSo94i4l8CHiqOKI0I4rZ61SktZrzA/oSVG+9Hxd/LQl7XH tYDA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=RSKYW1pYog8EyQQpsY7gcYYeXe25FtgVvTYeXsVfPoI=; fh=Oh0rwXgL2pcS1FQHr6E1Hal1K7kVHmZXDthN47bNt4Q=; b=HwMm2Lke83XHCoahju64gJB+EQzq/gnlMHZHOF12Gr5Ooz+4qjfq8UZDnL2RE+cWID sUBoqVTfpJCRTQ7DUCjiXwyuyC4UD9qOOjWmBLSu6XthnmbPorjCWDyfe9iPGpmMuwlE f/XTIlojTPFB7dPXMt9Do4AIecL25I4w/mLqQiJUrI2aNMiwWoAgTUlKAznDn/4ur9Ca X5fgBBxpUUpeQgoHMIuXUB/S65g1K4MFaHwdRUAklKcNKUSJUXilLY+pyCDg0f3jVCzo eSggQAVm/J5gvEThkt29tIF7l1wBeOqBEWNnX1syyA47kers9vYUQ7A/fLOz9x8v15nT GJbQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=hjbOTk7f; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WsxgrcNy; arc=pass (i=2); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v2-20020a0cdd82000000b0068199887fdbsi7652995qvk.125.2024.01.23.01.41.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 01:41:30 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=hjbOTk7f; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WsxgrcNy; arc=pass (i=2); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C59DF3857730 for ; Tue, 23 Jan 2024 09:41:29 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 667453857B9C for ; Tue, 23 Jan 2024 09:39:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 667453857B9C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 667453857B9C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706002751; cv=pass; b=TZe721S63+vudfynxkKGY0goDFXKNUsLcy47pVrRVLUVg+UhEaKj6WmobxoR2K6bBTh8mvKq2ZJqZUOzuZNbuAcYTqAfktO7M0LefviiYHEKUd/lQHZ0DcQITwHTbWjylczNhUf8VBOnUzBBA9f9YiW4Iv/XLbZ67tauvpxlD40= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706002751; c=relaxed/simple; bh=YkiBAVmA14tYeMP9xMlmO6w2ihbSuk8C2W1mTSkjj9s=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=ll7b49OO72ldHVD3552PXOeyIMbuVI+s14w2B7Xf51sslkgZJ4J7TyECS2arX0yNBT9Npzkj8VEnnhMyxNfrMPAWKd38uoqPHM6IbC9fLFqEHzzFXOVjUoWoUKunaMe7uEVSHvudzbKCyxgUqgblcGsSUI1GEXxzEGNKbO8Nm6Q= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40N6ZIe2008700 for ; Tue, 23 Jan 2024 09:39:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=RSKYW1pYog8EyQQpsY7gcYYeXe25FtgVvTYeXsVfPoI=; b=hjbOTk7fu30FPOov4duKBR4OgtAgHh/SQLBiOSmcp406VDkSlUnSRQ05m/8xJmNtIerp YWp9fQ9/ybRiVFtx+xttv6jZ40q0VEYviP1v9dDG8640HYNqOghlpzk0UFDXdHyEC/v4 9PtHNo7QX5mILApGkDFEvOX85sq0sex2LvYbWlzunWW/k8PJAGmxRk8BGRAxdfJq+dEu 4YuLMdZfkPpaVcz7XrAW/YqtBkzbg2zLmPr88r7hUzs0EyEu5pb5Lra94BKrQwfb5AhG PGCbDuhsByEIXU6WTfdHXQ6sYihDvnm+N95NyWjQ5W/gUD7tlPOOpUCCUgjVrIOWeJOu TA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vr79ndv1k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 23 Jan 2024 09:39:07 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 40N80iq1033464 for ; Tue, 23 Jan 2024 09:38:59 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3vs3710u9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 23 Jan 2024 09:38:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=REyLkPapsB6TIxfbBzjmy0Cr84Hlv47pYyOdFF6uEKo6peqdPCvX1nfxAluIXDpR1saoDxcYSCn53+wq9qNmqnCPNbIVwukTOFKWXuUvUSa/qEsRJQPXyZlfQ2+LLLHyOvGJlOavC7kItnKiOwiyzEripjU2n9IodjLQefunL0B/MIMXYecn8adWq/1V0x0ByX7nMY0SHzUBXvZuFfc2s/qq5a0oi2NExtMuRRiVMweO10Z3FZTb1+q16RDayR6kW+vMFKFzscpALKMKacn6t2/07k+2OJLPvS01Z2sQOXq+rNXb34XwBukL8eSHROB8AJS0E+V0lstNzkU0q3Uapg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RSKYW1pYog8EyQQpsY7gcYYeXe25FtgVvTYeXsVfPoI=; b=Zro8AAK+OMWTJviSDAXZK6lEogZNH4dTvEjXd1pshHxJtJhxcvtr4dS6F3XqUmyaUhFhxiXhkBbXgR+SXkdRxuCvvTdGgh6cE52NS7TGXl01NfAuIC7eyzo/sc5hLP/f7LWVSbo+T3V3mj6PF5eytXB7G9TU/W0KuNEx+uZoQposncL8VygDV43gRUQXQbGSNjdluyYM0tsAVjuFvpxGQvyyYdD8Wuk5iwMhTFEuhzfnlasPuA+T36JJtng4PHznQVAP7eiv6K7+JkIgxedT0NdciNZ7SGYqaPXDe3o8lIjZZItVsBqMW1Dlba7NulDtXjWP3UVtTG3ZrMj+Rr9KRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RSKYW1pYog8EyQQpsY7gcYYeXe25FtgVvTYeXsVfPoI=; b=WsxgrcNyHhZCHrJxvMTJHstEVCFj1+bfnJ4y87aWnVw++/sdzKEBOvdC0dGlfc19DMpwJByEy0WAbYsTQOdMw4KTz8P3tDehrOftUsMTt5XA/1SaaZDz0oagPswMM5epKBCOqUOZdgdRUUPf4AFxKWmfs8oDi1TGPU+V8bjgGQI= Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by SN7PR10MB6548.namprd10.prod.outlook.com (2603:10b6:806:2ab::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.34; Tue, 23 Jan 2024 09:38:57 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::fde7:fb92:8ea1:a5ac]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::fde7:fb92:8ea1:a5ac%4]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 09:38:57 +0000 From: Indu Bhagat To: binutils@sourceware.org Cc: Indu Bhagat Subject: [PATCH] gas: x86: ginsn: adjust ginsns for certain lea ops Date: Tue, 23 Jan 2024 01:38:55 -0800 Message-ID: <20240123093855.3617792-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: MW4PR04CA0310.namprd04.prod.outlook.com (2603:10b6:303:82::15) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|SN7PR10MB6548:EE_ X-MS-Office365-Filtering-Correlation-Id: 2cbba440-2b55-4807-9355-08dc1bf71f3e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZeIKB5Rv74yjBX9iBDIuKLDo7mDuu854l45pIz5yr/e8KEmb4xlAjJi41WSIJMT+6uVL1/V/+mNa4aKqPEtrwtYpk7NdheIHInVHxsBfTmWKMRCBCYCGwMeqtEAdCmXXnbzLiOCItH5RvqnutO08ecubdMuP8StGC88pUEudGqv9xukdxQYod9qCeRzbXfDkKKz7UYriIg16yMQalhqLXa5UBHDB/Qj43fLThxn4nbTeWjq6PoPhnJ97h4PceInYb/ZuPtX2TxOPV83KE+yTlYmF5+ERrBDe1ltVfdc6gWQjf64h9eTQzcYViFPDnB1b/ibTRIDOEQe4gS29baIk70bhGjRjVkxKFS77+9hFAE1FYe+/kZR+c7TlBNWh+8BiMjc8Y228/Rz6G64dzPeWAB/9uyPGhCMsFZR9V3HiZWzF37eezWVeDo52QHTvVmq2FCHrZc43lYPcPRk3Tu3K2/euQwNdGzxWolf7MnbLaDxuxYRWrLWapnrDitiKBmX2RvVIOZUury54T6qcQWCOerc7hiE1UlM8Z4FDKCWF9h0HQaHYDBIxtYFqyfxnUVkn X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(346002)(39860400002)(366004)(376002)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(86362001)(38100700002)(36756003)(2616005)(1076003)(83380400001)(107886003)(6506007)(6486002)(6512007)(66946007)(8676002)(6916009)(66556008)(66476007)(478600001)(44832011)(5660300002)(4326008)(2906002)(316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V6BfkhyUrlisGH6T+t0iePtmEbjXSAku0bhA9Qp4a/vyG3WPQyyDmNEI1a1V1TSBKMHtfgRNbcOJ8VAg01ZtZyG7NT8enPFLYP8gorPcOiTzRc6/7TdgaYST0JQs9OmgtD/+PbHb7np31t18aG332A/+APvNULg3GVc+kbfVtnionhWnPrK4PG0BtDAkwLL66K+mx36hSlKbWv9rH2Dl3NQSchcBZl28EXMFtSW7akEzWej2vM1DS8cJLwu6cgdMXBcKXErrjzcs8s6NepHFB0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2cbba440-2b55-4807-9355-08dc1bf71f3e X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 09:38:57.5711 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z3qCOUGKpckk7EjeQloT3nAusHBMxgpvSESKwSYNHP0UI2hC2qcyo0VKsvlMwMfLgq6H1wy7SzqjJn9brRb/aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6548 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-23_04,2024-01-23_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=822 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401230069 X-Proofpoint-GUID: lk7CWiZbQ4Zuj4JDvjAr58QeoD1O8Dsf X-Proofpoint-ORIG-GUID: lk7CWiZbQ4Zuj4JDvjAr58QeoD1O8Dsf X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788873686388020757 X-GMAIL-MSGID: 1788873686388020757 A review comment on the SCFI V4 series was to handle ginsn creation for certain lea opcodes more precisely. Specifically, we should preferably handle the following two cases of lea opcodes similarly: - #1 lea with "index register and scale factor of 1, but no base register", - #2 lea with "no index register, but base register present". Currently, a ginsn of type GINSN_TYPE_OTHER is generated for the case of #1 above. For #2, however, the lea insn is translated to either a GINSN_TYPE_ADD or GINSN_TYPE_MOV depending on whether the immediate for displacement is non-zero or not respectively. Change the handling in x86_ginsn_lea so that both of the above lea manifestations are handled similarly. gas/ * gas/config/tc-i386.c (x86_ginsn_lea): Handle selected lea with no base register similar to the case of no index register. gas/testsuite/ * gas/scfi/x86_64/ginsn-lea-1.l: New test. * gas/scfi/x86_64/ginsn-lea-1.s: Likewise. * gas/scfi/x86_64/scfi-x86-64.exp: Add new test. --- gas/config/tc-i386.c | 88 ++++++++++--------- gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.l | 32 +++++++ gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.s | 13 +++ gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp | 1 + 4 files changed, 93 insertions(+), 41 deletions(-) create mode 100644 gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.l create mode 100644 gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.s diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 51166ef3f02..7810e1de40d 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5666,6 +5666,8 @@ x86_ginsn_lea (const symbolS *insn_end_sym) ginsnS *ginsn = NULL; unsigned int base_reg; unsigned int index_reg; + unsigned int src1_reg; + const reg_entry *src1; offsetT index_scale; unsigned int dst_reg; @@ -5678,47 +5680,7 @@ x86_ginsn_lea (const symbolS *insn_end_sym) GINSN_SRC_IMM, 0xf /* arbitrary const. */, 0, GINSN_DST_REG, dst_reg, 0); } - else if (i.base_reg && !i.index_reg) - { - /* lea -0x2(%base),%dst. */ - base_reg = ginsn_dw2_regnum (i.base_reg); - dst_reg = ginsn_dw2_regnum (i.op[1].regs); - - if (i.disp_operands) - src_disp = i.op[0].disps->X_add_number; - - if (src_disp) - /* Generate an ADD ginsn. */ - ginsn = ginsn_new_add (insn_end_sym, true, - GINSN_SRC_REG, base_reg, 0, - GINSN_SRC_IMM, 0, src_disp, - GINSN_DST_REG, dst_reg, 0); - else - /* Generate a MOV ginsn. */ - ginsn = ginsn_new_mov (insn_end_sym, true, - GINSN_SRC_REG, base_reg, 0, - GINSN_DST_REG, dst_reg, 0); - } - else if (!i.base_reg && i.index_reg) - { - /* lea (,%index,imm), %dst. */ - /* TBD_GINSN_INFO_LOSS - There is no explicit ginsn multiply operation, - instead use GINSN_TYPE_OTHER. Also, note that info about displacement - is not carried forward either. But this is fine because - GINSN_TYPE_OTHER will cause SCFI pass to bail out any which way if - dest reg is interesting. */ - index_scale = i.log2_scale_factor; - index_reg = ginsn_dw2_regnum (i.index_reg); - dst_reg = ginsn_dw2_regnum (i.op[1].regs); - ginsn = ginsn_new_other (insn_end_sym, true, - GINSN_SRC_REG, index_reg, - GINSN_SRC_IMM, index_scale, - GINSN_DST_REG, dst_reg); - /* FIXME - It seems to make sense to represent a scale factor of 1 - correctly here (i.e. not as "other", but rather similar to the - base-without- index case above)? */ - } - else + else if (i.index_reg && i.base_reg) { /* lea disp(%base,%index,imm) %dst. */ /* TBD_GINSN_INFO_LOSS - Skip adding information about the disp and imm @@ -5732,6 +5694,50 @@ x86_ginsn_lea (const symbolS *insn_end_sym) GINSN_SRC_REG, index_reg, GINSN_DST_REG, dst_reg); } + else + { + /* lea disp(%base) %dst or lea disp(,%index,imm) %dst. */ + gas_assert ((i.base_reg && !i.index_reg) + || (!i.base_reg && i.index_reg)); + + index_scale = i.log2_scale_factor; + src1 = (i.base_reg) ? i.base_reg : i.index_reg; + src1_reg = ginsn_dw2_regnum (src1); + dst_reg = ginsn_dw2_regnum (i.op[1].regs); + /* It makes sense to represent a scale factor of 1 correctly here + (i.e., not using GINSN_TYPE_OTHER, but rather similar to the + base-without-index case). */ + if (!index_scale) + { + if (i.disp_operands) + src_disp = i.op[0].disps->X_add_number; + + if (src_disp) + /* Generate an ADD ginsn. */ + ginsn = ginsn_new_add (insn_end_sym, true, + GINSN_SRC_REG, src1_reg, 0, + GINSN_SRC_IMM, 0, src_disp, + GINSN_DST_REG, dst_reg, 0); + else + /* Generate a MOV ginsn. */ + ginsn = ginsn_new_mov (insn_end_sym, true, + GINSN_SRC_REG, src1_reg, 0, + GINSN_DST_REG, dst_reg, 0); + } + /* TBD_GINSN_INFO_LOSS - There is no explicit ginsn multiply operation, + instead use GINSN_TYPE_OTHER. Also, note that info about displacement + is not carried forward either. But this is fine because + GINSN_TYPE_OTHER will cause SCFI pass to bail out any which way if + dest reg is interesting. */ + else + { + gas_assert (i.index_reg); + ginsn = ginsn_new_other (insn_end_sym, true, + GINSN_SRC_REG, src1_reg, + GINSN_SRC_IMM, index_scale, + GINSN_DST_REG, dst_reg); + } + } ginsn_set_where (ginsn); diff --git a/gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.l b/gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.l new file mode 100644 index 00000000000..f4629f37fe1 --- /dev/null +++ b/gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.l @@ -0,0 +1,32 @@ +GAS LISTING .* + + + 1 ## Testcase with a variety of lea. + 2 .text + 3 .globl foo + 4 .type foo, @function + 4 ginsn: SYM FUNC_BEGIN + 5 foo: + 5 ginsn: SYM foo + 6 0000 488D05FE lea -0x2\(%rip\), %rax + 6 FFFFFF + 6 ginsn: ADD %r4, -2, %r0 + 7 0007 678D4C18 lea -0x1\(%eax,%ebx\), %ecx + 7 FF + 7 ginsn: OTH %r0, %r3, %r2 + 8 000c 678D4C58 lea 0x55\(%eax,%ebx,2\), %ecx + 8 55 + 8 ginsn: OTH %r0, %r3, %r2 + 9 0011 678D0C1D lea -0x3\(,%ebx,1\), %ecx + 9 FDFFFFFF + 9 ginsn: ADD %r3, -3, %r2 + 10 0019 678D0C1D lea -0x3\(,%ebx,\), %ecx + 10 FDFFFFFF + 10 ginsn: ADD %r3, -3, %r2 + 11 0021 678D0C5D lea -0x3\(,%ebx,2\), %ecx + 11 FDFFFFFF + 11 ginsn: OTH %r3, 1, %r2 + 12 .LFE0: + 12 ginsn: SYM .LFE0 + 13 .size foo, .-foo + 13 ginsn: SYM FUNC_END diff --git a/gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.s b/gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.s new file mode 100644 index 00000000000..1861d069f39 --- /dev/null +++ b/gas/testsuite/gas/scfi/x86_64/ginsn-lea-1.s @@ -0,0 +1,13 @@ +## Testcase with a variety of lea. + .text + .globl foo + .type foo, @function +foo: + lea -0x2(%rip), %rax + lea -0x1(%eax,%ebx), %ecx + lea 0x55(%eax,%ebx,2), %ecx + lea -0x3(,%ebx,1), %ecx + lea -0x3(,%ebx,), %ecx + lea -0x3(,%ebx,2), %ecx +.LFE0: + .size foo, .-foo diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp b/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp index 2b291800b65..d32cb290d92 100644 --- a/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp +++ b/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp @@ -26,6 +26,7 @@ if { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then { run_list_test "ginsn-dw2-regnum-1" "--scfi=experimental -ali" run_list_test "ginsn-add-1" "--scfi=experimental -ali" + run_list_test "ginsn-lea-1" "--scfi=experimental -ali" run_list_test "ginsn-pop-1" "--scfi=experimental -ali" run_list_test "ginsn-push-1" "--scfi=experimental -ali"