From d203b41ac79b011d63bc1e2467f9c8a81f468eed Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 20 Aug 2018 09:22:28 +0930 Subject: [PATCH] Tidy bit twiddling * sh-opc.h (MASK): Simplify. --- gas/ChangeLog | 6 +++--- include/ChangeLog | 6 +++--- opcodes/ChangeLog | 17 +++++++++++------ opcodes/sh-opc.h | 5 +---- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index efb834c8c4a..1ad770d26dd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -632,9 +632,9 @@ 2018-06-29 Ramana Radhakrishnan * config/tc-aarch64.c (warn_unpredictable_ldst): Add unpredictable - cases for ldxp, stlxrb, stlxrh, stlxr. - * testsuite/gas/aarch64/diagnostic.s: New tests. - * testsuite/gas/aarch64/diagnostic.l: Adjust. + cases for ldxp, stlxrb, stlxrh, stlxr. + * testsuite/gas/aarch64/diagnostic.s: New tests. + * testsuite/gas/aarch64/diagnostic.l: Adjust. 2018-06-29 Tamar Christina diff --git a/include/ChangeLog b/include/ChangeLog index f663f9b937a..ab3ff1fff1f 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,6 +1,6 @@ -2018-07-27 John Darrington +2018-07-27 John Darrington - * opcode/s12z.h: New file. + * opcode/s12z.h: New file. 2018-08-09 Richard Earnshaw @@ -19,7 +19,7 @@ Copy over from GCC 2018-07-26 Martin Liska - PR lto/86548 + PR lto/86548 * libiberty.h (make_temp_file_with_prefix): New function. 2018-07-30 Jim Wilson diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 79f52cfa297..137e34c81b3 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,12 +1,17 @@ -2018-07-28 John Darrington +2018-08-20 Alan Modra - * s12z-dis.c (bm_decode): Deal with cases where the mode is BM_RESERVED0 or BM_RESERVED1 - * s12z-dis.c (bm_rel_decode): ditto - * s12z-dis.c (bm_n_bytes): ditto + * sh-opc.h (MASK): Simplify. -2018-07-28 John Darrington +2018-07-28 John Darrington - * s12z.h: Delete. + * s12z-dis.c (bm_decode): Deal with cases where the mode is + BM_RESERVED0 or BM_RESERVED1 + * s12z-dis.c (bm_rel_decode): ditto + * s12z-dis.c (bm_n_bytes): ditto + +2018-07-28 John Darrington + + * s12z.h: Delete. 2018-08-14 H.J. Lu diff --git a/opcodes/sh-opc.h b/opcodes/sh-opc.h index 13d60561693..1ddb36c87a2 100644 --- a/opcodes/sh-opc.h +++ b/opcodes/sh-opc.h @@ -205,10 +205,7 @@ typedef enum sh_dsp_reg_nums; /* Return a mask with bits LO to HI (inclusive) set. */ -#define MASK(LO,HI) ( LO < 1 ? ((1U << (HI + 1)) - 1) \ - : HI > 30 ? (-1U << LO) \ - : LO == HI ? (1U << LO) \ - : (((1U << (HI + 1)) - 1) & (-1U << LO))) +#define MASK(LO,HI) ((1U << (HI) << 1) - (1U << (LO))) #define arch_sh1_base (1 << 0) #define arch_sh2_base (1 << 1) -- 2.30.2