* pj-opc.c: Update copyright date.
+2003-12-04 Alan Modra <amodra@bigpond.net.au>
+
+ * openrisc-asm.c: Regenerate.
+ * pj-opc.c: Update copyright date.
+
2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* m32r-asm.c: Regenerate.
2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* m32r-asm.c: Regenerate.
openrisc_sign_extend_16bit (value)
long value;
{
openrisc_sign_extend_16bit (value)
long value;
{
- return (long) (short) value;
+ return ((value & 0xffff) ^ 0x8000) - 0x8000;
{
const char *errmsg;
enum cgen_parse_operand_result result_type;
{
const char *errmsg;
enum cgen_parse_operand_result result_type;
if (**strp == '#')
++*strp;
if (strncasecmp (*strp, "hi(", 3) == 0)
{
if (**strp == '#')
++*strp;
if (strncasecmp (*strp, "hi(", 3) == 0)
{
#if 0
errmsg = cgen_parse_signed_integer (cd, strp, opindex, valuep);
if (errmsg != NULL)
#if 0
errmsg = cgen_parse_signed_integer (cd, strp, opindex, valuep);
if (errmsg != NULL)
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16,
&result_type, &value);
if (**strp != ')')
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16,
&result_type, &value);
if (**strp != ')')
+ return _("missing `)'");
+
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
value >>= 16;
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
value >>= 16;
- *valuep = (long) (short) value;
-
- return errmsg;
}
else
{
if (**strp == '-')
}
else
{
if (**strp == '-')
- errmsg = cgen_parse_signed_integer (cd, strp, opindex, (long *) &value);
+ {
+ long value;
+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value);
+ ret = value;
+ }
- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, (unsigned long *) &value);
+ {
+ unsigned long value;
+ errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, &value);
+ ret = value;
+ }
- *valuep = (long) (short) (value & 0xffff);
+
+ *valuep = ((ret & 0xffff) ^ 0x8000) - 0x8000;
{
const char *errmsg;
enum cgen_parse_operand_result result_type;
{
const char *errmsg;
enum cgen_parse_operand_result result_type;
if (**strp == '#')
++*strp;
if (strncasecmp (*strp, "lo(", 3) == 0)
{
if (**strp == '#')
++*strp;
if (strncasecmp (*strp, "lo(", 3) == 0)
{
#if 0
errmsg = cgen_parse_signed_integer (cd, strp, opindex, valuep);
if (errmsg != NULL)
#if 0
errmsg = cgen_parse_signed_integer (cd, strp, opindex, valuep);
if (errmsg != NULL)
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16,
&result_type, &value);
if (**strp != ')')
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16,
&result_type, &value);
if (**strp != ')')
- return "missing `)'";
- ++*strp;
- if (errmsg == NULL
- && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- value &= 0xffff;
- *valuep = (long) (short) value;
+ return _("missing `)'");
+ ++*strp;
+ ret = value;
-
- if (**strp == '-')
- errmsg = cgen_parse_signed_integer (cd, strp, opindex, (long *) &value);
- errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, (unsigned long *) &value);
- *valuep = (long) (short) (value & 0xffff);
+ {
+ if (**strp == '-')
+ {
+ long value;
+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, &value);
+ ret = value;
+ }
+ else
+ {
+ unsigned long value;
+ errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, &value);
+ ret = value;
+ }
+ }
+
+ *valuep = ((ret & 0xffff) ^ 0x8000) - 0x8000;
/* pj-opc.c -- Definitions for picoJava opcodes.
/* pj-opc.c -- Definitions for picoJava opcodes.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Steve Chamberlain of Transmeta (sac@pobox.com).
This program is free software; you can redistribute it and/or modify
Contributed by Steve Chamberlain of Transmeta (sac@pobox.com).
This program is free software; you can redistribute it and/or modify