]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas fixups
authorAlan Modra <amodra@gmail.com>
Tue, 8 Jul 2025 23:42:45 +0000 (09:12 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 9 Jul 2025 00:05:07 +0000 (09:35 +0930)
Remove unnecessary arg casts in fix_new and similar calls.

gas/config/tc-aarch64.c
gas/config/tc-alpha.c
gas/config/tc-csky.c
gas/config/tc-hppa.c
gas/config/tc-ns32k.c
gas/config/tc-rl78.c
gas/config/tc-rx.c
gas/config/tc-sparc.c
gas/config/tc-spu.c
gas/config/tc-vax.c

index b52d4b705de398dc8be3fb46d68afa7c6131cb05..9d2ae950a95cfb7fa74f12817acd9df6f3ac7239 100644 (file)
@@ -10123,7 +10123,7 @@ cons_fix_new_aarch64 (fragS * frag, int where, int size, expressionS * exp)
     }
 #endif
 
-  fix_new_exp (frag, where, (int) size, exp, pcrel, type);
+  fix_new_exp (frag, where, size, exp, pcrel, type);
 }
 
 /* Implement md_after_parse_args.  This is the earliest time we need to decide
index a91db143ab9c3d943e437709e43a22983fb0daf5..4a9255873b035f8dfb6b7821ae0d1c7a48161179 100644 (file)
@@ -3394,8 +3394,8 @@ add_to_link_pool (symbolS *sym, offsetT addend)
   expsym = make_expr_symbol (&e);
 
   /* Create a fixup for the entry.  */
-  fixp = fix_new
-    (frag_now, p - frag_now->fr_literal, 8, sym, addend, 0, BFD_RELOC_64);
+  fixp = fix_new (frag_now, p - frag_now->fr_literal, 8,
+                 sym, addend, 0, BFD_RELOC_64);
   fixp->tc_fix_data.info = get_alpha_reloc_tag (next_sequence_num--);
   fixp->tc_fix_data.info->sym = expsym;
 
index 9a7749edf69258738a37bbf6ef77fba68199ee6a..eca6ff17878b0dd5477f9189d25105dd1d8bbb30 100644 (file)
@@ -5320,7 +5320,7 @@ csky_cons_fix_new (fragS *frag,
        reloc = BFD_RELOC_32;
        break;
       }
-  fixP = fix_new_exp (frag, off, (int) len, exp, 0, reloc);
+  fixP = fix_new_exp (frag, off, len, exp, 0, reloc);
   if (BFD_RELOC_CKCORE_TLS_IE32 == insn_reloc
       || BFD_RELOC_CKCORE_TLS_GD32 == insn_reloc
       || BFD_RELOC_CKCORE_TLS_LDM32 == insn_reloc)
index b147bdc1713fb1a658865884556a2b3c4547f395..f1175e0d4e3af6a6196cc1785318ae362c64859f 100644 (file)
@@ -1265,8 +1265,7 @@ cons_fix_new_hppa (fragS *frag, int where, int size, expressionS *exp,
       hppa_field_selector = e_fsel;
     }
 
-  fix_new_hppa (frag, where, size,
-               (symbolS *) NULL, (offsetT) 0, exp, 0, rel_type,
+  fix_new_hppa (frag, where, size, NULL, 0, exp, 0, rel_type,
                hppa_field_selector, size * 8, 0, 0);
 }
 
@@ -5762,7 +5761,7 @@ md_assemble (char *str)
                  where = frag_more (0);
                  u = UNWIND_LOW32 (&last_call_info->ci_unwind.descriptor);
                  fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
-                               NULL, (offsetT) 0, NULL,
+                               NULL, 0, NULL,
                                0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
                }
 #endif
@@ -5786,7 +5785,7 @@ md_assemble (char *str)
   /* If necessary output more stuff.  */
   if (the_insn.reloc != R_HPPA_NONE)
     fix_new_hppa (frag_now, (to - frag_now->fr_literal), 4, NULL,
-                 (offsetT) 0, &the_insn.exp, the_insn.pcrel,
+                 0, &the_insn.exp, the_insn.pcrel,
                  (int) the_insn.reloc, the_insn.field_selector,
                  the_insn.format, the_insn.arg_reloc, 0);
 
