This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] warning fix in BFD/elf-m10300.c


Hi all,

This eliminates a warning in BFD, but makes the code a little bit
harder to read.

BTW, these:

static const insn16 t2a1_push_insn = 0xb540;
static const insn16 t2a2_ldr_insn = 0x4e03;
static const insn16 t2a3_mov_insn = 0x46fe;
static const insn16 t2a4_bx_insn = 0x4730;
static const insn32 t2a5_pop_insn = 0xe8bd4040;
static const insn32 t2a6_bx_insn = 0xe12fff1e;

are defined in both elf32-arm.h and coff-arm.c, and they are used
only by the latter. Should we remove them from elf32-arm.h or remove
them from coff-arm.c and include elf32-arm.h (or leave them as they
are)?

Elias


bfd/ChangeLog

2002-11-02  Elias Athanasopoulos  <eathan@otenet.gr>

	* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Don't 
	check if entry->stack_size is < 256.
	(mn10300_elf_relax_section): Don't check if sym_hash->stack_size
	is < 256.
	
	
===================================================================
RCS file: /home/anteater/bucvs/src/bfd/elf-m10300.c,v
retrieving revision 1.1
diff -pu -r1.1 /home/anteater/bucvs/src/bfd/elf-m10300.c
--- /home/anteater/bucvs/src/bfd/elf-m10300.c	2002/11/01 23:23:01	1.1
+++ /home/anteater/bucvs/src/bfd/elf-m10300.c	2002/11/01 23:28:27
@@ -720,7 +720,7 @@ elf32_mn10300_finish_hash_table_entry (g
   /* Count the insn to allocate stack space too.  */
   if (entry->stack_size > 0 && entry->stack_size <= 128)
     byte_count += 3;
-  else if (entry->stack_size > 0 && entry->stack_size < 256)
+  else if (entry->stack_size > 0)
     byte_count += 4;
 
   /* If using "call" will result in larger code, then turn all
@@ -1211,10 +1211,9 @@ mn10300_elf_relax_section (abfd, sec, li
 		      if (sym_hash->movm_args)
 			bytes += 2;
 
-		      if (sym_hash->stack_size && sym_hash->stack_size <= 128)
+		      if (sym_hash->stack_size > 0 && sym_hash->stack_size <= 128)
 			bytes += 3;
-		      else if (sym_hash->stack_size
-			       && sym_hash->stack_size < 256)
+                     else if (sym_hash->stack_size > 0)
 			bytes += 4;
 
 		      /* Note that we've deleted prologue bytes for this
@@ -1263,10 +1262,9 @@ mn10300_elf_relax_section (abfd, sec, li
 		      if (sym_hash->movm_args)
 			bytes += 2;
 
-		      if (sym_hash->stack_size && sym_hash->stack_size <= 128)
+		      if (sym_hash->stack_size > 0 && sym_hash->stack_size <= 128)
 			bytes += 3;
-		      else if (sym_hash->stack_size
-			       && sym_hash->stack_size < 256)
+                     else if (sym_hash->stack_size > 0)
 			bytes += 4;
 
 		      /* Note that we've deleted prologue bytes for this


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]