summaryrefslogtreecommitdiff
path: root/opcodes/h8300-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/h8300-dis.c')
-rw-r--r--opcodes/h8300-dis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c
index 75d429e6204..c99b9f34989 100644
--- a/opcodes/h8300-dis.c
+++ b/opcodes/h8300-dis.c
@@ -140,7 +140,8 @@ extract_immediate (FILE *stream,
break;
case L_32:
*len = 32;
- *cst = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
+ *cst = (((unsigned) data[0] << 24) + (data[1] << 16)
+ + (data[2] << 8) + data[3]);
break;
default:
*len = 0;
@@ -530,7 +531,7 @@ bfd_h8_disassemble (bfd_vma addr, disassemble_info *info, int mach)
{
int i = len / 2;
- cst[opnr] = ((data[i] << 24)
+ cst[opnr] = (((unsigned) data[i] << 24)
| (data[i + 1] << 16)
| (data[i + 2] << 8)
| (data[i + 3]));