Skip to content

Commit

Permalink
sh: make constant unsigned to avoid narrowing
Browse files Browse the repository at this point in the history
Shifting into the sign bit of a 32 bit int and then converting to a unsigned
type is less straight forward than just shifting an unsigned value.

opcodes/ChangeLog:

2016-05-31  Trevor Saunders  <[email protected]>

	* sh-opc.h (ARCH_SH_HAS_DSP): Make the shifted value an unsigned
	constant.
  • Loading branch information
Trevor Saunders committed Jun 1, 2016
1 parent c799dec commit a2b5fcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions opcodes/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2016-05-31 Trevor Saunders <[email protected]>

* sh-opc.h (ARCH_SH_HAS_DSP): Make the shifted value an unsigned
constant.

2016-05-29 H.J. Lu <[email protected]>

PR gas/20145
Expand Down
2 changes: 1 addition & 1 deletion opcodes/sh-opc.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ sh_dsp_reg_nums;
#define arch_sh_no_co (1 << 28) /* Neither FPU nor DSP co-processor. */
#define arch_sh_sp_fpu (1 << 29) /* Single precision FPU. */
#define arch_sh_dp_fpu (1 << 30) /* Double precision FPU. */
#define arch_sh_has_dsp (1 << 31)
#define arch_sh_has_dsp (1u << 31)
#define arch_sh_co_mask MASK (28, 31)


Expand Down

0 comments on commit a2b5fcc

Please sign in to comment.