X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-tic80.c;h=0ec638228b58c00cf05854c7621b75eaa3c5ab56;hb=8ad30312fff34325113307cb27bcae49d220df15;hp=c34a5e107a82eaa78b524f9d49ee960fba959d45;hpb=2ee563b53258d390d7446e90a67f465d504ae44c;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-tic80.c b/gas/config/tc-tic80.c index c34a5e107a..0ec638228b 100644 --- a/gas/config/tc-tic80.c +++ b/gas/config/tc-tic80.c @@ -26,7 +26,7 @@ as_fatal (_("internal error:%s:%d: %s\n"), __FILE__, __LINE__, what) #define internal_error_a(what,arg) \ - as_fatal (_("internal error:%s:%d: %s %d\n"), __FILE__, __LINE__, what, arg) + as_fatal (_("internal error:%s:%d: %s %ld\n"), __FILE__, __LINE__, what, arg) /* Generic assembler global variables which must be defined by all targets. */ @@ -57,8 +57,6 @@ const char FLT_CHARS[] = "fF"; function to call to execute this pseudo-op integer arg to pass to the function */ -extern void obj_coff_section (); - const pseudo_typeS md_pseudo_table[] = { { "align", s_align_bytes, 4 }, /* Do byte alignment, default is a 4 byte boundary */ { "word", cons, 4 }, /* FIXME: Should this be machine independent? */ @@ -85,8 +83,8 @@ static int tic80_relax = 0; int md_estimate_size_before_relax (fragP, segment_type) - fragS *fragP; - segT segment_type; + fragS *fragP ATTRIBUTE_UNUSED; + segT segment_type ATTRIBUTE_UNUSED; { internal_error (_("Relaxation is a luxury we can't afford")); return (-1); @@ -96,7 +94,7 @@ md_estimate_size_before_relax (fragP, segment_type) symbolS * md_undefined_symbol (name) - char *name; + char *name ATTRIBUTE_UNUSED; { return 0; } @@ -118,7 +116,6 @@ md_atof (type, litP, sizeP) LITTLENUM_TYPE words[MAX_LITTLENUMS]; LITTLENUM_TYPE *wordP; char *t; - char *atof_ieee (); switch (type) { @@ -170,20 +167,21 @@ const_overflow (num, bits, flags) int retval = 0; /* Only need to check fields less than 32 bits wide. */ - if (bits < 32) - if (flags & TIC80_OPERAND_SIGNED) - { - max = (1 << (bits - 1)) - 1; - min = - (1 << (bits - 1)); - retval = ((long) num > max) || ((long) num < min); - } - else - { - max = (1 << bits) - 1; - min = 0; - retval = (num > max) || (num < min); - } - return (retval); + if (bits >= 32) + return retval; + + if (flags & TIC80_OPERAND_SIGNED) + { + max = (1 << (bits - 1)) - 1; + min = - (1 << (bits - 1)); + retval = (long) num > max || (long) num < min; + } + else + { + max = (1 << bits) - 1; + retval = num > (unsigned long) max; + } + return retval; } /* get_operands () parses a string of operands and fills in a passed @@ -201,8 +199,6 @@ get_operands (exp) { char *p = input_line_pointer; int numexp = 0; - int mflag = 0; - int sflag = 0; int parens = 0; while (*p) @@ -426,9 +422,9 @@ find_opcode (opcode, myops) expression that supplies additional information about the operand, such as ":m" or ":s" modifiers. Check to see that the operand matches this requirement. */ - if (!((num & TIC80_OPERAND_M_SI) && (flags & TIC80_OPERAND_M_SI) - || (num & TIC80_OPERAND_M_LI) && (flags & TIC80_OPERAND_M_LI) - || (num & TIC80_OPERAND_SCALED) && (flags & TIC80_OPERAND_SCALED))) + if (!((num & flags & TIC80_OPERAND_M_SI) + || (num & flags & TIC80_OPERAND_M_LI) + || (num & flags & TIC80_OPERAND_SCALED))) { match = 0; } @@ -465,7 +461,7 @@ find_opcode (opcode, myops) case O_logical_or: case O_max: default: - internal_error_a (_("unhandled expression type"), X_op); + internal_error_a (_("unhandled expression type"), (long) X_op); } } if (!match) @@ -709,7 +705,7 @@ build_insn (opcode, opers) else { internal_error_a (_("unhandled operand modifier"), - opers[expi].X_add_number); + (long) opers[expi].X_add_number); } break; case O_big: @@ -750,7 +746,7 @@ build_insn (opcode, opers) case O_logical_or: case O_max: default: - internal_error_a (_("unhandled expression"), X_op); + internal_error_a (_("unhandled expression"), (long) X_op); break; } } @@ -779,7 +775,6 @@ md_assemble (str) unsigned char *input_line_save; struct tic80_opcode *opcode; expressionS myops[16]; - unsigned long insn; /* Ensure there is something there to assemble. */ assert (str); @@ -890,7 +885,8 @@ md_begin () valu = PDS_VALUE (pdsp) & ~TIC80_OPERAND_MASK; break; default: - internal_error_a (_("unhandled predefined symbol bits"), symtype); + internal_error_a (_("unhandled predefined symbol bits"), + (long) symtype); break; } symbol_table_insert (symbol_create (PDS_NAME (pdsp), segment, valu, @@ -925,7 +921,7 @@ size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) int c; - char *arg; + char *arg ATTRIBUTE_UNUSED; { switch (c) { @@ -1000,7 +996,7 @@ md_apply_fix3 (fixP, valP, seg) break; default: internal_error_a (_("unhandled relocation type in fixup"), - fixP->fx_r_type); + (long) fixP->fx_r_type); break; } @@ -1034,9 +1030,9 @@ md_pcrel_from (fixP) void md_convert_frag (headers, seg, fragP) - object_headers *headers; - segT seg; - fragS *fragP; + object_headers *headers ATTRIBUTE_UNUSED; + segT seg ATTRIBUTE_UNUSED; + fragS *fragP ATTRIBUTE_UNUSED; { internal_error (_("md_convert_frag() not implemented yet")); abort (); @@ -1044,7 +1040,7 @@ md_convert_frag (headers, seg, fragP) void tc_coff_symbol_emit_hook (ignore) - symbolS *ignore; + symbolS *ignore ATTRIBUTE_UNUSED; { }