diff options
author | Colin Schmidt <colins@eecs.berkeley.edu> | 2014-12-14 17:27:57 -0800 |
---|---|---|
committer | Colin Schmidt <colins@eecs.berkeley.edu> | 2014-12-14 17:30:40 -0800 |
commit | 2e325497c6366eb5e327837f5624426e3a8660fb (patch) | |
tree | e7a8034b6b289b7455ae77b109e8836e538b88e7 /binutils | |
parent | 795c04ea67f41281501cf54a145bc995b1c395ad (diff) | |
download | riscv-gnu-toolchain-2e325497c6366eb5e327837f5624426e3a8660fb.zip riscv-gnu-toolchain-2e325497c6366eb5e327837f5624426e3a8660fb.tar.gz riscv-gnu-toolchain-2e325497c6366eb5e327837f5624426e3a8660fb.tar.bz2 |
binutils: update insert_bits to work for wider instructions
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/gas/config/tc-riscv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/gas/config/tc-riscv.c b/binutils/gas/config/tc-riscv.c index e861109..dcdb44a 100644 --- a/binutils/gas/config/tc-riscv.c +++ b/binutils/gas/config/tc-riscv.c @@ -251,8 +251,8 @@ static char *insn_error; /* Replace bits MASK << SHIFT of STRUCT with the equivalent bits in VALUE << SHIFT. VALUE is evaluated exactly once. */ #define INSERT_BITS(STRUCT, VALUE, MASK, SHIFT) \ - (STRUCT) = (((STRUCT) & ~((MASK) << (SHIFT))) \ - | (((VALUE) & (MASK)) << (SHIFT))) + (STRUCT) = (((STRUCT) & ~((insn_t)(MASK) << (SHIFT))) \ + | ((insn_t)((VALUE) & (MASK)) << (SHIFT))) /* Extract bits MASK << SHIFT from STRUCT and shift them right SHIFT places. */ |