Abort()'s become as_fatal()'s.
authorK. Richard Pixley <rich@cygnus>
Thu, 15 Aug 1991 19:38:52 +0000 (19:38 +0000)
committerK. Richard Pixley <rich@cygnus>
Thu, 15 Aug 1991 19:38:52 +0000 (19:38 +0000)
gas/config/tc-a29k.c
gas/config/tc-m68k.c
gas/config/tc-sparc.c

index 80a6382ba7caf197382753c530060efc1b1c2416..2c462ec06d551d8610c682b5fdff9d3b3831b2b0 100644 (file)
@@ -534,7 +534,7 @@ machine_ip(str)
                opcode |= reg << 16;
                continue;
            }
-           abort();
+           as_fatal("failed sanity check.");
            break;
 
        case 'x':               /* 16 bit constant, zero-extended */
@@ -749,7 +749,7 @@ md_number_to_chars(buf,val,n)
        break;
 
     default:
-       abort();
+       as_fatal("failed sanity check.");
     }
     return;
 }
@@ -763,7 +763,7 @@ void md_apply_fix(fixP, val)
     fixP->fx_addnumber = val;  /* Remember value for emit_reloc */
 
     if (fixP->fx_r_type == NO_RELOC) {
-       abort();                /* FIXME-SOON, if this is never used, remove */
+       as_fatal("failed sanity check.");               /* FIXME-SOON, if this is never used, remove */
        switch (fixP->fx_size) {
        case 1:
                *buf = val;
@@ -779,7 +779,7 @@ void md_apply_fix(fixP, val)
                *buf = val;
                break;
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
        return;
     }
@@ -899,8 +899,7 @@ void md_create_short_jump(ptr, from_addr, to_addr, frag, to_symbol)
 fragS *frag;
 symbolS *to_symbol;
 {
-    fprintf(stderr, "a29k_create_short_jmp\n");
-    abort();
+    as_fatal("a29k_create_short_jmp\n");
 }
 
 /* should never be called for 29k */
@@ -908,8 +907,7 @@ void md_convert_frag(headers, fragP)
 object_headers *headers;
     register fragS *fragP;
 {
-    fprintf(stderr, "sparc_convert_frag\n");
-    abort();
+    as_fatal("sparc_convert_frag\n");
 }
 
 /* should never be called for 29k */
@@ -920,8 +918,7 @@ void md_create_long_jump(ptr, from_addr, to_addr, frag, to_symbol)
     fragS      *frag;
     symbolS    *to_symbol;
 {
-    fprintf(stderr, "sparc_create_long_jump\n");
-    abort();
+       as_fatal("sparc_create_long_jump\n");
 }
 
 /* should never be called for sparc */
@@ -929,9 +926,7 @@ int md_estimate_size_before_relax(fragP, segtype)
     register fragS *fragP;
 segT segtype;
 {
-    fprintf(stderr, "sparc_estimate_size_before_relax\n");
-    abort();
-    return 0;
+    as_fatal("sparc_estimate_size_before_relax\n");
 }
 
 #if 0
index c6924dbedfcdeec7f2d54ee517abdbd8622e8159..63cd802814cb3173a002b075bcf704cf606c8cd0 100644 (file)
@@ -753,8 +753,8 @@ register struct m68k_op *opP;
                opP->error="Invalid indirect register";
                return FAIL;
        }
-       if(*str!='@')
-               abort();
+       know(*str == '@');
+
        str++;
        switch(*str) {
        case '\0':
@@ -1097,10 +1097,10 @@ char    *instring;
        }
                /* We've got the operands.  Find an opcode that'll
                   accept them */