@@ -5856,7 +5855,7 @@ pa_brtab (int begin ATTRIBUTE_UNUSED)
   char *where = frag_more (0);
 
   fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
-               NULL, (offsetT) 0, NULL,
+               NULL, 0, NULL,
                0, begin ? R_HPPA_BEGIN_BRTAB : R_HPPA_END_BRTAB,
                e_fsel, 0, 0, 0);
 #endif
@@ -5880,7 +5879,7 @@ pa_try (int begin ATTRIBUTE_UNUSED)
      the beginning and end of exception handling regions).  */
 
   fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
-               NULL, (offsetT) 0, begin ? NULL : &exp,
+               NULL, 0, begin ? NULL : &exp,
                0, begin ? R_HPPA_BEGIN_TRY : R_HPPA_END_TRY,
                e_fsel, 0, 0, 0);
 #endif
@@ -6019,10 +6018,8 @@ pa_build_unwind_subspace (struct call_info *call_info)
 
   /* Relocation info. for start offset of the function.  */
   md_number_to_chars (p, 0, 4);
-  fix_new_hppa (frag_now, p - frag_now->fr_literal, 4,
-               symbolP, (offsetT) 0,
-               (expressionS *) NULL, 0, reloc,
-               e_fsel, 32, 0, 0);
+  fix_new_hppa (frag_now, p - frag_now->fr_literal, 4, symbolP, 0,
+               NULL, 0, reloc, e_fsel, 32, 0, 0);
 
   /* Relocation info. for end offset of the function.
 
@@ -6033,9 +6030,8 @@ pa_build_unwind_subspace (struct call_info *call_info)
      finished with its work.  */
   md_number_to_chars (p + 4, 0, 4);
   fix_new_hppa (frag_now, p + 4 - frag_now->fr_literal, 4,
-               call_info->end_symbol, (offsetT) 0,
-               (expressionS *) NULL, 0, reloc,
-               e_fsel, 32, 0, 0);
+               call_info->end_symbol, 0,
+               NULL, 0, reloc, e_fsel, 32, 0, 0);
 
   /* Dump the descriptor.  */
   unwind = UNWIND_LOW32 (&call_info->ci_unwind.descriptor);
@@ -6335,8 +6331,7 @@ pa_entry (int unused ATTRIBUTE_UNUSED)
       where = frag_more (0);
       u = UNWIND_LOW32 (&last_call_info->ci_unwind.descriptor);
       fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
-                   NULL, (offsetT) 0, NULL,
-                   0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
+                   NULL, 0, NULL, 0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
     }
 #endif
 }
@@ -6494,8 +6489,7 @@ process_exit (void)
      if we split the unwind bits up between the relocations which
      denote the entry and exit points.  */
   fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
-               NULL, (offsetT) 0,
-               NULL, 0, R_HPPA_EXIT, e_fsel, 0, 0,
+               NULL, 0, NULL, 0, R_HPPA_EXIT, e_fsel, 0, 0,
                UNWIND_HIGH32 (&last_call_info->ci_unwind.descriptor));
 #endif
 }
@@ -7011,8 +7005,8 @@ pa_procend (int unused ATTRIBUTE_UNUSED)
                  where = frag_more (0);
                  u = UNWIND_LOW32 (&last_call_info->ci_unwind.descriptor);
                  fix_new_hppa (frag_now, where - frag_now->fr_literal, 0,
-                               NULL, (offsetT) 0, NULL,
-                               0, R_HPPA_ENTRY, e_fsel, 0, 0, u);
+                               NULL, 0, NULL, 0, R_HPPA_ENTRY, e_fsel,
+                               0, 0, u);
                }
 #endif
            }
