diff options
author | K. Richard Pixley <rich@cygnus> | 1992-02-17 15:54:49 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1992-02-17 15:54:49 +0000 |
commit | 542e1629fdd4df8920511c4eb2df15bb83feb13b (patch) | |
tree | f1b70b61ce3707e08b2f43081adfd3b4850654f3 /gas/config/tc-a29k.c | |
parent | af2136245013fad2f72249258452d5f7154d5719 (diff) | |
download | gdb-542e1629fdd4df8920511c4eb2df15bb83feb13b.zip gdb-542e1629fdd4df8920511c4eb2df15bb83feb13b.tar.gz gdb-542e1629fdd4df8920511c4eb2df15bb83feb13b.tar.bz2 |
fighting bitrot in a major way
Diffstat (limited to 'gas/config/tc-a29k.c')
-rw-r--r-- | gas/config/tc-a29k.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c index 5fe4909..fbdadb5 100644 --- a/gas/config/tc-a29k.c +++ b/gas/config/tc-a29k.c @@ -437,7 +437,7 @@ char *str; } argsStart = s; opcode = insn->opcode; - bzero(&the_insn, sizeof(the_insn)); + memset(&the_insn, '\0', sizeof(the_insn)); the_insn.reloc = NO_RELOC; /* @@ -900,20 +900,21 @@ register fragS *fragP; /* should never be called for 29k */ void md_create_long_jump(ptr, from_addr, to_addr, frag, to_symbol) char *ptr; -long from_addr, - to_addr; +long from_addr; +long to_addr; fragS *frag; symbolS *to_symbol; { as_fatal("sparc_create_long_jump\n"); } -/* should never be called for sparc */ +/* should never be called for a29k */ int md_estimate_size_before_relax(fragP, segtype) register fragS *fragP; segT segtype; { as_fatal("sparc_estimate_size_before_relax\n"); + return(0); } #if 0 @@ -986,24 +987,22 @@ char *where; fixS *fixP; relax_addressT segment_address_in_file; { - long r_index; + long r_symbolnum; know(fixP->fx_r_type < NO_RELOC); know(fixP->fx_addsy != NULL); - r_index = (S_IS_DEFINED(fixP->fx_addsy) - ? S_GET_TYPE(fixP->fx_addsy) - : fixP->fx_addsy->sy_number); - - /* this is easy */ md_number_to_chars(where, fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file, 4); - /* now the fun stuff */ - where[4] = (r_index >> 16) & 0x0ff; - where[5] = (r_index >> 8) & 0x0ff; - where[6] = r_index & 0x0ff; + r_symbolnum = (S_IS_DEFINED(fixP->fx_addsy) + ? S_GET_TYPE(fixP->fx_addsy) + : fixP->fx_addsy->sy_number); + + where[4] = (r_symbolnum >> 16) & 0x0ff; + where[5] = (r_symbolnum >> 8) & 0x0ff; + where[6] = r_symbolnum & 0x0ff; where[7] = (((!S_IS_DEFINED(fixP->fx_addsy)) << 7) & 0x80) | (0 & 0x60) | (fixP->fx_r_type & 0x1F); /* Also easy */ md_number_to_chars(&where[8], fixP->fx_addnumber, 4); |