From patchwork Wed Oct 26 07:00:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 11082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp96906wru; Wed, 26 Oct 2022 00:01:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+uBF2LMBUmGyAs7JMNVNmLhQpbCBd29gl+lbJG05QkGgUOUgjo74pPSuZgAFOtM4FvD2p X-Received: by 2002:a17:907:968b:b0:78d:f5c2:70d8 with SMTP id hd11-20020a170907968b00b0078df5c270d8mr35284108ejc.564.1666767655254; Wed, 26 Oct 2022 00:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666767655; cv=none; d=google.com; s=arc-20160816; b=Arxd4dxXYoJJBN1dA3hYaQ4sMpw2GyUEkhraovNgKpflLhpk9bFP+M3bs/05MtHOUX sIXWIN4Bh6u98vGb/na2oYQXvsuV4kBF9nndDz7oXAvBjF91OZwbi1FpY/XdxyOeP/6G VaO7ZQIu8S6amrx+EQQUPQGlC4vWjBMMKzJc/taWFq5Gxx3uvgMhP38QG5ONaYWtWuxU 95ICk2kUk4pdGyrlrK4ZJWhXMwc0bHRoSWZkDmh+7g1pyQUExsNh+9cikgNiEmtsTFry jms1yNS63JbEVTQiNKhZFzTCepe60xqYHZhDKWZMpELNxco+r+LYgJxB+ApXNsplX80E CpmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dmarc-filter :delivered-to; bh=LxzmJJ7rAeTmI9Q7H8+/f9ExJ5+M2XQ/BSoj1sw4gCE=; b=YKp/1CggPCu2zQcja869ZiUctCwb3x86f3/S6LOWi+4xOE7PRaRTcqy6NvEDnbkOyP M9ucECZu4epHc0CRzO2GyYIF86qkBYU/OHEyYqV+PFvrrxQStBols5Fait4BcaQlm8JJ RpT1f/+XyLxaXPMn+UnHTetIu4C7eHTk95gC3C7LjjcExOah9Je33xOCBiNv/fDwbI3t 0wOkN1QK3zetyMJv5/0zwjyNw4dPYFg3ogMGHXNoMbe0wlLdfNW6Ebk/wXcSmdmfiPMD zsVrII8GFblaAQ3yKHYssxRvJVFi+qVijvLtfbSPuNU3oe3DLbMXrbk5gNWpZtnMgTGc M7sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id iy6-20020a170907818600b0078d9b2facaesi3867857ejc.339.2022.10.26.00.00.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 00:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 1FC88384BC2B for ; Wed, 26 Oct 2022 07:00:54 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from hsmtpd-def.xspmail.jp (hsmtpd-def.xspmail.jp [202.238.198.244]) by sourceware.org (Postfix) with ESMTPS id 000BA3854166 for ; Wed, 26 Oct 2022 07:00:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 000BA3854166 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=users.sourceforge.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=users.sourceforge.jp X-Country-Code: JP Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) by hsmtpd-out-1.asahinet.cluster.xspmail.jp (Halon) with ESMTPA id 77326c78-8408-4f2f-bc1d-a86a3a79baad; Wed, 26 Oct 2022 16:00:16 +0900 (JST) Received: from SIOS1075.flets-east.jp (al142138.dynamic.ppp.asahi-net.or.jp [111.234.142.138]) by sakura.ysato.name (Postfix) with ESMTPSA id BF3AC1C01B6; Wed, 26 Oct 2022 16:00:15 +0900 (JST) From: Yoshinori Sato To: binutils@sourceware.org Subject: [PATCH] opcodes: RX fix invalid output. Date: Wed, 26 Oct 2022 16:00:09 +0900 Message-Id: <20221026070009.3663574-1-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP 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.29 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 Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747732560887534462?= X-GMAIL-MSGID: =?utf-8?q?1747732560887534462?= The operands of the mvtcgu instruction were reversed. * rx-decode.opc(rx_decode_opcode): mvtcgu swap operands. * rx-decode.c: regenarate. Signed-off-by: Yoshinori Sato --- opcodes/rx-decode.c | 12 ++++++------ opcodes/rx-decode.opc | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/opcodes/rx-decode.c b/opcodes/rx-decode.c index 17fbcfcfe6c..8ccb12674a7 100644 --- a/opcodes/rx-decode.c +++ b/opcodes/rx-decode.c @@ -12476,22 +12476,22 @@ rx_decode_opcode (unsigned long pc AU, break; case 0x30: { - /** 1111 1101 0001 0111 a011 rdst mvtacgu %0, %1 */ + /** 1111 1101 0001 0111 a011 rsrc mvtacgu %1, %0 */ #line 1110 "rx-decode.opc" int a AU = (op[2] >> 7) & 0x01; #line 1110 "rx-decode.opc" - int rdst AU = op[2] & 0x0f; + int rsrc AU = op[2] & 0x0f; if (trace) { printf ("\033[33m%s\033[0m %02x %02x %02x\n", - "/** 1111 1101 0001 0111 a011 rdst mvtacgu %0, %1 */", + "/** 1111 1101 0001 0111 a011 rsrc mvtacgu %1, %0 */", op[0], op[1], op[2]); printf (" a = 0x%x,", a); - printf (" rdst = 0x%x\n", rdst); + printf (" rsrc = 0x%x\n", rsrc); } - SYNTAX("mvtacgu %0, %1"); + SYNTAX("mvtacgu %1, %0"); #line 1110 "rx-decode.opc" - ID(mvtacgu); DR(a+32); SR(rdst); F_____; + ID(mvtacgu); SR(rsrc); DR(a+32); F_____; } break; diff --git a/opcodes/rx-decode.opc b/opcodes/rx-decode.opc index 86effc39862..1b303ed8b19 100644 --- a/opcodes/rx-decode.opc +++ b/opcodes/rx-decode.opc @@ -1106,8 +1106,8 @@ rx_decode_opcode (unsigned long pc AU, /** 1111 1101 0001 111i a m11 rdst mvfacgu #%2, %1, %0 */ ID(mvfacgu); S2C(((i^1)<<1)|m); SR(a+32); DR(rdst); F_____; -/** 1111 1101 0001 0111 a011 rdst mvtacgu %0, %1 */ - ID(mvtacgu); DR(a+32); SR(rdst); F_____; +/** 1111 1101 0001 0111 a011 rsrc mvtacgu %1, %0 */ + ID(mvtacgu); SR(rsrc); DR(a+32); F_____; /** 1111 1101 0001 1001 a00i 0000 racl #%1, %0 */ ID(racl); SC(i+1); DR(a+32); F_____;