Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1525864pxm; Thu, 3 Mar 2022 20:49:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsodVSR4Po0EVfe98Z5azIG1heluto4rxiWi5GRuX7UOf3hA1qWwobKL1+jOOr6dJOGsgX X-Received: by 2002:a05:6a00:1312:b0:4e1:58c4:ddfd with SMTP id j18-20020a056a00131200b004e158c4ddfdmr41743365pfu.65.1646369393960; Thu, 03 Mar 2022 20:49:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646369393; cv=none; d=google.com; s=arc-20160816; b=BsnqFtIt+yj76Lrh4mKVYv/O9hRP/SupSFp9X3duAcyAeYWkjK35LS66/2nwLRbJPz Iy7G9bb0g1M9q7jPC5qEIyvjGhkPkknYADkCU9C9gj2FkFAg5FXvnGvGOiVegJPBjDfb ec+fK+6lMwGcY5dOQwxw9AhUlGhlCc7d3IkOxzIH3Duvd63Bt9dYBFi7/9AXZhLLRQ9v xuOWlRjB26kyVzjshYhwTyfrNYxmU7Chq5DiKmVOEP2tTDiJ//1CKo2tXBwrd4OMdxxZ tnqDAOomWTFrsNMtffw5QUQgSlwOwBcaHsBWXK6oDyxUx1H6QrghPHoCasRnu7tcXkhb D3BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=riAePIdOHWyX+kWI5kEIlQkDYdGowAInsgUw4gn0/e4=; b=fpD1OXbVAei5sn1JPV7eRGeLBqjc+G1Hehr7m+56eZRKU6vaT7qSfx+md8Ww4N18vK fTd0yHaX0j8W9J0ndrJAF9D8+FkwDmDHqNPaNs/56PDPCUmY7FPd3EpOiqQzc/ynD+So 0FAkYQbwHrxr4ib4QfvrTjye1Wylrl1W3pM+ILXNmKlF0LSLZw9NwoPXSoTiWkQ+I7MR pgx+p59S6ib6ucWM4PogTUVpa8BZWyw0Cnaqi34vWYz2ePC0jvTzfoNA7Na0k13Y3thN 0ErNxCogoUa6IrutWl8CIi/TYvmIsBlp5fO1hD9mXgxFRwIOCNGPTGC8SszDYyu360Tu umiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BlrpAc0L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a170903019200b00151840f9b71si4292390plg.294.2022.03.03.20.49.26; Thu, 03 Mar 2022 20:49:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BlrpAc0L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237856AbiCDD0J (ORCPT + 99 others); Thu, 3 Mar 2022 22:26:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237857AbiCDD0I (ORCPT ); Thu, 3 Mar 2022 22:26:08 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F349517F692 for ; Thu, 3 Mar 2022 19:25:21 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id q8so8180701iod.2 for ; Thu, 03 Mar 2022 19:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=riAePIdOHWyX+kWI5kEIlQkDYdGowAInsgUw4gn0/e4=; b=BlrpAc0LSalr08lxLvWHUF9xqsdrYeT/1mov5HdmySdHvY7zpjGGpvRBzSVE7uyStd RFfWon9VgWK3xggfoUkXejf4U8sLAeW88vzXIDjUl4CZZ63tpT4qE6fUpp5hRy5ZbDrt nV+6kcnrv5q7GtjDy8B4cuC/te60S6o70rBXya6sDNs0UKra6WerMmeR5cPU5qB4Yn7K Zr+hE8G4Zd67A2sks8WC/4yo6JcqOJvYva1NS8pJKDTSj4Ln2MgUpNcvSXvHCgd6yfHw dBnvBaKOXYA3nV5h24Uy8mbxbdXBqVBFiOe45hX4Q/scfBbfLF16+Gi4pk+w2DDsMGpJ T5Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=riAePIdOHWyX+kWI5kEIlQkDYdGowAInsgUw4gn0/e4=; b=sxKzrNOL4bm9/0b0BpWujVDZKMZqNUCOH3QvWP1EaATG/tmy8/UKF9BI3sDMhkcgPd oghIIqha0CaNMKinz/ehkBt27a+fsxgTy7ky2stziuwpQDlmcFvOvfAyu93rr7/1sRSM 56DfywEeSOmCD+BpnvsS3Z+/r2QwPnlTfifiAFpS3OZ34kVBB212HMfA8MGfkTDFaqmC 2+jAj0B7nxZ/T1diS7oU7OKu6zu85wFN0I7g25rGWWydHajnh3vatymXM45pfkwQnJjb YFtzKql3lYjcwVsuBDThmSZoAJesgBE/LX+soukVeBXQN4xu5Y35IOTxKk+3rG7ikqRH fgvw== X-Gm-Message-State: AOAM532WBy6/WY9gdBgyQemoLowwvg5RpoqH2TBT+LXl8kX+29uBRiXb PfcMsd2VUq5jy0xNBWFlI0Q= X-Received: by 2002:a02:ccea:0:b0:314:8504:cdd8 with SMTP id l10-20020a02ccea000000b003148504cdd8mr32604002jaq.117.1646364321340; Thu, 03 Mar 2022 19:25:21 -0800 (PST) Received: from localhost.localdomain (118-208-215-36.tpgi.com.au. [118.208.215.36]) by smtp.gmail.com with ESMTPSA id a13-20020a056e02180d00b002c25b51d5ecsm4114751ilv.55.2022.03.03.19.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 19:25:21 -0800 (PST) From: Sam Zeter To: mhiramat@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Nathan Chancellor , Nick Desaulniers , Samuel Zeter , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v2 2/2] arch/x86/tools/objdump_reformat.awk: Allow for spaces Date: Fri, 4 Mar 2022 14:16:11 +1100 Message-Id: <20220304031611.5763-3-samuelzeter@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304031611.5763-1-samuelzeter@gmail.com> References: <20220304031611.5763-1-samuelzeter@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Samuel Zeter objdump and llvm-objdump have differing output formats. Specifically, objump will format its output as: address:hex, whereas llvm-objdump displays its output as address:hex. objdump_reformat.awk incorrectly handles this discrepancy due to the unexpected space and as a result insn_decoder_test fails, as its input is garbled. The instruction line being tokenized now handles a space and colon, or tab delimiter. Signed-off-by: Samuel Zeter --- arch/x86/tools/objdump_reformat.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/tools/objdump_reformat.awk b/arch/x86/tools/objdump_reformat.awk index 276e572a6..a4120d907 100644 --- a/arch/x86/tools/objdump_reformat.awk +++ b/arch/x86/tools/objdump_reformat.awk @@ -22,7 +22,7 @@ BEGIN { } /^ *[0-9a-f]+:/ { - if (split($0, field, "\t") < 3) { + if (split($0, field, /: |\t/) < 3) { # This is a continuation of the same insn. prev_hex = prev_hex field[2] } else { -- 2.35.1