mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
* config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'.
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com)
|
Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'.
|
||||||
|
|
||||||
* config/tc-hppa.c (struct pa_it): New field "trunc".
|
* config/tc-hppa.c (struct pa_it): New field "trunc".
|
||||||
(pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands.
|
(pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands.
|
||||||
(pa_parse_ftest_gfx_completer): New function
|
(pa_parse_ftest_gfx_completer): New function
|
||||||
|
@ -1785,6 +1785,7 @@ pa_ip (str)
|
|||||||
|
|
||||||
/* Handle a short load/store completer. */
|
/* Handle a short load/store completer. */
|
||||||
case 'm':
|
case 'm':
|
||||||
|
case 'q':
|
||||||
{
|
{
|
||||||
int a = 0;
|
int a = 0;
|
||||||
int m = 0;
|
int m = 0;
|
||||||
@ -1809,9 +1810,19 @@ pa_ip (str)
|
|||||||
s += 2;
|
s += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 'm' and 'q' are the same, except for where they encode
|
||||||
|
the before/after field. */
|
||||||
|
if (*args == 'm')
|
||||||
|
{
|
||||||
opcode |= m << 5;
|
opcode |= m << 5;
|
||||||
INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
|
INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
|
||||||
}
|
}
|
||||||
|
else if (*args == 'q')
|
||||||
|
{
|
||||||
|
opcode |= m << 3;
|
||||||
|
INSERT_FIELD_AND_CONTINUE (opcode, a, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle a stbys completer. */
|
/* Handle a stbys completer. */
|
||||||
case 's':
|
case 's':
|
||||||
@ -2789,6 +2800,64 @@ pa_ip (str)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle 14 bit immediated, shifted left three times. */
|
||||||
|
case '#':
|
||||||
|
the_insn.field_selector = pa_chk_field_selector (&s);
|
||||||
|
get_expression (s);
|
||||||
|
s = expr_end;
|
||||||
|
if (the_insn.exp.X_op == O_constant)
|
||||||
|
{
|
||||||
|
num = evaluate_absolute (&the_insn);
|
||||||
|
if (num & 0x7)
|
||||||
|
break;
|
||||||
|
CHECK_FIELD (num, 8191, -8192, 0);
|
||||||
|
if (num < 0)
|
||||||
|
opcode |= 1;
|
||||||
|
num &= 0x1fff;
|
||||||
|
num >>= 3;
|
||||||
|
INSERT_FIELD_AND_CONTINUE (opcode, num, 4);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (is_DP_relative (the_insn.exp))
|
||||||
|
the_insn.reloc = R_HPPA_GOTOFF;
|
||||||
|
else if (is_PC_relative (the_insn.exp))
|
||||||
|
the_insn.reloc = R_HPPA_PCREL_CALL;
|
||||||
|
else
|
||||||
|
the_insn.reloc = R_HPPA;
|
||||||
|
the_insn.format = 14;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* Handle 14 bit immediate, shifted left twice. */
|
||||||
|
case 'd':
|
||||||
|
the_insn.field_selector = pa_chk_field_selector (&s);
|
||||||
|
get_expression (s);
|
||||||
|
s = expr_end;
|
||||||
|
if (the_insn.exp.X_op == O_constant)
|
||||||
|
{
|
||||||
|
num = evaluate_absolute (&the_insn);
|
||||||
|
if (num & 0x3)
|
||||||
|
break;
|
||||||
|
CHECK_FIELD (num, 8191, -8192, 0);
|
||||||
|
if (num < 0)
|
||||||
|
opcode |= 1;
|
||||||
|
num &= 0x1fff;
|
||||||
|
num >>= 2;
|
||||||
|
INSERT_FIELD_AND_CONTINUE (opcode, num, 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (is_DP_relative (the_insn.exp))
|
||||||
|
the_insn.reloc = R_HPPA_GOTOFF;
|
||||||
|
else if (is_PC_relative (the_insn.exp))
|
||||||
|
the_insn.reloc = R_HPPA_PCREL_CALL;
|
||||||
|
else
|
||||||
|
the_insn.reloc = R_HPPA;
|
||||||
|
the_insn.format = 14;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle a 14 bit immediate at 31. */
|
/* Handle a 14 bit immediate at 31. */
|
||||||
case 'j':
|
case 'j':
|
||||||
|
Reference in New Issue
Block a user