aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-cris.h
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-10-22 23:45:40 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-10-22 23:45:40 +0000
commit1c97116001da973fe984d0832e7981ab5dac6c20 (patch)
tree425ef77b93a14ad5f79f5bd7629a2605d3151556 /gas/config/tc-cris.h
parentc84e5117321e3cb97f782629612f85786bbf815d (diff)
downloadgdb-1c97116001da973fe984d0832e7981ab5dac6c20.zip
gdb-1c97116001da973fe984d0832e7981ab5dac6c20.tar.gz
gdb-1c97116001da973fe984d0832e7981ab5dac6c20.tar.bz2
* config/tc-cris.c (SIMPLE_EXPR): New macro.
(cris_relax_frag): New function. (md_estimate_size_before_relax) <case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_UNDF)>: Pass on unresolved expressions that will become absolute expressions to relaxation. (md_convert_frag) <case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_WORD)>: Expect only absolute expressions. Use the symbol value, not distance to symbol. <case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_BYTE)>: Ditto. Correct placement of fixup. (md_assemble): Use SIMPLE_EXPR when dissecting expressions. (gen_bdap): Ditto. * config/tc-cris.h (cris_relax_frag): Declare. (md_relax_frag): Define.
Diffstat (limited to 'gas/config/tc-cris.h')
-rw-r--r--gas/config/tc-cris.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gas/config/tc-cris.h b/gas/config/tc-cris.h
index d20e0a8..b07f6de 100644
--- a/gas/config/tc-cris.h
+++ b/gas/config/tc-cris.h
@@ -75,6 +75,16 @@ extern const int md_long_jump_size;
extern const struct relax_type md_cris_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_cris_relax_table
+long cris_relax_frag PARAMS ((segT, fragS *, long));
+
+/* 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) \
+ : cris_relax_frag (SEG, FRAGP, STRETCH))
+
#define TC_FORCE_RELOCATION(FIX) md_cris_force_relocation (FIX)
extern int md_cris_force_relocation PARAMS ((struct fix *));