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".
(pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands.
(pa_parse_ftest_gfx_completer): New function
/* Handle a short load/store completer. */
case 'm':
+ case 'q':
{
int a = 0;
int m = 0;
s += 2;
}
- opcode |= m << 5;
- INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
+ /* 'm' and 'q' are the same, except for where they encode
+ the before/after field. */
+ if (*args == 'm')
+ {
+ opcode |= m << 5;
+ 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. */
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. */
case 'j':