From patchwork Mon Feb 12 17:42:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Hawkins X-Patchwork-Id: 20261 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp68591dyb; Mon, 12 Feb 2024 09:42:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGE0YOERnJC69b9Gnt5CCODZyhhJ4FIe8tn7UtFEyRCnfe0maAhui62fWrUI8SMUuF0ZMgS X-Received: by 2002:a05:6358:921a:b0:178:f497:ab3f with SMTP id d26-20020a056358921a00b00178f497ab3fmr5450582rwb.14.1707759746336; Mon, 12 Feb 2024 09:42:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707759746; cv=pass; d=google.com; s=arc-20160816; b=ueETZQP8CcPdJrS0C6Uc4oc85LFlZe34lL90szSBAoASh1FKEUqwfkyzcu2bTFZ9Gm 976pF5385QYVqF/oPM/IaefxTPO+YoXpjQwONPHYtM2x3SJPMvfHu9dTEwhCGbI4dsw2 hi5IlOthZDDH9/9offyeogmp7U2fqRsGrMNVXlOJ4zO+FeZdqt3kprJpEOYhf9uq49KI H0u75samUBZo3ZyVq633m2/3k4NzIvd5aSNteAdYndfkcaVD2vODvTjZ7itTxIWOw9jI GmXWNwbD4YOsuo0czB0jH7/ZRoLn6+G1x+tmZ4uVrudhZNDXXmy2T45+DfyLQomj3msC JmZg== ARC-Message-Signature: i=2; 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=mTU66pBO67VLeItSeakBX1nrxTE/JIvESprvctvWfl8=; fh=fsE6UNohzKvndaANp0BY8xgEJT3Cv0DJuoyZrObD5qY=; b=Cy2QBWUczWQDdZN39wX+8uQlPKeoxj64CIOMgZcGRsgUkRf9S1FKKt+usrK+XpwT0e 0wbEKr+6vOZhWihVe3IgKR+qPUKAoxe0iZthqvWVJ1fvDNunajwf/Lz7uc5omYQW8EAv C2uGav7l0a7lisu+aGHF0jxTVrd2FzeApx/wpdMDKTGkqBYepM1OtTMDeFgJkAvqufr3 jMdZcPBzJCjcNJnmmnI3EjKCMcKdcJ736v93cPmuEezQDXn3oN96ss2V8MHQpdyu0akg bdkMaYWLosrm6i48vqDJItbHHOkkZGXK6kNl0fsxd5Knh/R6+4g+a/ticT69IxQ6jDtx HbCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@obs-cr.20230601.gappssmtp.com header.s=20230601 header.b=FMBcVMIM; arc=pass (i=1); 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" X-Forwarded-Encrypted: i=2; AJvYcCVssud071P6rkpaxLa+KhBQOkVJephaPVXoKt02uPnh/afBkN/P0/7UqF3eUvOsuuT//l/y3QJkrExdpYEV/3dnHOlX4w== Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t16-20020ac87390000000b0042c37198699si775320qtp.731.2024.02.12.09.42.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 09:42:26 -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=@obs-cr.20230601.gappssmtp.com header.s=20230601 header.b=FMBcVMIM; arc=pass (i=1); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F27BE3858C39 for ; Mon, 12 Feb 2024 17:42:25 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by sourceware.org (Postfix) with ESMTPS id 26E223858C2F for ; Mon, 12 Feb 2024 17:42:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26E223858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=obs.cr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=obs.cr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 26E223858C2F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::832 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707759734; cv=none; b=xOzkod5nKyQh9r4hqQDIT7FIzmFZ/8vT9FGlP1td2NT+qsJ/YiTNmMhQn52FxaLeAqA8XBRaqAwVA1FvzmxkJKKjuGmB35x/b5ru4l0/JMu2u0mUXYV5/Sh5eIRHUmCeC5gbv8TBnFKfaJ381FnA0PKupR+wVecwJ3C5QKVqWO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707759734; c=relaxed/simple; bh=YQVB4Vyjipq/uLyh954+eGUBNy9XCraqba7bgGWm4cw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jvEgnkLdDnBg8CAtjLdYrcJ9XOTqsbGWrb+aIJ8IsGCMwz9mnc3pbMVbceX08gk3hSZMZJMByXEP9FEUXvB/eezDsKzUAoH4sFvf3CuETl5QTIuPm0DY6g8VLbpOeA+VT9PmDj8pJ2sit2eGSH2CavU2HFfXWbf8Cr7I1CNdA9A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-42c0960382eso24482781cf.2 for ; Mon, 12 Feb 2024 09:42:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=obs-cr.20230601.gappssmtp.com; s=20230601; t=1707759731; x=1708364531; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mTU66pBO67VLeItSeakBX1nrxTE/JIvESprvctvWfl8=; b=FMBcVMIMYMK9Q4sPUzfPFYLzB72fUJImssvA/21ALjxQI28UjOyVJwzLk89dq0PuIO DDCgsoaUP6iqUUJjcoSdpKpGyay6b9X0yJWe5R8TzrHxF2bJrJfdiClxnwwZkeuljU0s y9uMrQH4y5oyBMNFeNkPe23T8BLAb96NSYOhDKhQqHKZy+WZpaDCvioAr/BqoRHJM79S iMP+3C1ODCSzX3Eq1K3baKkRQHxfWqJcH9KX39TRK5+DtvymwmrAQaeXdYsRij7O10WO rXSScni7Pvn4Y+JewYRCafklV2Q4SaWA6KIqD5LStDd/m9jeKGKGASd9xCrwfYKUqgkO p9rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707759731; x=1708364531; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mTU66pBO67VLeItSeakBX1nrxTE/JIvESprvctvWfl8=; b=BdTQTB+XBGblWWQpvRFr3d1kn079NijMg8fC/fsrIJbWuvzqbsF5/zKB+Khb8YC68F dnJEyqKN+M5iN/wtbjn+tpUwHyJvA40QUJ7jhwz99ojw/ENrb6yA23E/CZLMvYM2g8uM Ycball5B7vy1iFLiwTbTuG+61JxHs9hAVRo7bMwtQHxH8UmCLBsM/x069BDDinqZ6GEe rEylY0mgFHbKMU82Mi7imbniYxmxn3Pgro0XoSdpCdZISvcZrNtkiQIL52IdcseFw4HS 4OOTGIaGkeWGeruhv8BYBsYrbZBP+zobaWJD4xnrABEV1x29H5DXXDx5HmIMp+hUD7wu D6YA== X-Gm-Message-State: AOJu0YzW9tpNv2z2knMWWn4YGkccyWx7l7xlw83CuQU05VOWSxqW12up VZjRO+zbxk081oMwpPxrV4+bAwClwy51Ch3gA/7NaSFdxcNZFsh9pZfb1VRGF6fEAUDKeQsmX3w A X-Received: by 2002:a05:622a:106:b0:42c:6a55:9ef0 with SMTP id u6-20020a05622a010600b0042c6a559ef0mr9559087qtw.16.1707759731219; Mon, 12 Feb 2024 09:42:11 -0800 (PST) Received: from borderland.rhod.uc.edu ([129.137.96.2]) by smtp.gmail.com with ESMTPSA id w5-20020ac857c5000000b0042c750bf876sm339604qta.43.2024.02.12.09.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 09:42:10 -0800 (PST) From: Will Hawkins To: binutils@sourceware.org Cc: Will Hawkins Subject: [PATCH v2 0/1] Add BPF callx support to objdump and as Date: Mon, 12 Feb 2024 12:42:05 -0500 Message-ID: <20240212174209.620310-1-hawkinsw@obs.cr> X-Mailer: git-send-email 2.43.0 In-Reply-To: 20240209180734.443763-1-hawkinsw@obs.cr References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, 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: 1790715883593588789 X-GMAIL-MSGID: 1790715883593588789 After additional consideration and discussion with Jose and Dave, it seems like we have determined the way that clang, gcc and binutils need to handle the callx/callr: 1. callr remains with the register holding the target of the jump stored in the dst_reg. 2. callx is added with the register holding the target of the jump stored in the imm32. 3. We have to remove the pseudoc syntax because it is no longer possible to disambiguate between versions of call by simply looking at the parameter. Tests are added/refactored to meet the above. I am more than happy to resend as a separate mailing to the list but sending first as a reply in order to keep list traffic manageable. As I said before, I sincerely appreciate all that you are doing for the community and how welcoming you have been to a first-time contributor. Sincerely, Will Will Hawkins (1): objdump, as: Add callx support for BPF CPU v1 gas/config/tc-bpf.c | 25 ++++++++++++++++++- gas/testsuite/gas/bpf/bpf.exp | 4 +-- .../gas/bpf/{indcall-1.d => callr.d} | 4 +-- .../gas/bpf/{indcall-1.s => callr.s} | 2 +- gas/testsuite/gas/bpf/indcall-1-pseudoc.d | 23 ----------------- gas/testsuite/gas/bpf/indcall-1-pseudoc.s | 13 ---------- include/opcode/bpf.h | 3 ++- opcodes/bpf-dis.c | 6 +++++ opcodes/bpf-opc.c | 4 ++- sim/bpf/bpf-sim.c | 4 +++ 10 files changed, 44 insertions(+), 44 deletions(-) rename gas/testsuite/gas/bpf/{indcall-1.d => callr.d} (90%) rename gas/testsuite/gas/bpf/{indcall-1.s => callr.s} (90%) delete mode 100644 gas/testsuite/gas/bpf/indcall-1-pseudoc.d delete mode 100644 gas/testsuite/gas/bpf/indcall-1-pseudoc.s