-       for(losing=0;;) {
-               if(opsfound!=opcode->m_opnum)
+       for (losing = 0; ; ) {
+               if (opsfound != opcode->m_opnum)
                        losing++;
-               else for(s=opcode->m_operands,opP= &the_ins.operands[0];*s && !losing;s+=2,opP++) {
+               else for (s=opcode->m_operands,opP= &the_ins.operands[0];*s && !losing;s+=2,opP++) {
                                /* Warning: this switch is huge! */
                                /* I've tried to organize the cases into  this order:
                                   non-alpha first, then alpha by letter.  lower-case goes directly
@@ -1575,7 +1575,7 @@ char      *instring;
                                        case 2: nextword|=0x200; break;
                                        case 4: nextword|=0x400; break;
                                        case 8: nextword|=0x600; break;
-                                       default: abort();
+                                       default: as_fatal("failed sanity check.");
                                        }
                                                /* IF its simple,
                                                   GET US OUT OF HERE! */
@@ -1952,7 +1952,7 @@ char      *instring;
                                tmpreg=0x804;
                                break;
                        default:
-                               abort();
+                               as_fatal("failed sanity check.");
                        }
                        install_operand(s[1],tmpreg);
                        break;
@@ -2022,7 +2022,7 @@ char      *instring;
                        if(opP->reg==FPI) tmpreg=0x1;
                        else if(opP->reg==FPS) tmpreg=0x2;
                        else if(opP->reg==FPC) tmpreg=0x4;
-                       else abort();
+                       else as_fatal("failed sanity check.");
                        install_operand(s[1],tmpreg);
                        break;
 
@@ -2047,7 +2047,7 @@ char      *instring;
                                tmpreg=1;
                                break;
                        default:
-                               abort();
+                               as_fatal("failed sanity check.");
                        }
                        install_operand(s[1],tmpreg);
                        break;
@@ -2070,7 +2070,7 @@ char      *instring;
                                tmpreg=7;
                                break;
                        default:
-                               abort();
+                               as_fatal("failed sanity check.");
                        }
                        install_operand(s[1],tmpreg);
                        break;
@@ -2078,7 +2078,7 @@ char      *instring;
                case 'V':
                        if (opP->reg == VAL)
                                break;
-                       abort();
+                       as_fatal("failed sanity check.");
 
                case 'W':
                        switch(opP->reg) {
@@ -2093,7 +2093,7 @@ char      *instring;
                                tmpreg=3;
                                break;
                        default:
-                               abort();
+                               as_fatal("failed sanity check.");
                        }
                        install_operand(s[1],tmpreg);
                        break;
@@ -2111,19 +2111,19 @@ char    *instring;
                                break;
 
                        default:
-                               abort();
+                               as_fatal("failed sanity check.");
                        }
                        install_operand(s[1], tmpreg);
                        break;
                case 'Y':
                        if (opP->reg == PSR)
                                break;
-                       abort();
+                       as_fatal("failed sanity check.");
 
                case 'Z':
                        if (opP->reg == PCSR)
                                break;
-                       abort();
+                       as_fatal("failed sanity check.");
 #endif /* m68851 */
                default:
                        as_fatal("Internal error:  Operand type %c unknown in line %s of file \"%s\"", s[0], __LINE__, __FILE__);
@@ -2293,7 +2293,7 @@ int val;
                break;
        case 'c':
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
 } /* install_operand() */
 
@@ -2320,7 +2320,7 @@ int val;
                break;
                /* more stuff goes here */
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
 } /* install_gen_operand() */
 
@@ -2699,7 +2699,7 @@ int n;
                *buf++=val;
                break;
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
 }
 
@@ -3363,7 +3363,7 @@ int ok;
                }
                break;
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
        if(input_line_pointer!=exp->e_end+1)
                as_bad("Ignoring junk after expression");
index 1f41129708b650baa4b6bde242b0cc056256b923..c23138e3043711904bd0a2b64e76533ed6346034 100644 (file)
@@ -414,7 +414,7 @@ char *str;
                return;
                
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
 } /* md_assemble() */
 
@@ -1081,7 +1081,7 @@ char *str;
                                continue;
                                
                        default:
-                               abort();
+                               as_fatal("failed sanity check.");
                        } /* switch on arg code */
                        break;
                } /* for each arg that we expect */
@@ -1244,7 +1244,7 @@ int n;
                break;
                
        default:
-               abort();
+               as_fatal("failed sanity check.");
        }
        return;
 } /* md_number_to_chars() */
@@ -1411,8 +1411,7 @@ long to_addr;
 fragS *frag;
 symbolS *to_symbol;
 {
-       fprintf(stderr, "sparc_create_short_jmp\n");
-       abort();
+       as_fatal("sparc_create_short_jmp\n");
 } /* md_create_short_jump() */
 
 /* Translate internal representation of relocation info to target format.
@@ -1474,8 +1473,7 @@ void md_convert_frag(headers, fragP)
 object_headers *headers;
 register fragS *fragP;
 {
-       fprintf(stderr, "sparc_convert_frag\n");
-       abort();
+       as_fatal("sparc_convert_frag\n");
 } /* md_convert_frag() */
 
 /* should never be called for sparc */
@@ -1485,8 +1483,7 @@ long from_addr, to_addr;
 fragS  *frag;
 symbolS        *to_symbol;
 {
-       fprintf(stderr, "sparc_create_long_jump\n");
-       abort();
+       as_fatal("sparc_create_long_jump\n");
 } /* md_create_long_jump() */
 
 /* should never be called for sparc */
@@ -1494,9 +1491,7 @@ int md_estimate_size_before_relax(fragP, segtype)
 fragS *fragP;
 segT segtype;
 {
-       fprintf(stderr, "sparc_estimate_size_before_relax\n");
-       abort();
-       return 0;
+       as_fatal("sparc_estimate_size_before_relax\n");
 } /* md_estimate_size_before_relax() */
 
 #if 0
@@ -1583,8 +1578,7 @@ relax_addressT segment_address_in_file;
        for (; fixP; fixP = fixP->fx_next) {
                
                if (fixP->fx_r_type >= NO_RELOC) {
-                       fprintf(stderr, "fixP->fx_r_type = %d\n", fixP->fx_r_type);
-                       abort();
+                       as_fatal("fixP->fx_r_type = %d\n", fixP->fx_r_type);
                }
                
                if ((symbolP = fixP->fx_addsy) != NULL) {