From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 082HDyQ3qGCdCAAAWB0awg (envelope-from ) for ; Fri, 21 May 2021 18:41:40 -0400 Received: by simark.ca (Postfix, from userid 112) id 385F31F11C; Fri, 21 May 2021 18:41:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8723A1E783 for ; Fri, 21 May 2021 18:41:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFA55383F419; Fri, 21 May 2021 22:41:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFA55383F419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1621636898; bh=wGXhAwwi5QIDkbeK9MBSiByVnWfUnn0xh8TVsrnl8u0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=HWLO/GUqlCHNgFrH7ijR7+Rk4H4WIBWKLtXbI2G6dBqEwKBU07/DfzQRlc1fPePy5 qk7ClNdQQ6gEp1aEQSCeoXswNPyYjBvZp44EL/RfSUu8a14DqsJO7LzgmQ4g90i2KU IhFcnVU7a5186Ab2qBmCX0Xlmz1m4GFo6d2MKDlY= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id A5D4B384781F for ; Fri, 21 May 2021 22:41:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A5D4B384781F Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1F232340C50; Fri, 21 May 2021 22:41:33 +0000 (UTC) Date: Fri, 21 May 2021 18:41:32 -0400 To: Yoshinori Sato Subject: Re: [PATCH 1/2] sim: h8300 Fixed different behavior in preinc/predec. Message-ID: Mail-Followup-To: Yoshinori Sato , gdb-patches@sourceware.org References: <20210521141655.68398-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210521141655.68398-1-ysato@users.sourceforge.jp> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 21 May 2021 23:16, Yoshinori Sato wrote: > Fixed some addressing modes not working properly on the h8300. > I have confirmed in the test case that the result is > the same as the actual CPU. are there testcases that cover this behavior ? if not, can you add some ? > --- a/sim/h8300/compile.c > +++ b/sim/h8300/compile.c > @@ -1098,6 +1098,35 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst) > /* End of Processing for system calls. */ > } > > + /* Use same register is specified for source > + and destination. > + the value of source will be the value after "The" > + address calculation. */ two spaces after . > + if (OP_KIND(dst->opcode) != O_CMP && > + OP_KIND(dst->src.type) == OP_REG && > + (dst->src.reg & 7) == dst->dst.reg) { > + switch (OP_KIND(dst->dst.type)) > + { > + case OP_POSTDEC: > + dst->src.type = X(OP_REG_DEC, > + OP_SIZE(dst->dst.type)); should put a space before the ( in all these -mike