]> Git Repo - binutils.git/blobdiff - gas/config/tc-a29k.c
More filename renaming.
[binutils.git] / gas / config / tc-a29k.c
index f4477f61be6cdaa6cd8e32fc27486f26d81995a1..a00af02fbffc66b20cda6c40038a16df4cca7e91 100644 (file)
@@ -25,7 +25,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
 #include "as.h"
 
-#include "a29k-opcode.h"
+#include "opcode/a29k.h"
 
 /* Make it easier to clone this machine desc into another one.  */
 #define        machine_opcode  a29k_opcode
@@ -88,7 +88,15 @@ md_pseudo_table[] = {
 
 int md_short_jump_size = 4;
 int md_long_jump_size = 4;
-int md_reloc_size = 12;
+#if defined(BFD_HEADERS)
+#ifdef RELSZ
+int md_reloc_size = RELSZ;     /* Coff headers */
+#else
+int md_reloc_size = 12;                /* something else headers */
+#endif
+#else
+int md_reloc_size = 12;                /* Not bfdized*/
+#endif
 
 /* This array holds the chars that always start a comment.  If the
     pre-processor is disabled, these aren't very useful */
@@ -762,27 +770,6 @@ void md_apply_fix(fixP, val)
 
     fixP->fx_addnumber = val;  /* Remember value for emit_reloc */
 
-    if (fixP->fx_r_type == NO_RELOC) {
-       as_fatal("failed sanity check.");               /* FIXME-SOON, if this is never used, remove */
-       switch (fixP->fx_size) {
-       case 1:
-               *buf = val;
-               break;
-       case 2:
-               *buf++ = (val>>8);
-               *buf = val;
-               break;
-       case 4:
-               *buf++ = (val>>24);
-               *buf++ = (val>>16);
-               *buf++ = (val>>8);
-               *buf = val;
-               break;
-       default:
-               as_fatal("failed sanity check.");
-       }
-       return;
-    }
 
     know(fixP->fx_size == 4);
     know(fixP->fx_r_type < NO_RELOC);
@@ -881,11 +868,15 @@ fixS *fixP;
        /* FIXME-NOW: relocation type handling is not yet written for
           a29k. */
 
-       know(0);
+
        switch (fixP->fx_r_type) {
        case RELOC_32:  return(R_WORD);
        case RELOC_8:   return(R_BYTE);
-       default:        know(0);
+       case RELOC_CONST: return (R_ILOHALF);
+       case RELOC_CONSTH: return (R_IHIHALF);
+       case RELOC_JUMPTARG: return (R_IREL);
+       default:        printf("need %o3\n", fixP->fx_r_type);
+         abort(0);
        } /* switch on type */
 
        return(0);
This page took 0.022927 seconds and 4 git commands to generate.