summaryrefslogtreecommitdiff
path: root/opcodes/lm32-ibld.c
diff options
context:
space:
mode:
authorDoug Evans <dje@sebabeach.org>2010-01-06 05:30:18 +0000
committerDoug Evans <dje@sebabeach.org>2010-01-06 05:30:18 +0000
commitf53a05106307adfdafa1e510244f723584d2eb47 (patch)
treed5065a339a27501d65c31eb9379e534c70215acf /opcodes/lm32-ibld.c
parent892c25aa02ce336f06bb4c4830b493c2cf0dc027 (diff)
downloadbinutils-redhat-f53a05106307adfdafa1e510244f723584d2eb47.tar.gz
cpu/
* m32c.cpu (f-dsp-32-u24): Fix mode of extract handler. (f-dsp-40-u20, f-dsp-40-u24): Ditto. opcodes/ * cgen-ibld.in: #include "cgen/basic-modes.h". * fr30-ibld.c, * frv-ibld.c, * ip2k-ibld.c, * iq2000-ibld.c, * lm32-ibld.c, * m32c-ibld.c, * m32r-ibld.c, * mep-ibld.c, * mt-ibld.c, * openrisc-ibld.c, * xc16x-ibld.c, * xstormy16-ibld.c: Regenerate.
Diffstat (limited to 'opcodes/lm32-ibld.c')
-rw-r--r--opcodes/lm32-ibld.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/opcodes/lm32-ibld.c b/opcodes/lm32-ibld.c
index d3e4e6f31a..c9f8229701 100644
--- a/opcodes/lm32-ibld.c
+++ b/opcodes/lm32-ibld.c
@@ -33,6 +33,7 @@
#include "symcat.h"
#include "lm32-desc.h"
#include "lm32-opc.h"
+#include "cgen/basic-modes.h"
#include "opintl.h"
#include "safe-ctype.h"
@@ -568,14 +569,14 @@ lm32_cgen_insert_operand (CGEN_CPU_DESC cd,
case LM32_OPERAND_BRANCH :
{
long value = fields->f_branch;
- value = ((int) (((value) - (pc))) >> (2));
+ value = ((SI) (((value) - (pc))) >> (2));
errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, buffer);
}
break;
case LM32_OPERAND_CALL :
{
long value = fields->f_call;
- value = ((int) (((value) - (pc))) >> (2));
+ value = ((SI) (((value) - (pc))) >> (2));
errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 25, 26, 32, total_length, buffer);
}
break;
@@ -671,7 +672,7 @@ lm32_cgen_extract_operand (CGEN_CPU_DESC cd,
{
long value;
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, pc, & value);
- value = ((pc) + (((int) (((value) << (16))) >> (14))));
+ value = ((pc) + (((SI) (((value) << (16))) >> (14))));
fields->f_branch = value;
}
break;
@@ -679,7 +680,7 @@ lm32_cgen_extract_operand (CGEN_CPU_DESC cd,
{
long value;
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 25, 26, 32, total_length, pc, & value);
- value = ((pc) + (((int) (((value) << (6))) >> (4))));
+ value = ((pc) + (((SI) (((value) << (6))) >> (4))));
fields->f_call = value;
}
break;