diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-03-24 23:34:45 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-03-24 23:34:45 +0000 |
commit | dddc8a823d98a8b09119dc3b59b39b64d56b652e (patch) | |
tree | 93e458586d3a098300a6407bb5a690f0001070bf | |
parent | 3173839b6a4ca56be7fb6109f53713405902e7c6 (diff) | |
download | gdb-dddc8a823d98a8b09119dc3b59b39b64d56b652e.zip gdb-dddc8a823d98a8b09119dc3b59b39b64d56b652e.tar.gz gdb-dddc8a823d98a8b09119dc3b59b39b64d56b652e.tar.bz2 |
Tue Mar 24 18:30:58 1998 H.J. Lu <hjl@gnu.org>
* config/tc-i386.h (LinearAddress): Define.
* config/tc-i386.c (md_assemble): If LinearAddress is set for the
instruction, don't use a default segment.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 21 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 17 |
3 files changed, 36 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d6fc7fe..3712561 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Tue Mar 24 18:30:58 1998 H.J. Lu <hjl@gnu.org> + + * config/tc-i386.h (LinearAddress): Define. + * config/tc-i386.c (md_assemble): If LinearAddress is set for the + instruction, don't use a default segment. + Mon Mar 23 18:53:40 1998 Joel Sherrill <joel@OARcorp.com> * configure.in: (sh*-*-rtems*): Switched from ELF to COFF. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index cec18e7..ea57da8 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1,5 +1,6 @@ /* i386.c -- Assemble code for the Intel 80386 - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation. + Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 1998 + Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -1542,9 +1543,10 @@ md_assemble (line) exp->X_op_symbol = (symbolS *) 0; } - /* Find the default segment for the memory operand. - Used to optimize out explicit segment specifications. */ - if (i.seg) + /* Find the default segment for the memory + operand. Used to optimize out explicit segment + specifications. */ + if (i.seg && (t->opcode_modifier & LinearAddress) == 0) { unsigned int seg_index; @@ -2113,8 +2115,15 @@ i386_operand (operand_string) SKIP_WHITESPACE (); exp_seg = expression (exp); if (*input_line_pointer != '\0') - as_bad ("unrecognized characters `%s' in expression", - input_line_pointer); + { + /* This should be as_bad, but some versions of gcc, up to + about 2.8 and egcs 1.01, generate a bogus @GOTOFF(%ebx) + in certain cases. Oddly, the code in question turns out + to work correctly anyhow, so we make this just a warning + until those versions of gcc are obsolete. */ + as_warn ("warning: unrecognized characters `%s' in expression", + input_line_pointer); + } input_line_pointer = save_input_line_pointer; if (exp->X_op == O_absent) diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index 51bbb46..2fc3605 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -1,5 +1,5 @@ /* tc-i386.h -- Header file for tc-i386.c - Copyright (C) 1989, 92, 93, 94, 95, 96, 1997 Free Software Foundation. + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -243,6 +243,7 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag)); #define Abs16 0x10000000 #define Abs32 0x20000000 #define Abs (Abs8|Abs16|Abs32) +#define RegMMX 0x40000000 /* MMX register */ #define Byte (Reg8|Imm8|Imm8S) #define Word (Reg16|Imm16) @@ -295,6 +296,8 @@ typedef struct #define ReverseRegRegmem 0x10000 #define Data16 0x20000 /* needs data prefix if in 32-bit mode */ #define Data32 0x40000 /* needs data prefix if in 16-bit mode */ +#define iclrKludge 0x80000 /* used to convert clr to xor */ +#define LinearAddress 0x100000 /* uses linear address (no segment) */ /* (opcode_modifier & COMES_IN_ALL_SIZES) is true if the instuction comes in byte, word, and dword sizes and is encoded into @@ -396,10 +399,18 @@ extern const struct relax_type md_relax_table[]; extern int flag_16bit_code; +#ifdef BFD_ASSEMBLER +#define md_maybe_text() \ + ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) +#else +#define md_maybe_text() \ + (now_seg != data_section && now_seg != bss_section) +#endif + #define md_do_align(n, fill, len, max, around) \ if ((n) && !need_pass_2 \ && (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \ - && now_seg != data_section && now_seg != bss_section) \ + && md_maybe_text ()) \ { \ char *p; \ p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \ @@ -429,4 +440,6 @@ void i386_print_statistics PARAMS ((FILE *)); extern void sco_id PARAMS ((void)); #endif +#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */ + /* end of tc-i386.h */ |