+Thu Jul 7 17:04:03 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * gasp.c (get_any_string): Cope with getting a string with an
+ alternate base specifier.
+ (do_aif, do_aelse): Only enable output if expression is true and previous
+ level was on.
+ (chartype_init): Add BASEBIT chartype.
+ (process_pseudo_op): Notice nesteed AIFs.
+
+Thu Jul 7 12:30:22 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * h8300.c (do_a_fix_imm): Code for 2 bit reloc type using in trapa
+ insn. (fix pr 5165, 5174)
+
Thu Jul 7 11:31:32 1994 Jeff Law (law@snake.cs.utah.edu)
+ * config/tc-hppa.c (R_DLT_REL): If it isn't defined, then define
+ to an appropriate value to avoid losing on old hpux systems.
+
* config/tc-hppa.c (hppa_fix_adjustable): Reject reductions for
symbols in DLT relative relocs.
(tc_gen_reloc): Zero out the addend field for DLT relative relocs.
#define SEPBIT 4
#define WHITEBIT 8
#define COMMENTBIT 16
-
+#define BASEBIT 32
#define ISCOMMENTCHAR(x) (chartype[(unsigned)(x)] & COMMENTBIT)
#define ISFIRSTCHAR(x) (chartype[(unsigned)(x)] & FIRSTBIT)
#define ISNEXTCHAR(x) (chartype[(unsigned)(x)] & NEXTBIT)
#define ISSEP(x) (chartype[(unsigned)(x)] & SEPBIT)
#define ISWHITE(x) (chartype[(unsigned)(x)] & WHITEBIT)
-
+#define ISBASE(x) (chartype[(unsigned)(x)] & BASEBIT)
static char chartype[256];
expression precedence:
( )
unary + - ~
-* /
-+ -
-&
-| ~
+ * /
+ + -
+ &
+ | ~
*/
sb_reset (out);
idx = sb_skip_white (idx, in);
-
if (idx < in->len)
{
- if (in->ptr[idx] == '%'
- && alternate
- && expand)
+ if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx]))
+ {
+ while (!ISSEP (in->ptr[idx]))
+ sb_add_char (out, in->ptr[idx++]);
+ }
+ else if (in->ptr[idx] == '%'
+ && alternate
+ && expand)
{
int val;
char buf[20];
sprintf(buf, "%d", val);
sb_add_string (out, buf);
}
- else if (in->ptr[idx] == '"'
- || in->ptr[idx] == '<'
- || (alternate && in->ptr[idx] == '\''))
+ else if (in->ptr[idx] == '"'
+ || in->ptr[idx] == '<'
+ || (alternate && in->ptr[idx] == '\''))
{
if (alternate && !expand)
{
/* Keep the quotes */
-/* sb_add_char (out, '\"');*/
+ /* sb_add_char (out, '\"');*/
idx = getstring (idx, in, out);
-/* sb_add_char (out, '\"');*/
+ /* sb_add_char (out, '\"');*/
}
else {
while (idx < in->len
&& in->ptr[idx] != tchar)
sb_add_char (out, in->ptr[idx++]);
+ if (idx == in->len)
+ return idx;
}
sb_add_char (out, in->ptr[idx++]);
-
}
}
}
+
return idx;
}
FATAL ((stderr, "AIF nesting unreasonable.\n"));
}
ifi++;
- ifstack[ifi].on = istrue (idx, in);
+ ifstack[ifi].on = ifstack[ifi-1].on ? istrue (idx, in) : 0;
ifstack[ifi].hadelse = 0;
}
static void
do_aelse ()
{
- ifstack[ifi].on = !ifstack[ifi].on;
+ ifstack[ifi].on = ifstack[ifi-1].on ? !ifstack[ifi].on : 0;
if (ifstack[ifi].hadelse)
{
ERROR ((stderr, "Multiple AELSEs in AIF.\n"));
|| x == '"' || x == '<' || x == '>' || x == ')' || x == '(')
chartype[x] |= SEPBIT;
+ if (x == 'b' || x == 'B'
+ || x == 'q' || x == 'Q'
+ || x == 'h' || x == 'H'
+ || x == 'd' || x == 'D')
+ chartype [x] |= BASEBIT;
+
if (x == ' ' || x == '\t')
chartype[x] |= WHITEBIT;
{
switch (ptr->value.i)
{
+ case K_AIF:
+ do_aif ();
+ break;
case K_AELSE:
do_aelse ();
break;