From patchwork Sun Oct 30 07:44:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Indu Bhagat X-Patchwork-Id: 12956 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1686493wru; Sun, 30 Oct 2022 00:49:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Rs8XcN18TzeZLAU1uOa6uyRHgXY3xHoDj87sPzDH7Ai/0RKZwLE2wtdAMh/4nOiFrUizW X-Received: by 2002:a17:907:724c:b0:7ad:8f76:1fb8 with SMTP id ds12-20020a170907724c00b007ad8f761fb8mr7178605ejc.582.1667116176139; Sun, 30 Oct 2022 00:49:36 -0700 (PDT) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ss24-20020a170907c01800b007809c50fd78si3633201ejc.262.2022.10.30.00.49.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 00:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=BnYDd0VL; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E28F6388460F for ; Sun, 30 Oct 2022 07:47:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E28F6388460F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667116068; bh=k7JCUCyuGfU9Mo2aakmr84MsxxX/0e14U5NxJ8N93gc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BnYDd0VLYTRBOumMJEl3ZoX4++mORCWxCSAaddRCkRwbbLSpcoemSHIjGRiuOmfr8 gHT1TEfn9No6xatwLsLsJ7F1W6BsymGzj4ewA9fwq5aH73BrED/l34ucYGL7uDoyiH VCcbOqcRosnWhSWFosd3JGnlbJVPNaSAF15BbRik= 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 2A94A3857B95 for ; Sun, 30 Oct 2022 07:45:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A94A3857B95 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29TKKT3P030823 for ; Sun, 30 Oct 2022 07:45:21 GMT Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kgvqt999k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 30 Oct 2022 07:45:21 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 29U6sLfw035958 for ; Sun, 30 Oct 2022 07:45:19 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kgtm8hgge-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 30 Oct 2022 07:45:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ikqBL/d6OGUdISjdAqtA4KNZ8Tfpj7XnMN/3K9dKZyNx92ZzCQKCcIUudTphZ7R4eJUh9rXnUMepo6XjqFqfmVtEiCGlhfYY4TqNLIojOtpTkIlKhNdcl0fj2NfMeHyNEck+Hv5FcPDN9oOPr4fkpJkftam1git2G1yqv6axJddjAha4s/oW07pyk0eGIL8m8EVZi88BRcoky6+FUeRSnEDwYAObmnDFl9OUSySHgmHR1iql8h9GX1tLoRxZAIVIYk+jHo2zKCrj05ARkQeinBgXcvi73QPK5TPT/qgBlUzMhDhPFLQYc0w7B1jpkAtk/VK8LG4vICZbxoUWX+LAJg== 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=k7JCUCyuGfU9Mo2aakmr84MsxxX/0e14U5NxJ8N93gc=; b=ZiXt4OpqItXsGmk5mz8VGFxoEraox8Mn09qdkMAbe3R6OCjHoa/G/YX58cIYiD+9SzElBskwe8jDGajV3zfWKBInf97knP80BAhqZNinbjeEzTkfwM8UL7lSYfdjH3pR4gkKSf3Iq+ly50m8DdKo9z3LXloga+qvht+pxeXMJnKTg+osMOG9AAXaBMCYV1h+VcPiRizokx53OoZJCghklFFLVZ1bf4ZPzK/5buJvo2VddoFYmtaJ/Wc80sbkLRz25UYw9CHMWvt/7g37n9ZRxxiz+Q3ngCOhp3qLggE0E8aoLTmQO4PfV8l6qQUDb7ztfVK8g0iYS7aVtdf3DxSs+g== 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 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by BY5PR10MB4289.namprd10.prod.outlook.com (2603:10b6:a03:20c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.19; Sun, 30 Oct 2022 07:45:16 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::a505:15c2:a248:efa2]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::a505:15c2:a248:efa2%7]) with mapi id 15.20.5723.033; Sun, 30 Oct 2022 07:45:16 +0000 To: binutils@sourceware.org Subject: [PATCH, V3 04/15] gas: testsuite: add new tests for SFrame unwind info Date: Sun, 30 Oct 2022 00:44:39 -0700 Message-Id: <20221030074450.1956074-5-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221030074450.1956074-1-indu.bhagat@oracle.com> References: <20221030074450.1956074-1-indu.bhagat@oracle.com> X-ClientProxiedBy: MW4PR04CA0246.namprd04.prod.outlook.com (2603:10b6:303:88::11) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|BY5PR10MB4289:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d711e1b-1299-409a-4663-08daba4aafa4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lSFVh4hlrLd8tDERMWxNa0PPWZBeiwTQhWz7uOcaIRHw3K+DlJ4tnyMxwPg2SY4WaF7g9JhArRGU3YSD3xqvILq1ARA9IHAFUKuHxR/dMhZZnqFjm3RAX2/78B/hvdvl23eWuJK9x4cO2KMfAFv4DlQtxiqOAgCGBNWkQl2AXOEUxb1Rry+ayRr1C+/flqgi/yM/0zyTRtjaeMz+lHI6TPiA+HsVPIVk/iEh28boTTE+JPe+8n1ID918Xes+vsitGncy2HgajooLlyN9q8vyQZTFjdLHIUfgnsq7XHGcLoHQKTy/ZZx0BDHNKDq3rTPH6ITnkMMJJxSZbeXvAugTn76BHER5yH6vZF8xAW2oIN6eU52QlJDcZ/6mJBW4P9fLivJial3YIYpbwfutC82BVxNe0zWZR6s9R7Ek5YUInw7RWtw//eOPfIB4gSYH9n32w3AruFb5QCmWAsgfkGwA8h3a4EaMZ3N8aIyngNv8D8T5lfdWMmlZrIx8a1NeCktGdNBypRtzA5NVTyRx4D3vd/7m6pgG6j+1bIeTH6JSuTFzRqVHFNX/80xxeHx47yG4mAQaGHnZcimMEtARTMaez5Hz0eOlScO4yotgMW0ElYo/+g9ZfjkQwHYs/dZwrp3dVsU3OIJwxo9PWyaSPLf3e51mT0UDR8OUIc8s0ZS6A29QiXHgFf5IAQOmWmfBs20vuoIR1+WV6i7jDkRSsCJm9LeFBDy5GZsW0tcdJeeTo+0YHgki9sYy7hmQPCEkW1L3 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:(13230022)(396003)(366004)(39850400004)(376002)(346002)(136003)(451199015)(316002)(66556008)(4326008)(66476007)(36756003)(6916009)(66946007)(30864003)(6486002)(38100700002)(6666004)(8936002)(41300700001)(86362001)(107886003)(478600001)(5660300002)(1076003)(186003)(83380400001)(8676002)(2616005)(44832011)(2906002)(6512007)(6506007)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c5czR71gS7xM962Yvy0FwmxGFAmiXH3eQoz0rjEK2undXb2zvTl9zZvPnUSt1kQJOKGVcWL9dZIHddNRp+oxd0JvLlXmP4HLgKWYqyoiUQI5Y3657/KSUF4tPEEEi0U5N4LGSFlRYLHCVXDpPUVzYAb3fFXZGpQfluZB651AFLYwim+gPQdfl3Q/6l+OSCv8H0W2sCdAdJbPNcH+6/AhADrB/WAIjkr//RFpvcGDSTKMI7BNI/mfrISvpTYzfec90aE9yiitWlyIbfXfDU8DDkTDezfMprtlwCEVDN0iO5ZPvwBtVhkJbt/7cQ0H4AxxgFeX1xfY9X1FIwiqX6ZNErnEdGir4SuqmOdQi2qMjGhpyh/W2TqB6l8tpE/IztPicdUsgR68LsS6ofCBoB2TFvz6Iu8BFOuAK5H9+LrTkIuc4/mb4foCLSVHK+eGComI43QatQC6BeuFS0VNNm/M1fKgPLO/Ilg7l6U9iQ+WSWttYY2pZES49FHAy0IA6B7qXbc5cyTbJqagR4geUGch8Q8NFX5lCHdLq2GlFiyQYCDSrxfvLrT1MYkwW3bV0VZC6RnVzfwBjDoK9hVWyoTHfSNjXPE/0UUhIowvnX6xh+PL7CJX2CwLsC7MW4c7jtYsMwmLQ2QkC14U4qKmQ0k4gNtWKgfGW53YoW6YkFJpQv+Ns9nY9IxxiSX7uZ/4ehjcqjbBgwxwyUcUngH9R2kBcjHdJXJ7sYswPsXdEpxKH8pN4Y+VjaWdXeF+fWPMhgKjZ1SvgfsGGZEM33+kLn12JBXu9JzcV2Lgm08siayzTKEoCUs4sYY9Wzd6npJfBH5or/hF7RTGTVp5LDrKLSyyT2G1vSCUiaoGYjjuFHj2wIjbjGZAybyWeVck8G39vOLUXY9JtiGxRh7DJNql47WLRMlJuD9rR2X9Afrvd8+zr/gph+YpSvGcCSEdOBvibWzVCRMjE2JxW6f2YdmR3nxL2aVyDDIPN9bhFt9gmQ+OnuhybWQokvqdAxcCMhotYP+55pEv4U4EDceFi8JAuEEW7KYDWpYq7L9NmOUt76xfhWoBNFfTSGvD/Qh4pYw0beXsZkZ621MuuwZk+k8vU4371zvLX3m0nTUsO/OHsyEXdJy1Cmz3lSE/jmb8g6SO1EvSUQHaMjgI0D3b34V7jLxh5z5tp8h0uPiPCouPwy1Ykt7bXa+axY3oZsTiNWB6YzJCGVkXBabjE0PfCTtzfqlauGGJJ8DjrxFI/ntdh8QhFvdCMCOIMEdFBZpXCm3GbtAI6JZHa4JzpA5GHRw7qtEPLyCocgVHjd85UD1bRfFtSLOG7xFAipu7eL+s2qv1564oC+a//0iJ0UrCNxqBM84qXedf5YO4uTVQ0u3ybZmVeVLoWv/aq/xCSeIc+nu3y3t4L8oPnVKRt/9dJYQ+KZx7Cjc2gUPDslNXbxA9INjYyC+EKVFgtpiHQnz77PmO8wA+HLuLenwuhUkBnFGn0ZinGLuEC9qWEzShOwm2t9Tb8DgRVsZq+h9My+Wzy1kLTacNPIZozIoUXK5exFF+hUgIu4w9DF+kAOwEFwnFqvl/zowyNBR/TbOBGR6WJ5gQQUHwDiHEwNusOn7B6ySdSycWin7YRnniLRkYf6x6iVbhRtc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d711e1b-1299-409a-4663-08daba4aafa4 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2022 07:45:16.5346 (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: 8vEyegyurvLl/+5hGjJp7jripR9LgXceEWj+F8ml2r4ZAgHJ6h0Gki2Qe9L2tgXDCINCeTKLzokDNiGjOtQOZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4289 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-30_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 suspectscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210300049 X-Proofpoint-GUID: pjOlL1s5UyZJSWNwRDbzx8dkmrepa3mI X-Proofpoint-ORIG-GUID: pjOlL1s5UyZJSWNwRDbzx8dkmrepa3mI X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_NONE, TXREP 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.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Indu Bhagat via Binutils From: Indu Bhagat Reply-To: Indu Bhagat Cc: Indu Bhagat Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748098011649775575?= X-GMAIL-MSGID: =?utf-8?q?1748098011649775575?= [No chnages in V3] [Changes in V2] - fixed the string to match aarch64_be-*-* in cfi-sframe.exp. Prior to this, cfi-sframe testsuite was not running when --target=aarch64_be-linux-gnu - Also added new proc to check if as supports SFrame. Prior to this fix, cfi-sframe testsuite was also running when --target=aarch64_be-linux-gnu_ilp32. SFrame is not supported for this ABI/arch. [End of changes in V2] Earlier these tests were in the same commit as previous which adds the support in GNU assembler to generate .sframe section from CFI directives. Splitting this out here for ease of applying and testing. ChangeLog: * gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d: New file. * gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s: Likewise. * gas/testsuite/gas/cfi-sframe/cfi-sframe.exp: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-1.d: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-1.s: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-2.d: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-2.s: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-3.d: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-3.s: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-4.d: Likewise. * gas/testsuite/gas/cfi-sframe/common-empty-4.s: Likewise. --- .../gas/cfi-sframe/cfi-sframe-aarch64-1.d | 20 ++++ .../gas/cfi-sframe/cfi-sframe-aarch64-1.s | 61 ++++++++++++ .../gas/cfi-sframe/cfi-sframe-common-1.d | 17 ++++ .../gas/cfi-sframe/cfi-sframe-common-1.s | 3 + .../gas/cfi-sframe/cfi-sframe-common-2.d | 17 ++++ .../gas/cfi-sframe/cfi-sframe-common-2.s | 2 + .../gas/cfi-sframe/cfi-sframe-common-3.d | 17 ++++ .../gas/cfi-sframe/cfi-sframe-common-3.s | 4 + .../gas/cfi-sframe/cfi-sframe-common-4.d | 21 ++++ .../gas/cfi-sframe/cfi-sframe-common-4.s | 8 ++ .../gas/cfi-sframe/cfi-sframe-common-5.d | 21 ++++ .../gas/cfi-sframe/cfi-sframe-common-5.s | 7 ++ .../gas/cfi-sframe/cfi-sframe-common-6.d | 21 ++++ .../gas/cfi-sframe/cfi-sframe-common-6.s | 7 ++ .../gas/cfi-sframe/cfi-sframe-common-7.d | 21 ++++ .../gas/cfi-sframe/cfi-sframe-common-7.s | 7 ++ .../gas/cfi-sframe/cfi-sframe-common-8.d | 20 ++++ .../gas/cfi-sframe/cfi-sframe-common-8.s | 12 +++ .../gas/cfi-sframe/cfi-sframe-x86_64-1.d | 22 +++++ .../gas/cfi-sframe/cfi-sframe-x86_64-1.s | 30 ++++++ gas/testsuite/gas/cfi-sframe/cfi-sframe.exp | 96 +++++++++++++++++++ gas/testsuite/gas/cfi-sframe/common-empty-1.d | 14 +++ gas/testsuite/gas/cfi-sframe/common-empty-1.s | 5 + gas/testsuite/gas/cfi-sframe/common-empty-2.d | 14 +++ gas/testsuite/gas/cfi-sframe/common-empty-2.s | 8 ++ gas/testsuite/gas/cfi-sframe/common-empty-3.d | 14 +++ gas/testsuite/gas/cfi-sframe/common-empty-3.s | 9 ++ gas/testsuite/gas/cfi-sframe/common-empty-4.d | 14 +++ gas/testsuite/gas/cfi-sframe/common-empty-4.s | 17 ++++ 29 files changed, 529 insertions(+) create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe.exp create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-2.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-2.s create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-3.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-3.s create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.s diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d new file mode 100644 index 00000000000..aeefbc9cdef --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d @@ -0,0 +1,20 @@ +#as: +#objdump: --sframe=.sframe +#name: SFrame generation on aarch64 +#... +Contents of the SFrame section .sframe: + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 3 + + Function Index : + + func idx \[0\]: pc = 0x0, size = 80 bytes + STARTPC +CFA +FP +RA + + 0+0000 +sp\+0 +u +u + + 0+0004 +sp\+144 +u +u + + 0+004c +sp\+0 +u +u + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s new file mode 100644 index 00000000000..082c8a32046 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s @@ -0,0 +1,61 @@ + .cfi_sections .sframe + .cfi_startproc + stp x19, x20, [sp, -144]! + .cfi_def_cfa_offset 144 + .cfi_offset 19, -144 + .cfi_offset 20, -136 + stp x21, x22, [sp, 16] + stp x23, x24, [sp, 32] + stp x25, x26, [sp, 48] + stp x27, x28, [sp, 64] + stp d8, d9, [sp, 80] + stp d10, d11, [sp, 96] + stp d12, d13, [sp, 112] + stp d14, d15, [sp, 128] + .cfi_offset 21, -128 + .cfi_offset 22, -120 + .cfi_offset 23, -112 + .cfi_offset 24, -104 + .cfi_offset 25, -96 + .cfi_offset 26, -88 + .cfi_offset 27, -80 + .cfi_offset 28, -72 + .cfi_offset 72, -64 + .cfi_offset 73, -56 + .cfi_offset 74, -48 + .cfi_offset 75, -40 + .cfi_offset 76, -32 + .cfi_offset 77, -24 + .cfi_offset 78, -16 + .cfi_offset 79, -8 + nop + ldp x21, x22, [sp, 16] + ldp x23, x24, [sp, 32] + ldp x25, x26, [sp, 48] + ldp x27, x28, [sp, 64] + ldp d8, d9, [sp, 80] + ldp d10, d11, [sp, 96] + ldp d12, d13, [sp, 112] + ldp d14, d15, [sp, 128] + ldp x19, x20, [sp], 144 + .cfi_restore 20 + .cfi_restore 19 + .cfi_restore 78 + .cfi_restore 79 + .cfi_restore 76 + .cfi_restore 77 + .cfi_restore 74 + .cfi_restore 75 + .cfi_restore 72 + .cfi_restore 73 + .cfi_restore 27 + .cfi_restore 28 + .cfi_restore 25 + .cfi_restore 26 + .cfi_restore 23 + .cfi_restore 24 + .cfi_restore 21 + .cfi_restore 22 + .cfi_def_cfa_offset 0 + ret + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d new file mode 100644 index 00000000000..7d97383bb90 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d @@ -0,0 +1,17 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame generation using CFI directive .cfi_sections +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 1 + + Function Index : + func idx \[0\]: pc = 0x0, size = 0 bytes + STARTPC + CFA + FP + RA + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s new file mode 100644 index 00000000000..ac9c6ca2cf3 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s @@ -0,0 +1,3 @@ + .cfi_sections .sframe + .cfi_startproc + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d new file mode 100644 index 00000000000..fc7d5c440db --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d @@ -0,0 +1,17 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: Command line option for generating SFrame +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 1 + + Function Index : + func idx \[0\]: pc = 0x0, size = 0 bytes + STARTPC + CFA + FP + RA + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s new file mode 100644 index 00000000000..659b3b9d99b --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s @@ -0,0 +1,2 @@ + .cfi_startproc + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d new file mode 100644 index 00000000000..95954508e3d --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d @@ -0,0 +1,17 @@ +#as: +#objdump: --sframe=.sframe +#name: SFrame can co-exist with EH Frame +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 1 + + Function Index : + func idx \[0\]: pc = 0x0, size = 0 bytes + STARTPC + CFA + FP + RA + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s new file mode 100644 index 00000000000..36d31fe5348 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s @@ -0,0 +1,4 @@ + .cfi_sections .eh_frame + .cfi_sections .sframe + .cfi_startproc + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d new file mode 100644 index 00000000000..b835980ecbd --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d @@ -0,0 +1,21 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame cfi_def_cfa_offset test +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 3 + + Function Index : + func idx \[0\]: pc = 0x0, size = 12 bytes + STARTPC + CFA + FP + RA + +#... + 0+0004 +sp\+16 +u +u + + 0+0008 +sp\+32 +u +u + + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s new file mode 100644 index 00000000000..0d026bba71a --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s @@ -0,0 +1,8 @@ +## Testcase for cfi_def_cfa_offset + .cfi_startproc + .long 0 + .cfi_def_cfa_offset 16 + .long 0 + .cfi_def_cfa_offset 32 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d new file mode 100644 index 00000000000..d2bef7507c2 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d @@ -0,0 +1,21 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame cfi_adjust_cfa_offset test +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 3 + + Function Index : + func idx \[0\]: pc = 0x0, size = 12 bytes + STARTPC + CFA + FP + RA + +#... + 0+0004 +sp\+16 +u +u + + 0+0008 +sp\+24 +u +u + + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s new file mode 100644 index 00000000000..c985c39af9d --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s @@ -0,0 +1,7 @@ + .cfi_startproc + .long 0 + .cfi_def_cfa_offset 16 + .long 0 + .cfi_adjust_cfa_offset 8 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d new file mode 100644 index 00000000000..f915ac5f234 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d @@ -0,0 +1,21 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame cfi_offset test +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 3 + + Function Index : + func idx \[0\]: pc = 0x0, size = 12 bytes + STARTPC + CFA + FP + RA + +#... + 0+0004 +sp\+8 +u +u + + 0+0008 +sp\+8 +u +u + + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s new file mode 100644 index 00000000000..389f324dc5f --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s @@ -0,0 +1,7 @@ + .cfi_startproc + .long 0 + .cfi_def_cfa_offset 8 + .long 0 + .cfi_offset 0, 8 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d new file mode 100644 index 00000000000..cab19d5bc25 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d @@ -0,0 +1,21 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame cfi_rel_offset test +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 3 + + Function Index : + func idx \[0\]: pc = 0x0, size = 12 bytes + STARTPC + CFA + FP + RA + +#... + 0+0004 +sp\+8 +u +u + + 0+0008 +sp\+8 +u +u + + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s new file mode 100644 index 00000000000..21fa031fb30 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s @@ -0,0 +1,7 @@ + .cfi_startproc + .long 0 + .cfi_def_cfa_offset 8 + .long 0 + .cfi_rel_offset 1, 8 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d new file mode 100644 index 00000000000..c0a4a8de250 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d @@ -0,0 +1,20 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame cfi_val_offset test +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 2 + + Function Index : + func idx \[0\]: pc = 0x0, size = 8 bytes + STARTPC + CFA + FP + RA + +#... + 0+0004 +sp\+16 +u +u + + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s new file mode 100644 index 00000000000..f2083e6a106 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s @@ -0,0 +1,12 @@ +## cfi_val_offset when used with "not interesting" registers (from the +## perspective of SFrame section, non FP/RA registers are not +## interesting) does not affect the asynchronicity of the SFrame +## unwind information. Such CFI directives can be skipped for SFrame +## unwind info generation. + .cfi_startproc + .long 0 + .cfi_def_cfa_offset 16 + .cfi_val_offset 1, 8 + .cfi_val_offset 2, -32 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d new file mode 100644 index 00000000000..bba3b5920f1 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d @@ -0,0 +1,22 @@ +#as: -O0 +#objdump: --sframe=.sframe +#name: SFrame generation on x86_64 +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 1 + Num FREs: 4 + + Function Index : + + func idx \[0\]: pc = 0x0, size = 25 bytes + STARTPC +CFA +FP +RA + + 0+0000 +sp\+8 +u +u + + 0+0001 +sp\+16 +c\-16 +u + + 0+0004 +fp\+16 +c\-16 +u + + 0+0018 +sp\+8 +c\-16 +u + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s new file mode 100644 index 00000000000..77f3578f0d8 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s @@ -0,0 +1,30 @@ + .cfi_sections .sframe + .cfi_startproc + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset 6, -16 + movq %rsp, %rbp + .cfi_def_cfa_register 6 + pushq %r15 + pushq %r14 + pushq %r13 + pushq %r12 + pushq %rbx + ## These CFI opcodes are not interesting + ## for SFrame generation and will be + ## skipped. + .cfi_offset 15, -24 + .cfi_offset 14, -32 + .cfi_offset 13, -40 + .cfi_offset 12, -48 + .cfi_offset 3, -56 + nop + popq %rbx + popq %r12 + popq %r13 + popq %r14 + popq %r15 + popq %rbp + .cfi_def_cfa 7, 8 + ret + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp new file mode 100644 index 00000000000..7a8e6e10ce4 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp @@ -0,0 +1,96 @@ +# Copyright (C) 2022 Free Software Foundation, Inc. + +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +if { ![is_elf_format] } then { + return +} + +proc gas_sframe_check { } { + global check_as_sframe_result + global AS + global ASFLAGS + if [info exists check_as_sframe_result] { + return $check_as_sframe_result + } + + set as_file "tmpdir/check_as_sframe.s" + set as_fh [open $as_file w 0666] + puts $as_fh "# Generated file. DO NOT EDIT" + puts $as_fh "\t.cfi_startproc" + puts $as_fh "\t.cfi_endproc" + close $as_fh + remote_download host $as_file + verbose -log "Checking SFrame support in AS:" + + set old_ASFLAGS "$ASFLAGS" + set ASFLAGS "$ASFLAGS --gsframe" + + global comp_output + + set output_file "tmpdir/check_as_sframe.out" + set status [gas_host_run "$AS $ASFLAGS $as_file" "2>$output_file"] + set comp_output [file_contents "$output_file"] + set ASFLAGS "$old_ASFLAGS" + + if { ![string match "" $comp_output] + || [string match "*sframe not supported for target*" $comp_output] } then { + verbose -log "SFrame not supported in AS" + return 0 + } else { + verbose -log "SFrame supported in AS" + return 1 + } +} + +proc gas_x86_64_check { } { + global NM + global NMFLAGS + + set status [gas_host_run "$NM $NMFLAGS --help" ""] + return [regexp "targets:.*x86-64" [lindex $status 1]]; +} + +if { ([istarget "x86_64-*-*"] || [istarget "aarch64*-*-*"]) \ + && [gas_sframe_check] } then { + + global ASFLAGS + set old_ASFLAGS "$ASFLAGS" + + run_dump_test "cfi-sframe-common-1" + run_dump_test "cfi-sframe-common-2" + run_dump_test "cfi-sframe-common-3" + run_dump_test "cfi-sframe-common-4" + run_dump_test "cfi-sframe-common-5" + run_dump_test "cfi-sframe-common-6" + run_dump_test "cfi-sframe-common-7" + run_dump_test "cfi-sframe-common-8" + + run_dump_test "common-empty-1" + run_dump_test "common-empty-2" + run_dump_test "common-empty-3" + run_dump_test "common-empty-4" + + if { [gas_x86_64_check] } then { + set ASFLAGS "$ASFLAGS --64" + run_dump_test "cfi-sframe-x86_64-1" + set ASFLAGS "$old_ASFLAGS" + } +} + +# aarch64 specific tests +if { [istarget "aarch64*-*-*"] && [gas_sframe_check] } then { + run_dump_test "cfi-sframe-aarch64-1" +} diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-1.d b/gas/testsuite/gas/cfi-sframe/common-empty-1.d new file mode 100644 index 00000000000..0b09799826c --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-1.d @@ -0,0 +1,14 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: Uninteresting cfi directives generate an empty SFrame section +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 0 + Num FREs: 0 + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-1.s b/gas/testsuite/gas/cfi-sframe/common-empty-1.s new file mode 100644 index 00000000000..e26e998189f --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-1.s @@ -0,0 +1,5 @@ + .cfi_sections .sframe + .cfi_startproc + .cfi_remember_state + .cfi_restore_state + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-2.d b/gas/testsuite/gas/cfi-sframe/common-empty-2.d new file mode 100644 index 00000000000..e566c078249 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-2.d @@ -0,0 +1,14 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame supports only FP/SP based CFA +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 0 + Num FREs: 0 + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-2.s b/gas/testsuite/gas/cfi-sframe/common-empty-2.s new file mode 100644 index 00000000000..146c53de785 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-2.s @@ -0,0 +1,8 @@ +## CFA register is not defined to be SP/FP. +## No SFrame unwind info for this function will be generated. + .cfi_startproc simple + .long 0 + .long 0 + .cfi_adjust_cfa_offset 16 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-3.d b/gas/testsuite/gas/cfi-sframe/common-empty-3.d new file mode 100644 index 00000000000..f7a6062d392 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-3.d @@ -0,0 +1,14 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame supports only default return column +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 0 + Num FREs: 0 + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-3.s b/gas/testsuite/gas/cfi-sframe/common-empty-3.s new file mode 100644 index 00000000000..982fe0c851d --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-3.s @@ -0,0 +1,9 @@ +## The return column is not the default value. +## No SFrame unwind info for this function will be generated. + .cfi_startproc + .cfi_return_column 0 + .long 0 + .long 0 + .cfi_adjust_cfa_offset 16 + .long 0 + .cfi_endproc diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-4.d b/gas/testsuite/gas/cfi-sframe/common-empty-4.d new file mode 100644 index 00000000000..f7a6062d392 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-4.d @@ -0,0 +1,14 @@ +#as: --gsframe +#objdump: --sframe=.sframe +#name: SFrame supports only default return column +#... +Contents of the SFrame section .sframe: + + Header : + + Version: SFRAME_VERSION_1 + Flags: NONE + Num FDEs: 0 + Num FREs: 0 + +#pass diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-4.s b/gas/testsuite/gas/cfi-sframe/common-empty-4.s new file mode 100644 index 00000000000..f97ca2f7ff9 --- /dev/null +++ b/gas/testsuite/gas/cfi-sframe/common-empty-4.s @@ -0,0 +1,17 @@ +## ARMv8.3 addded support a new security feature named Pointer Authentication. The +## main idea behind this is to use the unused bits in the pointer values. +## Each pointer is patched with a PAC before writing to memory, and is verified +## before using it. +## When the pointers are mangled, the unwinder needs to know so it can mask off +## the PAC from the pointer value to recover the return address, and +## conversely, skip doing so if the pointers are not mangled. +## +## .cfi_negate_ra_state CFI directive is used to convey this information. +## +## SFrame does not have any means to represent this information at this time. + .cfi_startproc + .long 0 + .cfi_def_cfa_offset 16 + .cfi_negate_ra_state + .long 0 + .cfi_endproc