diff options
author | Alan Modra <amodra@gmail.com> | 2007-06-05 00:28:04 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-06-05 00:28:04 +0000 |
commit | 353ab8610a05f3a40b32c4fc1e11a44b53d3051d (patch) | |
tree | 5e5cb66c2b9661acff94eb580c93fa840bb65051 /gas | |
parent | 7354508966632da6f4ca9667b242a8118b8bd531 (diff) | |
download | gdb-353ab8610a05f3a40b32c4fc1e11a44b53d3051d.zip gdb-353ab8610a05f3a40b32c4fc1e11a44b53d3051d.tar.gz gdb-353ab8610a05f3a40b32c4fc1e11a44b53d3051d.tar.bz2 |
* config/tc-spu.c (spu_cons): Use deferred_expression. Handle
number@ppu.
(tc_gen_reloc): Abort if neither addsy or subsy is set.
(md_apply_fix): Don't attempt to resolve SPU_PPU relocs.
* config/tc-spu.h (md_operand): Handle @ppu without sym.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-spu.c | 11 | ||||
-rw-r--r-- | gas/config/tc-spu.h | 14 |
3 files changed, 29 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9225ad0..24bb920 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2007-06-05 Alan Modra <amodra@bigpond.net.au> + + * config/tc-spu.c (spu_cons): Use deferred_expression. Handle + number@ppu. + (tc_gen_reloc): Abort if neither addsy or subsy is set. + (md_apply_fix): Don't attempt to resolve SPU_PPU relocs. + * config/tc-spu.h (md_operand): Handle @ppu without sym. + 2007-05-31 Paul Brook <paul@codesourcery.com> * config/tc-arm.c (insns): Allow strex on M profile cores. diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c index 995a023..ef801df 100644 --- a/gas/config/tc-spu.c +++ b/gas/config/tc-spu.c @@ -820,8 +820,9 @@ spu_cons (int nbytes) do { - expression (&exp); - if (exp.X_op == O_symbol + deferred_expression (&exp); + if ((exp.X_op == O_symbol + || exp.X_op == O_constant) && strncasecmp (input_line_pointer, "@ppu", 4) == 0) { char *p = frag_more (nbytes); @@ -873,6 +874,8 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp) *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); else if (fixp->fx_subsy) *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy); + else + abort (); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); if (reloc->howto == (reloc_howto_type *) NULL) @@ -987,6 +990,10 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) fixP->fx_addnumber = val; + if (fixP->fx_r_type == BFD_RELOC_SPU_PPU32 + || fixP->fx_r_type == BFD_RELOC_SPU_PPU64) + return; + if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0) { fixP->fx_done = 1; diff --git a/gas/config/tc-spu.h b/gas/config/tc-spu.h index 134c179..4c6c2d4 100644 --- a/gas/config/tc-spu.h +++ b/gas/config/tc-spu.h @@ -85,8 +85,18 @@ struct tc_fix_info { /* We don't need to do anything special for undefined symbols. */ #define md_undefined_symbol(s) 0 -/* We have no special operand handling. */ -#define md_operand(e) +extern symbolS *section_symbol (asection *); +#define md_operand(e) \ + do { \ + if (strncasecmp (input_line_pointer, "@ppu", 4) == 0) \ + { \ + e->X_op = O_symbol; \ + if (abs_section_sym == NULL) \ + abs_section_sym = section_symbol (absolute_section); \ + e->X_add_symbol = abs_section_sym; \ + e->X_add_number = 0; \ + } \ + } while (0) /* Fill in rs_align_code fragments. */ extern void spu_handle_align PARAMS ((fragS *)); |