From 9f6dcdfe42b6fe0283876d4388e4d3cd838e26f7 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Wed, 26 Oct 2011 12:46:03 +0000 Subject: cpu: * epiphany.opc (parse_branch_addr): Fix type of valuep. Cast value before printing it as a long. (parse_postindex): Fix type of valuep. opcodes: * epiphany-asm.c, epiphany-opc.h: Regenerate. --- cpu/ChangeLog | 6 ++++++ cpu/epiphany.opc | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'cpu') diff --git a/cpu/ChangeLog b/cpu/ChangeLog index 857a81ea3e5..d04a554a715 100644 --- a/cpu/ChangeLog +++ b/cpu/ChangeLog @@ -1,3 +1,9 @@ +2011-10-26 Joern Rennecke + + * epiphany.opc (parse_branch_addr): Fix type of valuep. + Cast value before printing it as a long. + (parse_postindex): Fix type of valuep. + 2011-10-25 Joern Rennecke * cpu/epiphany.cpu: New file. diff --git a/cpu/epiphany.opc b/cpu/epiphany.opc index 22e2f7635f9..df81f30db38 100755 --- a/cpu/epiphany.opc +++ b/cpu/epiphany.opc @@ -78,7 +78,7 @@ extern const char * parse_branch_addr (CGEN_CPU_DESC cd, int opindex, int opinfo, enum cgen_parse_operand_result * resultp, - unsigned long * valuep); + bfd_vma *valuep); /* Allows reason codes to be output when assembler errors occur. */ #define CGEN_VERBOSE_ASSEMBLER_ERRORS @@ -172,7 +172,7 @@ static const char * parse_postindex (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, const char ** strp, int opindex ATTRIBUTE_UNUSED, - bfd_vma * valuep) + unsigned long *valuep) { if (**strp == '#') ++*strp; /* Skip leading hashes. */ @@ -288,7 +288,7 @@ parse_branch_addr (CGEN_CPU_DESC cd, int opindex, int opinfo ATTRIBUTE_UNUSED, enum cgen_parse_operand_result * resultp ATTRIBUTE_UNUSED, - unsigned long * valuep ATTRIBUTE_UNUSED) + bfd_vma *valuep ATTRIBUTE_UNUSED) { const char * errmsg; enum cgen_parse_operand_result result_type; @@ -320,7 +320,7 @@ parse_branch_addr (CGEN_CPU_DESC cd, char buf[20]; const char * bufp = (const char *) buf; - sprintf (buf, ".+%ld", value); + sprintf (buf, ".+%ld", (long) value); errmsg = cgen_parse_address (cd, &bufp, opindex, code, &result_type, &value); } -- cgit v1.2.1