diff options
author | Nick Clifton <nickc@redhat.com> | 2002-04-25 10:59:24 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-04-25 10:59:24 +0000 |
commit | 5214f0722ebf00a378bd3748f0db87146aabbc17 (patch) | |
tree | 3008cf2ca19f8dddaeb724ab2d578594ea7ba9db /gas/config/tc-z8k.c | |
parent | 4f7cb6d91899caeee3f6b65cfb490c23463a367f (diff) | |
download | binutils-redhat-5214f0722ebf00a378bd3748f0db87146aabbc17.tar.gz |
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/tc-z8k.c')
-rw-r--r-- | gas/config/tc-z8k.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index f5b05a632f..78a666c821 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 |