From patchwork Mon Nov 13 22:37:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 164658 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1516857vqg; Mon, 13 Nov 2023 14:38:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOt5EYZSA2sfYP1lzdDUrBEWGYJUZ/ujYLs6OgRP0gcTAFwWzFW765bCkTczY5QQaay24g X-Received: by 2002:a05:6214:1868:b0:66d:3f76:c626 with SMTP id eh8-20020a056214186800b0066d3f76c626mr544808qvb.11.1699915092840; Mon, 13 Nov 2023 14:38:12 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1699915092; cv=pass; d=google.com; s=arc-20160816; b=Xz8TVK2vTya05VxIg7wY5G6rUweieinxe9PxETqO4y424u9SYCZhQzC/tTvRQt3NtB iWotsdPA/aOhWozZB9AO/ym0Tp+WxcsluFJ61nhguICQREtrB6+AwUlItqCukofEFITZ sd5NquvUeENNhOjveP8A4k30502aU3j3P7jE35aJhicIBI73zYTcjK50FifSbwIyB7cO 6jDeum3bN4eJYzau+FLLqaSlRq8Trdq18A+a0IorfeomjIBEezog4F3ptON/SFFgL35f 1aun052IgEfrVjBEDNpR2vs44qAC+JvEdKK1EMAoQ0NNdm0noaZDzhLbJKBt4OPY7VMJ zYnQ== 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=Dr8nVSQaKjSOmxZc5KRuYylyNTKWhWiQARCKNX3dTtQ=; fh=GsJfh6MXvL9z/Xak3YpPLLbbsCWOcpZ+AsJKS55GU+4=; b=hdjPVqvy55GUvkLZL/uqTztnEjpacjYEb6WktLpGeaAmvHvb/G6A8nsg60hQwoZ9BT NxgL7ElG3xohRnxOu7/2ZXvbDxXwwEGnOzOXTXbAr7HsZ5Fry8Iteyz3zGbaiIzKsGZe C2EnhF2JfQlMSOjogCx0gjgk5tbMWPtUpAC5ysjzI1mZxjxy4VQioVnZdtcHGMnP58P3 j2NG+hunUPvHhG2h7kdzEloT365UGmzwg0GcRTdYV26jhf35kH6ive34qoawaLP9oIHS 5iK1FefVix2qAsKgcahcYNsUoSv/YhNaJYs11/a9RFFBrv+TAW0ZqqVEe3XkPGMjOlQg mLOA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=r+UHtvWN; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UFbcK3ag; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.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 f9-20020a05622a104900b0041eaa2159c2si5735222qte.381.2023.11.13.14.38.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 14:38:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.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-03-30 header.b=r+UHtvWN; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UFbcK3ag; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.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 9B59C38449E7 for ; Mon, 13 Nov 2023 22:38:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 642FC385697B for ; Mon, 13 Nov 2023 22:37:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 642FC385697B 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 642FC385697B 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=1699915057; cv=pass; b=DNo5knyc4DsgjKQi+Jk+IVpFlpG6ovSD+R6AsfoH05exCbsDaCgwtR5k1bRasdDnNiTdy47ZEK1vb9cpkfMNVP2bV+0+E7YkUjwgvNQMClLJwonfK0SMvJd5O7SuNISZvZBXu/rhLw0VE8IKKs50ym2IrQrrQ0nj2jVXPT3QqsQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1699915057; c=relaxed/simple; bh=2x30swRW/+tysZt+Jwo4UwD1VaSGh4RqGYZFDYYlpug=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=igjITuRtVd+vDM3cpDsurX9XHDMMxVVxI0AbiYXUkREY5cWMKQJYTVlUad+SC7E11an8+O8B/ErxGXHlpA0slV23/EjQdrbZhzlZcyD+1S9ftyIWyrPHD0jl7nxnb5tO+DR0JbyKpwCLrAgcsQQ1eQy5Aq8FVM2GiTfJdzt6zmI= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ADMTiwO015015 for ; Mon, 13 Nov 2023 22:37:34 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-03-30; bh=Dr8nVSQaKjSOmxZc5KRuYylyNTKWhWiQARCKNX3dTtQ=; b=r+UHtvWNzaqbTAp4SdyaFLTJtlTLml3SdUdiuJZiTWmPt6IXjJG97+ZuKApHRXebLlLk TpdfNo7U/NttAK62B0u+l1GDusOyCjbEsQJYKW6yZs1VfUjh2tx1tIuw9L4AGndniOXr n98HKG4e8ZqGtaxwmNntAbSOme642mnSQowoTtutblK3miGwM7OhtW5+ZnwUoXckoX2t rsEzWzMPZ2yjeA7YTHecHEwvHlSo2/Lk2uugz0XJsp372eLuy6UySE4wzTS54QE2mkb+ giYY4MU7SOFIjltOpwxS1wRQCu+NTHqjRrQnjNZEIfyAhHKnSHhXSgM7JyAHEzD9XYqI rw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2r03y5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 13 Nov 2023 22:37:34 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3ADMXmOv022776 for ; Mon, 13 Nov 2023 22:37:33 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3uaxpxb8d1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 13 Nov 2023 22:37:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dVD1srtQ3lpjifsKpC8ksLo7iBFwpcu1GGCzvfxcwejpkkYoLakScpBRr9BfoVz7K941sgm7tuNc3FV5KgCvbqZ7jgfxoKLO+AUQvixnZqURy0N3aUkDgMyrGJUK//3PbM6qGoYZAuixcq2XEb93L69Liq8QH61DSG3cGrTDghQCQ428vptWvFZ9bbIcWVQC42Lwru9qSAmjISwzPSvvRHflOIXzZ6AVhF73Oc6sOv7jSdEZasuFz5T2nn+T3auaE+77UfJ37NoAtOokgu50vnT+me5y+UGsvQQFSIAAGKFUQJSVQNF8klacaOrKH7zAlrfnPLIdA46XxT2fnEtgig== 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=Dr8nVSQaKjSOmxZc5KRuYylyNTKWhWiQARCKNX3dTtQ=; b=JcEMx5JYpUH6AO6oVb8yequZCSCkk1SPft1/XK5GlWLRGDFxUZLQYiqaNqi+GbAR84EC3F54+Hfi5XBhrcQNO4Ittd70ZXrb4KgJFeaWr5Zw66R5eAV62VnTo+D7yHg3tFrhrIu/PGV1J5yRTUfRmIMz+2z3YMU154l3jQUEq0An0AFGbFiA5fBYsIBBpnjOVW/QaZ7z5HwwQoDj53lgjyNl5whCc4hiJZxjTw5aB3wi+GcJ2JZmW1xi81Qp7Iug4OTRrUJNqTABGeOuAyhhPp37Gr2m6NCUK73XjY+jrJejByIozioAT/qNb7hvdmdF9rY8mV359npuuVNgzNPVDw== 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=Dr8nVSQaKjSOmxZc5KRuYylyNTKWhWiQARCKNX3dTtQ=; b=UFbcK3agt6cUhA4HhpKL/Ux85TekgXgv+HYKo09+o9S+2BwKhqgAbwNf+OkTfN2i7HYGVYnCGH9DM+Z5v1ezz0E9pz4PJPgGOyn45srnQp9PTa+Bael/vgSmmIgXWS1Omh4d7rpYQp2NK33JKzNbQQEgddXZ9ldMcI2Pu4hY4Nk= Received: from BN6PR1001MB2340.namprd10.prod.outlook.com (2603:10b6:405:30::36) by SJ0PR10MB6397.namprd10.prod.outlook.com (2603:10b6:a03:449::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31; Mon, 13 Nov 2023 22:37:29 +0000 Received: from BN6PR1001MB2340.namprd10.prod.outlook.com ([fe80::fec4:3a58:6118:aab2]) by BN6PR1001MB2340.namprd10.prod.outlook.com ([fe80::fec4:3a58:6118:aab2%6]) with mapi id 15.20.6977.029; Mon, 13 Nov 2023 22:37:29 +0000 From: Cupertino Miranda To: gcc-patches@gcc.gnu.org Cc: jose.marchesi@oracle.com, elena.zannoni@oracle.com, david.faust@oracle.com, Cupertino Miranda Subject: [PATCH] bpf: Forces __buildin_memcmp not to generate a call upto 1024 bytes. Date: Mon, 13 Nov 2023 22:37:23 +0000 Message-Id: <20231113223723.11760-1-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: AM0PR10CA0102.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::19) To BN6PR1001MB2340.namprd10.prod.outlook.com (2603:10b6:405:30::36) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR1001MB2340:EE_|SJ0PR10MB6397:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d02b23f-a990-4fd5-aacd-08dbe4991e31 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LA1sXdz/DuNUf2EL2yKaqZDkjwohSGAmwWyvOAcnIYkWg+ckDNvN3TLRXR/fbAE0la+Cg49nIGM5o80rB5FG4rmbZMxdAmr8a8kwSa1mWEJDzWX0jQOPbE6az8RpxGsEtVMIMm5mVaVCvo2pVOYXgmatnlhFxCDhlCZULaS4sUDXiPsBA4a8tjD5DltRbpAbRlj5Djj9NTFySCw69yBZVYuBthzx5h+sUDnPKBv/GNO7Bsr/4paIIhHhjPbrDa9E6HSw+AFwe65q4CMMFiEGgr3fQct8No16FHdpsagarI7VMmibl1vGfTCo1sYQLZ6MlvCHM5j4P0g6LahNt22PDSsLCa+64P5N7VBkJE+JhL0+6FNFHhDe2Wn+ZwbE7nvx+LhJTHSVaLFzK3wcpK0JUbW9Gzgga/2WIG+gJtJK8TyTICu09VC1GLmXGtT5Cz3bcr9e4cA2WScUqu3aSWlA9iNjk4Eeosb6C3iJ6UXGNCb3T6OMFyi4RsLH/SnWUDFy36sbv++Fa1SPzTBhYH7Yj561/nZnZ2n2/wBxZR40cWEbg4iI+iGJ2F1U5dhM47c8O7lEqoWSueri7ptJ82NbVn7be200MAbOiLQrVnrV/aM= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR1001MB2340.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(136003)(376002)(366004)(346002)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(86362001)(6486002)(478600001)(38100700002)(6666004)(5660300002)(2616005)(6512007)(1076003)(44832011)(66476007)(107886003)(6506007)(66556008)(41300700001)(66946007)(2906002)(8936002)(8676002)(4326008)(36756003)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R6pjZmSZvhVxcAXIv90YBnftXDfKqG92pkVv41IQMb4DJQrPkFoj3JV5/GGPDAHxJ7UcZEJvXm/BlRRWCJ9DHmBdwffweHPs+B1Ay4Wutoc+TD4oU5Sc1PYx4MHyC6V31e6szYkVmxUX2ajAi5AeuXZroyaE/Oyr+krBxT6Ge6YStNedOVQ5/khvGdL2CrfxCOsiqq15LLIGYiu3CdcTsRHom7WNa2kF1wbakGlokv18u8blOzVq7je7ZVM0VChQRu4ESJlOLLfDip6hJ7jkR32Kl9e7FhrpaONXb+hc4DykPRjlGmcPdRoeAcvwbvDksMUKEozECAKp+QDiWnWvhJr7bqEw4bO6mZy9F4CZ1e++v71gBa6q0srkzVR52Gs4DYNSMPbNcD0n41Bw1zIAjSFsk/7agpEhrU14ljEK1UnZMGCl9CujSdJkDnhVSVSYdqPgliWc6UxR9f4V+m3om2O3Tj2l52qKAVuX2o6+nkHfv4RriBqtBJlEB3y/YxpFOKGWWPUY6RzoiTQD8URfze28ZmyRAMUSDZ72/GiaVry/3/8WRgh1fvfSd7XX2BCML9FF1U7kRu0TXW63DYVGy+D0MjRd8sSklOjEn8KI/vOP1Gi24uvsDRt7qR/Bmarq/rcm9Epk5j5/Pj8YanMMafaQ4YcxJlDkKMOS9u0rTbMSX0JDvGNptBhZLbs3CIydvHSdR5ys9UBYGc30PIzDz4ZmKMbIhn+r86dyT91bwYuEeEmxzIjP18Q2qE0fdwR7MLkghwGaxLP+uMDOmbm11N67E1Kb4Y5xl57vQHN3eOxK6o58pZngrmU5xzJ3a0PesIMwV089K2adszqNj4BS7kt3Iwm62qGo73WWGNKI7sqkxUgF+uSHwOBus5yNdTH39sbDG/sCjG2zq6V7dGRk9DYZrzjYU7BNYbYbZFhL4Hg7uomg01N3WxmYyrWFYy4CLu5JDZd4DkMM/8L7ouahGv1yPEU1SXc/EzDXksDgeHZl0009wMGNEQcsxMvl8/g11ai+bCBfg9VEGwGjsEfGmtx285rDzzIBjcy3RsHtB8+fwuYQBj8cHuCnoZsonrR4rk+vzNXwvCDdnZrIyGO38MP6vQmVpngekqokZprrDyAwxaXxDCEvlz7wlQbN3bLpSKffbKw7+PJu19tuFSh5scWTgmzw2ZYHgO9BqbuY7jaiEfa6f5toLmakC1aU+BJeSkwAOBsqfgqlJFdDNVgDUMjjG0l5SIaXHmHjq/y+57iV7mzDrzw0sH/+pecHbn1WyYijb3Zg5WZ5OS2UoajyynSd76gnFCAoX2yQYaX4N6yv/mowl1HialhE2NQheLA45X3lh2bTuVahJKSNVmBV0LBQB0tJJUgb4oRe4FrjgcAUR2wQpHjHHcmRO4D0F8h1R7AafaxYbp0f3e7cJ+wSvld9SlL3Ek/+QAcph3o0BiWwvOcvFxJEoi6sVgnZMb8hr8Dgza3gLeeVYl+J042MYjfdYub7ATh9iu29XnuSrrJRsygHqLeZf+h0hy2m8pcIfwBQ2BUBHv9O6n7p7Uo8xtfj1tNp9GCrD+GIkDHdqPAp3i7jWLjovC+alqnu87KWfrkGTheNaMMHQuuTlY0ehOxGkHU6QO/blGJW9bYiyFM= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: oOWeZ3QbdGCL7QkeX2K69XBy41pNaQU1BjpG4JG3o5mfQtFoLVVfHky8CNcjSXsfylPSX7h5A0tIdpT1GvDLJWTvgGAwpZNSz42lV6JLDZyuSM4kvZuVVxEb6JMlzCwxlhaW3h1t1XVIDCJuhoe6Muz75aQTAR6c+Q3Iu/hdSFVdYbM6B3GgwG2STUeaKS5D/035VGCVig5KN4LJOch9HlrtPLm8uuJoDfzG/EvpgGkyHixcw03N9XO/H4H7CGJKDZxnknenqXbtKagLl/BvbwJVQPXXwDK8GsFQba5C1GAKRkV5w06oJUX/zERzUu1uAlyGmIrUkUUoB9GlrdXhi0/EgaVcVud752Z44N2u8ylilpoMLLD2/mrUqB/Mksxy1+xstyvgWig1lXrz4uCC1zeumG17oc2qo+a2P9Nf3TPqY93Qozr11yjq2pWd1B+kLI1HzQD5XhfFldD72O8JxcZrTN198lM9Ve5ajH1hZ2ajzYreyIrV5wbi8AglAtGofgyFbLhKTZmgeAEhcwXrbfIZynVIRHrDs9H+cYfvBn+AF0plalrlV/S/ZoJWvYkGiJHJmnCxX+njLnCwJAK9WKK1AK+wcDUnEZN/u6bCa/zTp/FUU+SSUk3f8zNJd9wm0PPK5buE/+SfNNbSlIOFT5A0g43J3ZfUO6KeS36I0j0sCztd6wCPOR/i4H8UGMnRPLEpPG3hswqrZZV5kQxRbxzeP2zeF/jKbQ4DBE/ECt/fQxrX+cRkE1orIIEKPA5T X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d02b23f-a990-4fd5-aacd-08dbe4991e31 X-MS-Exchange-CrossTenant-AuthSource: BN6PR1001MB2340.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2023 22:37:29.2473 (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: SHcJDNQaLGhsIz5t8+tS0eB/GtOdeySSKnfE8Nu3I6DzyTa1DoHMaTix/uN+MZO803GVBFSSMviJ14nc9682DrD3uZWDRoIXwVts3mEQVpE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6397 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-13_12,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 bulkscore=0 phishscore=0 suspectscore=0 mlxlogscore=993 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311130176 X-Proofpoint-ORIG-GUID: 8L7Cq8Ve670lQ5v1Mo1zRUgcCFptLvvz X-Proofpoint-GUID: 8L7Cq8Ve670lQ5v1Mo1zRUgcCFptLvvz X-Spam-Status: No, score=-12.3 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: 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782490168075801380 X-GMAIL-MSGID: 1782490168075801380 This patch forces __builtin_memcmp calls upto data sizes of 1024 to become inline in caller. This is a requirement by BPF and it mimics the default behaviour of the clang BPF implementation. gcc/ChangeLog: * config/bpf/bpf.cc (bpf_use_by_pieces_infrastructure_p): Added function to bypass default behaviour. * config/bpf/bpf.h (COMPARE_MAX_PIECES): Defined to 1024 bytes. --- gcc/config/bpf/bpf.cc | 16 ++++++++++++++++ gcc/config/bpf/bpf.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index a0956a069729..764a3e487cb6 100644 --- a/gcc/config/bpf/bpf.cc +++ b/gcc/config/bpf/bpf.cc @@ -1115,6 +1115,22 @@ bpf_small_register_classes_for_mode_p (machine_mode mode) #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P \ bpf_small_register_classes_for_mode_p +static bool +bpf_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size, + unsigned int align ATTRIBUTE_UNUSED, + enum by_pieces_operation op, + bool speed_p) +{ + if (op != COMPARE_BY_PIECES) + return default_use_by_pieces_infrastructure_p (size, align, op, speed_p); + + return size <= COMPARE_MAX_PIECES; +} + +#undef TARGET_USE_BY_PIECES_INFRASTRUCTURE_P +#define TARGET_USE_BY_PIECES_INFRASTRUCTURE_P \ + bpf_use_by_pieces_infrastructure_p + /* Finally, build the GCC target. */ struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h index 82702aa7b6ba..1f177ec4c4ef 100644 --- a/gcc/config/bpf/bpf.h +++ b/gcc/config/bpf/bpf.h @@ -489,6 +489,11 @@ enum reg_class locations. */ #define MOVE_MAX 8 +/* Allow upto 1024 bytes moves to occur using by_pieces + infrastructure. This mimics clang behaviour when using + __builtin_memcmp. */ +#define COMPARE_MAX_PIECES 1024 + /* An alias for the machine mode for pointers. */ #define Pmode DImode