From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15415 invoked by alias); 7 Apr 2014 16:48:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15406 invoked by uid 89); 7 Apr 2014 16:48:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 07 Apr 2014 16:48:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DDF8D1160E9; Mon, 7 Apr 2014 12:48:39 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p8ywRCLwnU9W; Mon, 7 Apr 2014 12:48:39 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B68B91160DE; Mon, 7 Apr 2014 12:48:39 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BF3AFE0BF1; Mon, 7 Apr 2014 09:48:40 -0700 (PDT) Date: Mon, 07 Apr 2014 16:48:00 -0000 From: Joel Brobecker To: Anthony Green Cc: gdb-patches@sourceware.org Subject: Re: [Patch, moxie, sim] Add new sign-extension instructions Message-ID: <20140407164840.GC4250@adacore.com> References: <87ppkzjbsd.fsf@moxielogic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ppkzjbsd.fsf@moxielogic.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-04/txt/msg00079.txt.bz2 > I'm committing the following patch that adds support for two new > sign-extension instructions to the moxie simulator. Binutils and GCC > changes have already been committed. > > Thanks, > > AG > > 2014-04-02 Anthony Green > > * interp.c (sim_resume): Add new sign-extend instructions. Small comment: Would you mind adding an empty line between the local variable declarations and the first statement after that? This is part of the GDB Coding Style and the sim code is part of GDB. Eg: > - case 0x10: /* bad */ > - case 0x11: /* bad */ > + case 0x10: /* sex.b */ > + { > + int a = (inst >> 4) & 0xf; > + int b = inst & 0xf; > + signed char bv = cpu.asregs.regs[b]; Add an empty line here. > + TRACE("sex.b"); > + cpu.asregs.regs[a] = (int) bv; > + } > + break; > + case 0x11: /* sex.s */ > + { > + int a = (inst >> 4) & 0xf; > + int b = inst & 0xf; > + signed short bv = cpu.asregs.regs[b]; And here as well. > + TRACE("sex.s"); > + cpu.asregs.regs[a] = (int) bv; > + } > + break; > case 0x12: /* bad */ > case 0x13: /* bad */ > case 0x14: /* bad */ Thank you! -- Joel