From patchwork Thu Nov 30 07:50:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jose E. Marchesi" X-Patchwork-Id: 171760 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp218028vqy; Wed, 29 Nov 2023 23:50:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFh5t87Z4P3uxflGwLFQcJmmSeivgvyYb0Vfs/vHot7sZXBiZ8A9lTST1rfs0Xh2wnOlT58 X-Received: by 2002:a05:6102:502:b0:464:393e:cea9 with SMTP id l2-20020a056102050200b00464393ecea9mr7710963vsa.19.1701330646196; Wed, 29 Nov 2023 23:50:46 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1701330646; cv=pass; d=google.com; s=arc-20160816; b=oNRmP/6J/zC7ckdFsY6Lig4lTAxVLvqeXRXVqA1u1fu3d8tntUnjVAvNbaL1OYIZED CzkPC48JsxGRtizQI10c8xRmXcenVFNE3hQY/6vhWlbGo175J7ZDYZhu7J1tTIb3G9NI ynSULks/DiqxhuePyopgqCjVToGzKBYC0AUm3ISoR209uDeTbebsyFJcU0jJl6JAoCp9 Bs2/VM6wkloC+ackAWR5qTCJZ7+gfwyL5SggPou2cas9auV4ubabR4ID7QhtI/cS/t5i IcuJqi9X6WAtOmFtSDrzuwaeQHwi8z5jBKxHAOFKP8za5PYHeaQphtlacO5VBQ3t4Xqi U80g== 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:to:from :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=2t7X766I6sf2gCFxqoEIuuda5PFJ7lmeNFsEpuLFaNQ=; fh=NLxAvL/bDfPg4AGOtxqvQlND8vazkZrNzKLY8+LAbBY=; b=B7xk9jtGwKeR+WyGUPkJofV52HsCZzRHB9fhyiiYKqHTQK1l5x3+4sP46UpS2qkKds xJwIh/73twjOAobwWlDYyAnjyGLH5GTzxWxL1ccxOB+UsGWDuZs/1pnvY/kgbV1qoZ8j JH1g5Db88xzEksKb1YarQRui+Ftu1PeYWl7PCIoYKQM/o63upV8bDCHSCjqhnlUrODqu Zwkuc7c4Fp2f1TOkA8az0b+GoivB06gQ9cklV2w0OUUkJFq8lNONEGfEAPPWrK1t9Qxq vLG2kFNwttpbdKb2WJpoQqc1MOYDTW/icrgb3Q4TCmbGuAqEBhabwHAJT6AZKct+3yuH bbfA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=FUJjbWmT; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eghuyvXd; arc=pass (i=2); 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=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f9-20020ac84649000000b0042394141f18si530995qto.731.2023.11.29.23.50.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:50:46 -0800 (PST) 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=@oracle.com header.s=corp-2023-11-20 header.b=FUJjbWmT; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eghuyvXd; arc=pass (i=2); 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=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EBFC338582B2 for ; Thu, 30 Nov 2023 07:50:45 +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 8C7D33858C56 for ; Thu, 30 Nov 2023 07:50:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C7D33858C56 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 8C7D33858C56 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=1701330640; cv=pass; b=Gx1RQRRLPr10zv69OufJm3ZN3xy7K9k5gfrLoqh2SINJhaqDuJN3sAySvL+N6CVooLSM1VbFm2TEFbFwBEeF2zwjSPezF/UtrHeIiZItqma67hMPbxZnyy1OgKkqWDJGIDDsBKmZMzyW3e9I7yKP88Po9kxVVn+mQQJEd027Of8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701330640; c=relaxed/simple; bh=f94GfP4uXvqWAZfGLYJyQTyYFONUqHWDtniAKTy9rwU=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=GxTdRHU+LSWnoozESnCYqZp7pCBa+RP82amlnYnbUxgsI35AuKf/KaqgQ/SSeWTAFeIfumQWp6gU8QX/sB97ppwDHzfhtah37kH2WBQy8FSJfA6KCvriz2zESYYcSwGgnF7wYwO7+tljPH4P2aGzZPt/g0DTNzPp33frFCit24k= 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 3AU5Kj7G024997 for ; Thu, 30 Nov 2023 07:50:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=2t7X766I6sf2gCFxqoEIuuda5PFJ7lmeNFsEpuLFaNQ=; b=FUJjbWmToTS7SkxY3XhOMP0cJZpyrEoqc/8taIgviN7ZTYCYRZeX2XZ70UHkasa7qXEh I/SJdxZrRhCRJ7c2FUQ2JvUopyS5jjy9VOaVJEi3CR2hCJTHAB01rbpQ1EOLtU9I5iZL OPZz+j4VYcU7Zx0o61M/8qYCIBgja2BffBKDBgM6iRHT3GqUexor0zAhqwW+9pR9Pk8e 5EXf6MAiOu5ULjiXuvH4OLvX6AZGCz2fCZ8ykK7Wz7pZS5hAFRXSA1uKL+QvbztoW8wQ 6lb1sSu5EDoaiyS3ZuGINWnyUGoIl6LEWkhmS77Q871OjcYq6/FVIkAzIJbE9pk4dOmT Lg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uk7h2tnth-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 30 Nov 2023 07:50:37 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AU7XXuF001469 for ; Thu, 30 Nov 2023 07:50:36 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2040.outbound.protection.outlook.com [104.47.56.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uk7cg6upd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 30 Nov 2023 07:50:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kEdxIBgeEWb2ITHndMslx5pF7FHL4gCyTgjSE9gHjo1+OmLTgjddxvmXdu/B8F6Pdu/gZGCAPBugJauquUQqMtEVDKH9hu5K/uEG3hbpWhILJABP8bg4JfjE+62x6+oCq2b0u4dc216+ZROc0rjQW+DqvIa9s2tm8J7t/WpX0rkA7x58XYWo37GbqN8S8SAUzR8BJVkp2PT4ml458xHmPBRLI1aFiPCa3YdAeXW1MfN94rPnK3YD6lTUOIb0MfEaN/MUiMAf1UKtDLTF2gXQKJuJd2tr961YLeDWLq8NZI0AYPVQbMLImq9PA7UhK1peSNfIjDJWiGe4CjGyLKs0/Q== 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=2t7X766I6sf2gCFxqoEIuuda5PFJ7lmeNFsEpuLFaNQ=; b=MxSnLYoIH+vljh49S+LmimIs5FE8sHyAKn1SnyDlg9lqzwLjh8igGjjV8xRGoShv9SS9X04X3QQfKiX8DpwGy0E/JGE4Ug7euTCmxdXcTk4IPbfr1ip0rl60/k9AI2neBVU5gYeXPre5y8zP+0s3qQjgZo0Z+4qU+KSYCbyG5GlpfsiD8dVv9sOnnvFVTZi4w4UV92xRDKyeTywqDcqyskJCjODPI55l+7cnv+ddlGnjk+IjUViifp7lRiPJJXwQrbYAHtI9ii5MWROzJgh8u7Zl7fXvVbHbWpJnPlnfPCgkRNAGBd8tGe8hCdBK0ZwTBeAFCrhKk3attNYZvP35Vg== 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=2t7X766I6sf2gCFxqoEIuuda5PFJ7lmeNFsEpuLFaNQ=; b=eghuyvXd/m+lV/DD/WRagrICoQUWgobNHh9vhnFZpmyM3gJxdE2GetVULuP3JqjkH00Why29NgILZOGBVzCGDfDlkHMvVOEZlHDQPFSKghd7ucqP/dePy9f7NUsLUFdPHfgP0/RrEQiHEv1v1+Ks6qsiqKIihE3iWxpTx3hG8bM= Received: from BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) by LV3PR10MB7772.namprd10.prod.outlook.com (2603:10b6:408:1b4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.24; Thu, 30 Nov 2023 07:50:33 +0000 Received: from BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::ba16:f585:1052:a61c]) by BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::ba16:f585:1052:a61c%5]) with mapi id 15.20.7046.015; Thu, 30 Nov 2023 07:50:33 +0000 From: "Jose E. Marchesi" To: binutils@sourceware.org Subject: [COMMITTED] gas: support double-slash line comments in BPF assembly Date: Thu, 30 Nov 2023 08:50:28 +0100 Message-Id: <20231130075028.18699-1-jose.marchesi@oracle.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: LO4P265CA0189.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:311::15) To BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB2888:EE_|LV3PR10MB7772:EE_ X-MS-Office365-Filtering-Correlation-Id: 1aa6647d-4e31-4a1d-d809-08dbf179080d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xYiYQGP+O817IcGPAvoVJ65D5cTmaX+kl72jffPWfm+tVloZiyIK9oRH/R+VJWSOGt0Z27PJUSoccMdQ7zPWK3WY+ZWx6cdtK5l8S/StlKXxN4XyfIc0K6+h598DrQdbIGo+/qAaBom5CIHv5M2GIAYpurttPLp/njK0FJEocdt1bkzLuxb1LHXMIe9WPR3UewP5IGENnxR9ArjAIVfNW4hnRpt91fOsCIujPkeWhkPV7OZjw7U38Td6UaRa5cs4Utan25bQuGx1ypeKcTonroDUleVTt563eyAZnfFVIRnaKp5nYLzCzW1mRQm+bpTxXxexIAbpmtN0V82VfTnumLD97NA1pbJcxM6k7WdIABKWQFYVksQVNdNYCSF8KRc4CXHgR1wCVrEUrb6OLPYoCVag28uRXmopKUH6dek3q4jMdcV7gs1buYeT0YG/LFpgv3ZDoVSbQK181cBNsbt53+LvTb7uCq5P2sBPwXD5ep5LSCVfyiPWTBfKG8GwJFE6dTaQvvozo5p474Fab4efYN75bsDbtBSJrd6DR5So0noaYk0rYq1PO1HrEm7aSmgLABe2xZHy3jXgHtKs/ZM63qgE9KZpXH5en84z6tTgC+lPjYXjQb/JMcDP3hoJlylZ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2888.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(39860400002)(396003)(136003)(346002)(376002)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(66556008)(66476007)(6916009)(316002)(66946007)(8936002)(8676002)(478600001)(6486002)(36756003)(86362001)(5660300002)(2906002)(41300700001)(4001150100001)(38100700002)(2616005)(26005)(1076003)(6506007)(6512007)(83380400001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ymaHuVFJNdPzsmg8uFPUAuf0T9MSKyt3wKbdVGH57foBvPP6f9fG1KTC0mPV1TCtmh3739vCFArWAFV7RZv14AFiERiWSn7kwAz5xtNDhPzn3HUitDQdEAVSkYOSKONTICYUxm5bpK7ihtZtQf9R5hXefOHnWQ75dPSXRAnLARba/J6wdl2uLpXi3LBS8r6rTDeW00KBAwSSOLSfthdozkEMHPpcbYP/qiCRtAOgY/O01hlhrKvCTZ4dqCvaWXOm5nUyXeS1cR2zJTXPJg3Mxb4/H6EhFwq5IjjNFHkg+OhpgMwV4dPsKFX0kh0QTmPGikNc19mJexFyz7S85cO89tIuhWe9ocLvUIvPhwzokn1TWw5cS2cn1djv7PKZIRuwJ/zsK6gLK2zNNB8I2FWVTOnG+GE3vg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1aa6647d-4e31-4a1d-d809-08dbf179080d X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2888.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2023 07:50:33.4655 (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: YruNayFSz5abG3HGAjQCVsno4FYFR/8JX9NHQLpz9D5Orrg7cs5zWL4rbZjNbz7uGMAA/14Yom8kjGYM/Q9XDC5Y6EMEpnAaAjxz9gUCoec= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7772 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-30_06,2023-11-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311300057 X-Proofpoint-GUID: gmlMVN3HRBuNcbLys6shnypZgo2fb9Fm X-Proofpoint-ORIG-GUID: gmlMVN3HRBuNcbLys6shnypZgo2fb9Fm 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_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: 1783974483478691392 X-GMAIL-MSGID: 1783974483478691392 This patch makes the BPF assembler to support double-slash line comments, like the llvm BPF assembler does. At this point both assemblers support the same commenting styles: - Line comments preceded by # or //. - Non-nestable block comments delimited by /* and */. This patch also adds a couple of tests to make sure all the comment styles work in both normal and pseudoc syntax. The manual is also updated to mention double-slash line comments. --- gas/ChangeLog | 11 +++++++++++ gas/NEWS | 3 +++ gas/config/tc-bpf.h | 3 +++ gas/doc/c-bpf.texi | 4 ++-- gas/testsuite/gas/bpf/bpf.exp | 4 ++++ gas/testsuite/gas/bpf/comments-pseudoc.d | 12 ++++++++++++ gas/testsuite/gas/bpf/comments-pseudoc.s | 5 +++++ gas/testsuite/gas/bpf/comments.d | 12 ++++++++++++ gas/testsuite/gas/bpf/comments.s | 5 +++++ 9 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/bpf/comments-pseudoc.d create mode 100644 gas/testsuite/gas/bpf/comments-pseudoc.s create mode 100644 gas/testsuite/gas/bpf/comments.d create mode 100644 gas/testsuite/gas/bpf/comments.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 3d5cfcae58c..b1a568cc334 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,14 @@ +2023-11-30 Jose E. Marchesi + + * config/tc-bpf.h (DOUBLESLASH_LINE_COMMENTS): Define. + * testsuite/gas/bpf/comments.s: New file. + * testsuite/gas/bpf/comments.d: Likewise. + * testsuite/gas/bpf/comments-pseudoc.d: Likewise. + * testsuite/gas/bpf/comments-pseudoc.s: Likewise. + * testsuite/gas/bpf/bpf.exp: Run comments and comments-pseudoc. + * doc/c-bpf.texi (BPF Special Characters): Document // comments. + * NEWS: Update. + 2023-11-28 Jose E. Marchesi * NEWS: Add entry about change of comment syntax in the BPF diff --git a/gas/NEWS b/gas/NEWS index 6bfab08c5b8..143d9c836e5 100644 --- a/gas/NEWS +++ b/gas/NEWS @@ -41,6 +41,9 @@ therefore they cannot longer be used to begin line comments. This matches the behavior of the clang/LLVM BPF assembler. +* The BPF assembler now allows using both hash (#) and double slash (//) to + begin line comments. + Changes in 2.41: * Add support for the KVX instruction set. diff --git a/gas/config/tc-bpf.h b/gas/config/tc-bpf.h index 06096ef5926..91f3c1574b1 100644 --- a/gas/config/tc-bpf.h +++ b/gas/config/tc-bpf.h @@ -35,6 +35,9 @@ #define TARGET_BYTES_BIG_ENDIAN 0 #endif +/* Permit // comments. */ +#define DOUBLESLASH_LINE_COMMENTS 1 + /* .-foo gets turned into PC relative relocs. */ #define DIFF_EXPR_OK 1 diff --git a/gas/doc/c-bpf.texi b/gas/doc/c-bpf.texi index 7ff07e91764..307d28be942 100644 --- a/gas/doc/c-bpf.texi +++ b/gas/doc/c-bpf.texi @@ -68,8 +68,8 @@ the host endianness is used. @cindex line comment character, BPF @cindex BPF line comment character -The presence of a @samp{#} on a line indicates the start of a comment -that extends to the end of the current line. +The presence of a @samp{#} or @samp{//} anywhere on a line indicates +the start of a comment that extends to the end of the line. @cindex block comments, BPF @cindex BPF block comments diff --git a/gas/testsuite/gas/bpf/bpf.exp b/gas/testsuite/gas/bpf/bpf.exp index 5bcd8c483a0..5048693cec8 100644 --- a/gas/testsuite/gas/bpf/bpf.exp +++ b/gas/testsuite/gas/bpf/bpf.exp @@ -18,6 +18,10 @@ # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. if {[istarget bpf*-*-*]} { + # Misc tests. + run_dump_test comments + run_dump_test comments-pseudoc + # Little-endian BPF tests run_dump_test call run_dump_test exit diff --git a/gas/testsuite/gas/bpf/comments-pseudoc.d b/gas/testsuite/gas/bpf/comments-pseudoc.d new file mode 100644 index 00000000000..6fc68e01e86 --- /dev/null +++ b/gas/testsuite/gas/bpf/comments-pseudoc.d @@ -0,0 +1,12 @@ +#as: -EL -mdialect=pseudoc +#objdump: -dr -M hex +#name: BPF assembler comments - pseudoc + +.*: +file format .*bpf.* + +Disassembly of section .text: + +[0-9a-f]+ <.*>: + 0: 07 02 00 00 9a 02 00 00 add %r2,0x29a + 8: 07 03 00 00 66 fd ff ff add %r3,0xfffffd66 + 10: 07 04 00 00 ef be ad 7e add %r4,0x7eadbeef diff --git a/gas/testsuite/gas/bpf/comments-pseudoc.s b/gas/testsuite/gas/bpf/comments-pseudoc.s new file mode 100644 index 00000000000..e64c46c2e6f --- /dev/null +++ b/gas/testsuite/gas/bpf/comments-pseudoc.s @@ -0,0 +1,5 @@ +# This is a comment + r2 += 666 # This is also a comment + r3 += -666 /* So is +this */ + r4 += 0x7eadbeef // And this diff --git a/gas/testsuite/gas/bpf/comments.d b/gas/testsuite/gas/bpf/comments.d new file mode 100644 index 00000000000..49711a3f07a --- /dev/null +++ b/gas/testsuite/gas/bpf/comments.d @@ -0,0 +1,12 @@ +#as: -EL -mdialect=normal +#objdump: -dr -M hex +#name: BPF assembler comments + +.*: +file format .*bpf.* + +Disassembly of section .text: + +[0-9a-f]+ <.*>: + 0: 07 02 00 00 9a 02 00 00 add %r2,0x29a + 8: 07 03 00 00 66 fd ff ff add %r3,0xfffffd66 + 10: 07 04 00 00 ef be ad 7e add %r4,0x7eadbeef diff --git a/gas/testsuite/gas/bpf/comments.s b/gas/testsuite/gas/bpf/comments.s new file mode 100644 index 00000000000..d06fb4f9e54 --- /dev/null +++ b/gas/testsuite/gas/bpf/comments.s @@ -0,0 +1,5 @@ +# This is a comment + add %r2, 666 # This is also a comment + add %r3, -666 /* So is +this */ + add %r4, 0x7eadbeef // And this