diff options
Diffstat (limited to 'gas/config/tc-avr.h')
-rw-r--r-- | gas/config/tc-avr.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/gas/config/tc-avr.h b/gas/config/tc-avr.h index 61fc5941cd23..02f82896531f 100644 --- a/gas/config/tc-avr.h +++ b/gas/config/tc-avr.h @@ -1,5 +1,6 @@ /* This file is tc-avr.h - Copyright 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2005, 2006, 2007 + Free Software Foundation, Inc. Contributed by Denis Chertykov <denisc@overta.ru> @@ -109,7 +110,7 @@ extern long md_pcrel_from_section (struct fix *, segT); would print `12 34 56 78'. The default value is 4. */ #define LISTING_WORD_SIZE 2 -/* AVR port uses `$' as a logical line separator */ +/* AVR port uses `$' as a logical line separator. */ #define LEX_DOLLAR 0 /* An `.lcomm' directive with no explicit alignment parameter will @@ -125,16 +126,24 @@ extern long md_pcrel_from_section (struct fix *, segT); We will need them in case that we want to do linker relaxation. We could in principle keep these fixups in gas when not relaxing. However, there is no serious performance penilty when making the linker - make the fixup work. */ -#define TC_VALIDATE_FIX(FIXP,SEG,SKIP) \ - if ( (FIXP->fx_r_type == BFD_RELOC_AVR_7_PCREL \ - || FIXP->fx_r_type == BFD_RELOC_AVR_13_PCREL \ - || FIXP->fx_r_type == BFD_RELOC_AVR_LO8_LDI_PM \ - || FIXP->fx_r_type == BFD_RELOC_AVR_HI8_LDI_PM \ - || FIXP->fx_r_type == BFD_RELOC_AVR_HH8_LDI_PM \ - || FIXP->fx_r_type == BFD_RELOC_AVR_16_PM) \ - && (FIXP->fx_addsy)) \ - { \ - goto SKIP; \ + make the fixup work. Check also that fx_addsy is not NULL, in order to make + sure that the fixup refers to some sort of lable. */ +#define TC_VALIDATE_FIX(FIXP,SEG,SKIP) \ + if ( (FIXP->fx_r_type == BFD_RELOC_AVR_7_PCREL \ + || FIXP->fx_r_type == BFD_RELOC_AVR_13_PCREL \ + || FIXP->fx_r_type == BFD_RELOC_AVR_LO8_LDI_PM \ + || FIXP->fx_r_type == BFD_RELOC_AVR_LO8_LDI_GS \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HI8_LDI_PM \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HI8_LDI_GS \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HH8_LDI_PM \ + || FIXP->fx_r_type == BFD_RELOC_AVR_LO8_LDI_PM_NEG \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HI8_LDI_PM_NEG \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HH8_LDI_PM_NEG \ + || FIXP->fx_r_type == BFD_RELOC_AVR_16_PM) \ + && (FIXP->fx_addsy)) \ + { \ + goto SKIP; \ } +/* This target is buggy, and sets fix size too large. */ +#define TC_FX_SIZE_SLACK(FIX) 2 |