Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1045514pxu; Wed, 2 Dec 2020 09:38:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+QsgV5KJnpwLFQLf7JcsbG5sezQhGOqJnWrEHmcDQprWp2YFCJBqiNWXFS+7Oizrnsh+1 X-Received: by 2002:aa7:d1c2:: with SMTP id g2mr1095548edp.8.1606930735829; Wed, 02 Dec 2020 09:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606930735; cv=none; d=google.com; s=arc-20160816; b=hah9r4AOQ3TQEfdZTAj2jsIwMpPFNhAfmvWORZ6iUClUDS/eNw168mdNYDUTSddwZm GIMC2gGi8JT4NGA2I7SpTJKBsvDJ5UvG3m0ryFE62eMl6SKBwLgZkFYLALrUFVPm/ABc wV0vWQgVcMAEnBN1QMyAgoDl29L0D4P7AizRjM7LbAafvnfPVmxXUc0Gp+WCReIhMhg6 VjtdrNTgyI8tmDYZkLo69y22uJ6DJE2iIb1DNT4jc0eXOfCjCgJkrpd2YKQ6qa/6jd5G rz5/smVa/Uowspv7VgAgGegFW12fMm4MMHXenWnDEnNnWSkmqhXVvpZ+kgzK45zb5s1K bC3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pLAAu7+sji8IJoCg+8UXEel91VK0p8PGWM0v3i7M3IE=; b=kSl2tYlhJ8JdFJpTj4v3YtUJWnWPolofGZpGh8SEHqWoKj/SfIAjukUceKLimysSUn UW9gbTM2F4mimrewCVOCmmn0iQi1UE8WNjvOhtvqJBk8d0rXAEazuVLPmvl2Qtv2/i2Q DFSNDBaBsxMx+eCbEESX0yt0oLfEoQP2nSA7ZpSK0Ff8QTvRL1BB0vHEFSi97reO4/sd P2dYBvKCXuRZ3/MzAeYbRt76wYpruBurNGAWr/kysDPT6EmYnePhGzAsVeT1QSGIybd8 hBmWBn5VsGkyf8Q6PTZRUhQziOzS28jlf2j0ZYgygoP2Z3UIRHCV6h2ujnRCZRCi5dNH DfYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FF5+khDy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x31si399346ede.198.2020.12.02.09.38.32; Wed, 02 Dec 2020 09:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FF5+khDy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgLBRgl (ORCPT + 99 others); Wed, 2 Dec 2020 12:36:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726070AbgLBRgl (ORCPT ); Wed, 2 Dec 2020 12:36:41 -0500 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3C13C0613CF; Wed, 2 Dec 2020 09:36:00 -0800 (PST) Received: by mail-oi1-x242.google.com with SMTP id y74so2391894oia.11; Wed, 02 Dec 2020 09:36:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pLAAu7+sji8IJoCg+8UXEel91VK0p8PGWM0v3i7M3IE=; b=FF5+khDygMun8kdp3GfHydtG9WE1iWBNpgElfJAP6GPilfEqENd8MzWLR5qhXhhIel 8mzLZ8yYy2NKZ8PkWWtL8pSu4xcmB2KjyRfLJHYJ+Vbq1hnxYrCqemJ72RY7MGxYEtl5 j+NPbGQi5W1Qqm78GpuCUZaYio+/RMaWPOypPIHMlvwa1wSbiWvrOYmdJi0BaCnkEoUX 9G07SOnsbDFJQHmTiR7LKiLVqNJlgbeoo05pNRdbA4Befbqf6AjgSPAE2dS/kz3zJMUu epNSrcQTsbVi73sGFtY3QBDObXVpVaRnGxNMY8D3q5VlCW+FwLM6+NNGqaQafDej2mq9 ybCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pLAAu7+sji8IJoCg+8UXEel91VK0p8PGWM0v3i7M3IE=; b=hRChTGqDT3M5tGheotIxlDrr1pWAzvNVx/yKEtoPlG9WJhTWbjc2NiRPW0MDCKMTMX 3esDud4g/zypvkiGPSSyZaXTQPEu/qHGZ+4URWlUg8KTc5Fq1KyihPYC2JOyfcpdBFz4 D6zPN7L7aiLxQQJ5zMg1LbF0joOUa8raflqN8+apj6bJK572QV6GSk6Lt+Tf8j5ly7W7 0nS5RG31AIsD7uAyJUTegSLINMfk5RSaRA878USxf4JRVZeTkcBkAYebe1wusxU9aSnz Ps0gyIWRIuHvGadb3We49JvUizKRNK7yATgpBANGls6PNcKaPV7cG2Lxm4yFshbpxZXY 7w7Q== X-Gm-Message-State: AOAM531yHEhXAQWrhdR87hYfsEUCfHG2arcRpGvHZZN9g5iPTK6mQHBy 92q10ZRmX8VC0RwWNAQrmBXL5Lff/4qzoDbqbrNjEbep X-Received: by 2002:a05:6808:562:: with SMTP id j2mr2375423oig.1.1606930560156; Wed, 02 Dec 2020 09:36:00 -0800 (PST) MIME-Version: 1.0 References: <20201127175738.1085417-1-jackmanb@google.com> <20201127175738.1085417-2-jackmanb@google.com> <20201129011552.jbepegeeo2lqv6ke@ast-mbp> <20201201121437.GB2114905@google.com> <20201202105248.GA9710@google.com> In-Reply-To: <20201202105248.GA9710@google.com> From: Alexei Starovoitov Date: Wed, 2 Dec 2020 09:35:49 -0800 Message-ID: Subject: Re: [PATCH v2 bpf-next 01/13] bpf: x86: Factor out emission of ModR/M for *(reg + off) To: Brendan Jackman Cc: bpf , Alexei Starovoitov , Yonghong Song , Daniel Borkmann , KP Singh , Florent Revest , LKML , Jann Horn Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 2, 2020 at 2:52 AM Brendan Jackman wrote: > > Tue, Dec 01, 2020 at 09:50:00PM -0800, Alexei Starovoitov wrote: > > On Tue, Dec 1, 2020 at 4:14 AM Brendan Jackman wrote: > > > > > > On Sat, Nov 28, 2020 at 05:15:52PM -0800, Alexei Starovoitov wrote: > > > > On Fri, Nov 27, 2020 at 05:57:26PM +0000, Brendan Jackman wrote: > > > > > +/* Emit the ModR/M byte for addressing *(r1 + off) and r2 */ > > > > > +static void emit_modrm_dstoff(u8 **pprog, u32 r1, u32 r2, int off) > > > > > > > > same concern as in the another patch. If you could avoid intel's puzzling names > > > > like above it will make reviewing the patch easier. > > > > > > In this case there is actually a call like > > > > > > emit_modrm_dstoff(&prog, src_reg, dst_reg) > > > > emit_insn_prefix() ? > > Ah sorry, I thought you were talking about the _arg_ names. I meant both. Arg names and helper name. Sorry for the confusion.