Message ID | 20200315132810.7022-13-f4bug@amsat.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1698674ile; Sun, 15 Mar 2020 06:37:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vurTAwUmvRsDuWuUEXeuU1URzBrlM8IDsBUj1u8ITqKkYsjbV7/YUPncZOXCJ/ptgG67xU1 X-Received: by 2002:a37:9c07:: with SMTP id f7mr22483781qke.349.1584279461229; Sun, 15 Mar 2020 06:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584279461; cv=none; d=google.com; s=arc-20160816; b=UCtKSL7WZnK5GInMU0YB7zbtdwvjSzD3w7+/IE+VIHAgSaG9cz9XslKbexCGXs9eEh uSWynwDTBLdED2olnQrf3qjE/vyAUBWsubf57110JcfE4Lb1FRHnTpxnDLom8qRi0O9l OoHBMX0crXLo84jucn4038ALRAudbVcB3aKUrQTgPpO3q3SmM/ezTFgV9jsYu7eHQxFv Dl2FgG7SsUuLKmsAoD0oVEKw1sO9fo/YE7bJFiNeZCJsH6iF8ijdZG+ldgXmT4/WHRML iZVQDmHJplVX3ocKtfNadaLekRsKb1WduR5hYAoJKCLcwbMb9yV/S6J8p1VyD/FRVZPj kLbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=rtyy8CX6lQ0m3U8wFWf3AzT/p7YOaZwtAFg++0OM+ps=; b=aKmYt51SPmIN+dBcQqHlsfakjQZ2gDIkUfXFuq0ugoXVsFOCOTZuWLenPozpxu9fr/ w9J0NWaEvP0jGyB77/mynjB7/HjaxIfsCs7oEVU+MZNvT/9FO2iqfOJ+6AKFh/2PUMuI RFqNys+XetpWRjMSYsZAoCFogp6HqVSRejC+1WY/KQZC+UtQgdDbOsRKivNs+sL/+8W+ qX28uXg+KhKcqeLbYK3unnUaZtalh+7rqXM1Dqf83TGJFWJiN7KUlKMxdsYeVLBRlcqk UkFF/+GxGAUcI7GRRsUHMIu4dBNrVQmK4a2MTaDbNauYcjDE4lhfPmtrjdoz6hvEf88b 6ejw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JlLN8yVK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u89si8735267qtd.76.2020.03.15.06.37.41 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Mar 2020 06:37:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=JlLN8yVK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Received: from localhost ([::1]:54048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1jDTSW-00075y-Nu for patch@linaro.org; Sun, 15 Mar 2020 09:37:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50922) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1jDTJl-00089o-Sx for qemu-devel@nongnu.org; Sun, 15 Mar 2020 09:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1jDTJk-0003Wf-NA for qemu-devel@nongnu.org; Sun, 15 Mar 2020 09:28:37 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:35894) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>) id 1jDTJk-0003Qd-FC for qemu-devel@nongnu.org; Sun, 15 Mar 2020 09:28:36 -0400 Received: by mail-wm1-x341.google.com with SMTP id g62so15117060wme.1 for <qemu-devel@nongnu.org>; Sun, 15 Mar 2020 06:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rtyy8CX6lQ0m3U8wFWf3AzT/p7YOaZwtAFg++0OM+ps=; b=JlLN8yVKsJtkMAokOUasuGG7z7aQ20ngIy//oSRTN2kvpOKeyS/eD0FVATR8ky75mt Ui8tyIIm1pBInZysWZnwjJHI6KmZVRZg6EWzhRs9a7IgOV1fooohlNMyHi8YB4L2Pgbm zJ9KB8Cvi2gkzZfTzEDFtX4SjI4dqPOh2t5o8zpCDTLe7TySU7JTWTTgjZK5FOe428+5 YFeU6Fq3MrxBKtVwMMWvLGSS7xubObEULYTbMNyuNO3yUX5xX4gCEzVTlldKc44DX/49 uc9zQ5aOD8+5T/epO6wO+P4MXbNKKhZEEnS2WevT6U1H0+TpY7ABpkRbxvxelKoSxdSh se8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rtyy8CX6lQ0m3U8wFWf3AzT/p7YOaZwtAFg++0OM+ps=; b=auL2QYGKD8sv7Bte4cSHnOlhExSsumzrqGI+QG+ruhTCECtzbkejsC123ejlnaLTA4 bRE29qgqjZ+bw5aukm/8XNTpRy0wgIhCDv3XtSGEJq6BJx7pAQvHMuH0SIQSA0pscPJC T4K/QYZsjulSJErSSVkgi7PDcfV4cAGpjii8BZhIBuguCvWZDkFa5YHt36UD1nMyOWsR HaiwdQW/fHgwwqxX0RSrXpLSfng689ru2V0UZakx1vqI/Ay7FjEdJG4cKMtaOGJSYdBo wn8ZP+DodS0G4UtUoI3hqjAjkMVxKX2g2gdE5FQ6K/P6a8wD5TbRLh94ufpAEI/Ncj3E g9/w== X-Gm-Message-State: ANhLgQ1lp+0xlkmM/jT3vMsb/Q+wQtRbZglTcYt0CpyVhAEvnFDvovB8 pDOjM/EmIPz9WerpSkq8EGDzyfWQ X-Received: by 2002:a05:600c:215:: with SMTP id 21mr22132041wmi.119.1584278913643; Sun, 15 Mar 2020 06:28:33 -0700 (PDT) Received: from localhost.localdomain (191.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.191]) by smtp.gmail.com with ESMTPSA id d15sm87590503wrp.37.2020.03.15.06.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2020 06:28:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> To: qemu-devel@nongnu.org Subject: [PATCH 12/13] target/rx: Dump bytes for each insn during disassembly Date: Sun, 15 Mar 2020 14:28:08 +0100 Message-Id: <20200315132810.7022-13-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200315132810.7022-1-f4bug@amsat.org> References: <20200315132810.7022-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>, =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= <alex.bennee@linaro.org>, Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com>, Richard Henderson <rth@twiddle.net> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
None
|
expand
|
diff --git a/target/rx/disas.c b/target/rx/disas.c index dcfb7baf99..6dee7a0342 100644 --- a/target/rx/disas.c +++ b/target/rx/disas.c @@ -102,7 +102,21 @@ static int bdsp_s(DisasContext *ctx, int d) /* Include the auto-generated decoder. */ #include "decode.inc.c" -#define prt(...) (ctx->dis->fprintf_func)((ctx->dis->stream), __VA_ARGS__) +static void dump_bytes(DisasContext *ctx) +{ + int i, len = ctx->len; + + for (i = 0; i < len; ++i) { + ctx->dis->fprintf_func(ctx->dis->stream, "%02x ", ctx->bytes[i]); + } + ctx->dis->fprintf_func(ctx->dis->stream, "%*c", (8 - i) * 3, '\t'); +} + +#define prt(...) \ + do { \ + dump_bytes(ctx); \ + ctx->dis->fprintf_func(ctx->dis->stream, __VA_ARGS__); \ + } while (0) #define RX_MEMORY_BYTE 0 #define RX_MEMORY_WORD 1