[binutils-gdb] PPC: drop redundant value conversion from md_assemble()

Jan Beulich jbeulich@sourceware.org
Thu Dec 19 09:40:23 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ec6b5cbcffefa23604c2a2549f6aba146c04d28c

commit ec6b5cbcffefa23604c2a2549f6aba146c04d28c
Author: Jan Beulich <jbeulich@suse.com>
Date:   Thu Dec 19 10:39:08 2024 +0100

    PPC: drop redundant value conversion from md_assemble()
    
    Just ahead of the enclosing OBJ_ELF conditional the exact same
    conversion was already carried out, with "val" not further changed in
    between.

Diff:
---
 gas/config/tc-ppc.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 07e0f936d0b..2b65d1808b5 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -3516,13 +3516,6 @@ md_assemble (char *str)
 	  char *orig_str = str;
 	  bfd_reloc_code_real_type reloc = ppc_elf_suffix (&str, &ex);
 
-	  if (ex.X_op == O_constant)
-	    {
-	      val = ex.X_add_number;
-	      if (sizeof (ex.X_add_number) < sizeof (val)
-		  && (ex.X_add_number < 0) != ex.X_extrabit)
-		val = val ^ ((addressT) -1 ^ (uint64_t) -1);
-	    }
 	  if (reloc != BFD_RELOC_NONE)
 	    switch (reloc)
 	      {


More information about the Binutils-cvs mailing list