aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-04-25 10:59:24 +0000
committerNick Clifton <nickc@redhat.com>2002-04-25 10:59:24 +0000
commit3c25c5f6e8cec6d81e1576e2680767e30a17518f (patch)
treed9cee69823d148950242641f909f06c2bf6b10f5 /gas/config
parent95b80706953a70706f105907c5bb8b8ffb4f844f (diff)
downloadgdb-3c25c5f6e8cec6d81e1576e2680767e30a17518f.zip
gdb-3c25c5f6e8cec6d81e1576e2680767e30a17518f.tar.gz
gdb-3c25c5f6e8cec6d81e1576e2680767e30a17518f.tar.bz2
The patch contains mostly fixes for the disassembler. It also fixes
a crash of the assembler with some malformed source input. Long segmented addresses are now correctly relocated. Finally it updates my email address in the MAINTAINERS file.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-z8k.c25
1 files changed, 16 insertions, 9 deletions
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