index 11e39280012e502eeb517d649e756abf21db8f9a..dcabf5f5555c71f44c39b714e32c331ce7ec0fb1 100644 (file)
@@ -1758,7 +1758,7 @@ convert_iif (void)
                          the object later.  */
                      exprP.X_add_number += iif.iifP[i].object_adjust;
                      fix_new_ns32k_exp (frag_now,
-                                        (long) (memP - frag_now->fr_literal),
+                                        memP - frag_now->fr_literal,
                                         size,
                                         &exprP,
                                         iif.iifP[i].pcrel,
@@ -1806,12 +1806,12 @@ convert_iif (void)
                    size = default_disp_size; /* Normally 4 bytes.  */
                    memP = frag_more (size);
                    fix_new_ns32k_exp (frag_now,
-                                      (long) (memP - frag_now->fr_literal),
+                                      memP - frag_now->fr_literal,
                                       size,
                                       &exprP,
                                       0, /* never iif.iifP[i].pcrel, */
                                       1, /* always iif.iifP[i].im_disp */
-                                      (bit_fixS *) 0, 0,
+                                      0, 0,
                                       inst_frag,
                                       inst_offset);
                    break;              /* Exit this absolute hack.  */
@@ -2053,7 +2053,7 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
          /* We don't relax symbols defined in another segment.  The
             thing to do is to assume the object will occupy 4 bytes.  */
          fix_new_ns32k (fragP,
-                        (int) (fragP->fr_fix),
+                        fragP->fr_fix,
                         4,
                         fragP->fr_symbol,
                         fragP->fr_offset,
index 3593b00fb969e0efc3f578cb3aa809f39a2508c1..a20e8b172475304efd5f2ad4bd6920e2071888c0 100644 (file)
@@ -705,7 +705,7 @@ rl78_cons_fix_new (fragS *  frag,
        type = BFD_RELOC_RL78_DIFF;
     }
 
-  fixP = fix_new_exp (frag, where, (int) size, exp, 0, type);
+  fixP = fix_new_exp (frag, where, size, exp, 0, type);
   switch (exp->X_md)
     {
       /* These are intended to have values larger than the container,
index 0ecda6411e8fe03c4d3556660c0ada914d4980d8..8685df10e26b9384e5e5fce3cbe7ecd628d54d18 100644 (file)
@@ -2252,7 +2252,7 @@ rx_cons_fix_new (fragS *  frag,
        type = BFD_RELOC_RX_DIFF;
     }
 
-  fix_new_exp (frag, where, (int) size, exp, 0, type);
+  fix_new_exp (frag, where, size, exp, 0, type);
 }
 
 void
index ec17a2f75fd10cbdf80806b5bbd76d2be98ab318..062cb479a07625719194476f4bf89a277ffdd6f6 100644 (file)
@@ -4934,7 +4934,7 @@ cons_fix_new_sparc (fragS *frag,
        }
    }
 
-  fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
+  fix_new_exp (frag, where, nbytes, exp, 0, r);
 }
 
 void
index f19ca7ee48f61591baa6bf6923ab92fec6162078..5da4e00a48e5f221dcc0b75f72ed007243bc0931 100644 (file)
@@ -725,12 +725,7 @@ md_create_short_jump (char *ptr,
   ptr[1] = 0x00;
   ptr[2] = 0x00;
   ptr[3] = 0x00;
-  fix_new (frag,
-          ptr - frag->fr_literal,
-          4,
-          to_symbol,
-          (offsetT) 0,
-          0,
+  fix_new (frag, ptr - frag->fr_literal, 4, to_symbol, 0, 0,
           BFD_RELOC_SPU_PCREL16);
 }
 
@@ -747,12 +742,7 @@ md_create_long_jump (char *ptr,
   ptr[1] = 0x00;
   ptr[2] = 0x00;
   ptr[3] = 0x00;
-  fix_new (frag,
-          ptr - frag->fr_literal,
-          4,
-          to_symbol,
-          (offsetT) 0,
-          0,
+  fix_new (frag, ptr - frag->fr_literal, 4, to_symbol, 0, 0,
           BFD_RELOC_SPU_PCREL16);
 }
 #endif
index 9670b1aae32c7234a8b0a4fd5d5ed584a85ff33e..1705380f8aa551ea0ef976a545b297664f264bf2 100644 (file)
@@ -3354,7 +3354,7 @@ vax_cons_fix_new (fragS *frag, int where, unsigned int nbytes, expressionS *exp,
         : nbytes == 2 ? BFD_RELOC_16
         : BFD_RELOC_32);
 
-  fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
+  fix_new_exp (frag, where, nbytes, exp, 0, r);
 }
 
 const char *