From patchwork Sat Jun 11 20:48:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 12985 Received: (qmail 102919 invoked by alias); 11 Jun 2016 20:49:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 102745 invoked by uid 89); 11 Jun 2016 20:49:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=2.7.0, Contains, 876 X-Spam-User: qpsmtpd, 2 recipients X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Sat, 11 Jun 2016 20:49:27 +0000 Received: from ralph.baldwin.cx.net (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D8BA0B9AD; Sat, 11 Jun 2016 16:49:24 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH 2/8] Change the size field of MSP430_Opcode_Decoded to a plain integer. Date: Sat, 11 Jun 2016 13:48:29 -0700 Message-Id: <1465678115-58170-3-git-send-email-jhb@FreeBSD.org> In-Reply-To: <1465678115-58170-1-git-send-email-jhb@FreeBSD.org> References: <1465678115-58170-1-git-send-email-jhb@FreeBSD.org> X-IsSubscribed: yes The size field was defined as an instance of an enum, but existing code treats the size field as a plain integer containing a bit count. include/ChangeLog: * opcode/msp430-decode.h (MSP430_Size): Remove. (Msp430_Opcode_Decoded): Change type of size to int. --- include/ChangeLog | 5 +++++ include/opcode/msp430-decode.h | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/ChangeLog b/include/ChangeLog index 722b8a5..97d506e 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2016-06-11 John Baldwin + + * opcode/msp430-decode.h (MSP430_Size): Remove. + (Msp430_Opcode_Decoded): Change type of size to int. + 2016-06-11 Alan Modra * coff/sparc.h (COFF_ADJUST_SYM_OUT_POST): Define. diff --git a/include/opcode/msp430-decode.h b/include/opcode/msp430-decode.h index b19a51a..f9e1b4c 100644 --- a/include/opcode/msp430-decode.h +++ b/include/opcode/msp430-decode.h @@ -87,13 +87,6 @@ typedef struct unsigned char condition : 3; } MSP430_Opcode_Operand; -typedef enum -{ - MSP430_Byte = 0, - MSP430_Word, - MSP430_Addr -} MSP430_Size; - /* These numerically match the bit encoding. */ typedef enum { @@ -125,7 +118,7 @@ typedef struct unsigned repeats:5; /* Contains COUNT-1, or register number. */ int n_bytes; /* Opcode size in BYTES. */ char * syntax; - MSP430_Size size; /* Operand size in BITS. */ + int size; /* Operand size in BITS. */ MSP430_Condition cond; /* By convention, these are [0]destination, [1]source. */ MSP430_Opcode_Operand op[2];