diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2002-12-01 11:02:10 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2002-12-01 11:02:10 +0000 |
commit | c9e03e8be9f3e216d282f5ad02c0b8c8d15405ed (patch) | |
tree | 28be5cc9281b3d43fd3ba50666b23aea59291c24 /gas/config/tc-m68hc11.h | |
parent | 2f9046641f748e9a27c97759570dcb983cbab4e9 (diff) | |
download | gdb-c9e03e8be9f3e216d282f5ad02c0b8c8d15405ed.zip gdb-c9e03e8be9f3e216d282f5ad02c0b8c8d15405ed.tar.gz gdb-c9e03e8be9f3e216d282f5ad02c0b8c8d15405ed.tar.bz2 |
Fix Bug savannah/1825:
* config/tc-m68hc11.h (md_relax_frag): Define to support relaxations
that are not pc-relative.
(m68hc11_relax_frag): Declare.
* config/tc-m68hc11.c (build_indexed_byte): Use a frag_var to handle
the offsetable indexed addressing modes (n,r).
(build_insn): Cleanup some locals.
(m68hc11_relax_frag): New function imported from tc-cris.c to handle
relaxation of difference between two symbols of same section.
(md_convert_frag): For INDEXED_OFFSET relaxs, use the displacement
only when this is a PC-relative operand and the offset is not absolute.
(md_estimate_size_before_relax): Convert the INDEXED_OFFSET,UNDEF frag
to INDEXED_OFFSET,STATE_BITS5 when the symbol is absolute; this will
be handled by m68hc11_relax_frag.
Diffstat (limited to 'gas/config/tc-m68hc11.h')
-rw-r--r-- | gas/config/tc-m68hc11.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/tc-m68hc11.h b/gas/config/tc-m68hc11.h index c57637f..e7ea44c 100644 --- a/gas/config/tc-m68hc11.h +++ b/gas/config/tc-m68hc11.h @@ -93,6 +93,15 @@ extern int m68hc11_parse_long_option PARAMS ((char *)); #define TC_GENERIC_RELAX_TABLE md_relax_table extern struct relax_type md_relax_table[]; +/* GAS only handles relaxations for pc-relative data targeting addresses + in the same segment, so we have to handle the rest on our own. */ +#define md_relax_frag(SEG, FRAGP, STRETCH) \ + ((FRAGP)->fr_symbol != NULL \ + && S_GET_SEGMENT ((FRAGP)->fr_symbol) == (SEG) \ + ? relax_frag (SEG, FRAGP, STRETCH) \ + : m68hc11_relax_frag (SEG, FRAGP, STRETCH)) +extern long m68hc11_relax_frag PARAMS ((segT, fragS*, long)); + #define TC_HANDLES_FX_DONE #define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */ |