aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-z8k.c25
2 files changed, 23 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4940d12..8e49888 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-24 Christian Groessler <chris@groessler.org>
+
+ * config/tc-z8k.c (build_bytes): Add support for new cases:
+ CLASS_IGNORE and ARG_NIM4.
+ (md_assemble): Prevent destruction of input_line_pointer if
+ get_operands returns failure.
+
2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
* config/tc-mips.c (macro_build): Do _not_ allow MIPS-3D
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c
index f5b05a6..78a666c 100644
--- a/gas/config/tc-z8k.c
+++ b/gas/config/tc-z8k.c
@@ -1,5 +1,5 @@
/* tc-z8k.c -- Assemble code for the Zilog Z800n
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1081,6 +1081,7 @@ build_bytes (this_try, operand)
case CLASS_FLAGS:
*output_ptr++ = the_flags;
break;
+ case CLASS_IGNORE:
case CLASS_BIT:
*output_ptr++ = c & 0xf;
break;
@@ -1116,6 +1117,9 @@ build_bytes (this_try, operand)
nib = 0;
switch (c & ARG_MASK)
{
+ case ARG_NIM4:
+ imm_operand->X_add_number = -imm_operand->X_add_number;
+ /* Drop through. */
case ARG_IMM4:
output_ptr = apply_fix (output_ptr, R_IMM4L, imm_operand, 1);
break;
@@ -1205,14 +1209,13 @@ md_assemble (str)
if (opcode->opcode == 250)
{
- /* Was really a pseudo op. */
-
pseudo_typeS *p;
char oc;
-
char *old = input_line_pointer;
*op_end = c;
+ /* Was really a pseudo op. */
+
input_line_pointer = op_end;
oc = *old;
@@ -1227,7 +1230,11 @@ md_assemble (str)
}
else
{
- input_line_pointer = get_operands (opcode, op_end, operand);
+ char *new_input_line_pointer;
+
+ new_input_line_pointer = get_operands (opcode, op_end, operand);
+ if (new_input_line_pointer)
+ input_line_pointer = new_input_line_pointer;
prev_opcode = opcode;
opcode = get_specific (opcode, operand);
@@ -1335,9 +1342,10 @@ md_atof (type, litP, sizeP)
CONST char *md_shortopts = "z:";
-struct option md_longopts[] = {
- {NULL, no_argument, NULL, 0}
-};
+struct option md_longopts[] =
+ {
+ {NULL, no_argument, NULL, 0}
+ };
size_t md_longopts_size = sizeof (md_longopts);
@@ -1401,7 +1409,6 @@ md_section_align (seg, size)
{
return ((size + (1 << section_alignment[(int) seg]) - 1)
& (-1 << section_alignment[(int) seg]));
-
}
void