Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
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 20:49:00 -0000	[thread overview]
Message-ID: <1465678115-58170-3-git-send-email-jhb@FreeBSD.org> (raw)
In-Reply-To: <1465678115-58170-1-git-send-email-jhb@FreeBSD.org>

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  <jhb@FreeBSD.org>
+
+	* opcode/msp430-decode.h (MSP430_Size): Remove.
+	(Msp430_Opcode_Decoded): Change type of size to int.
+
 2016-06-11  Alan Modra  <amodra@gmail.com>
 
 	* 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];
-- 
2.7.0


  parent reply	other threads:[~2016-06-11 20:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-11 20:49 [PATCH 0/8] Fix various warnings from clang 3.8.0 John Baldwin
2016-06-11 20:49 ` [PATCH 8/8] Use unsigned integer constant with left shifts John Baldwin
2016-06-11 20:49 ` [PATCH 3/8] Initialize 'ra' to zero to avoid uninitialized use John Baldwin
2016-06-13 11:04   ` Yao Qi
2016-06-11 20:49 ` [PATCH 7/8] Remove unneeded checks on type lengths John Baldwin
2016-06-13 10:47   ` Yao Qi
2016-06-11 20:49 ` [PATCH 1/8] Use correct enum type for do_elf_stt_common John Baldwin
2016-06-13  1:48   ` Alan Modra
2016-06-11 20:49 ` [PATCH 5/8] Detect a frameless frame by comparing the FP register to -1 John Baldwin
2016-06-13 11:22   ` Yao Qi
2016-06-14 19:08     ` John Baldwin
2016-06-15  8:44       ` Yao Qi
2016-06-11 20:49 ` John Baldwin [this message]
2016-06-13  1:48   ` [PATCH 2/8] Change the size field of MSP430_Opcode_Decoded to a plain integer Alan Modra
2016-06-11 20:56 ` [PATCH 6/8] Pass a NULL pointer as the last argument to find_pc_partial_function John Baldwin
2016-06-13 10:49   ` Yao Qi
2016-06-11 20:56 ` [PATCH 4/8] Remove check for negative size John Baldwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465678115-58170-3-git-send-email-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox