Use only one common variable to check whether big endian or not.

Now gas doesn't confuse endianness!
This commit is contained in:
msaitoh 2001-02-23 20:53:30 +00:00
parent b58136d76c
commit 5460e0c197
2 changed files with 4 additions and 14 deletions

View File

@ -50,13 +50,10 @@ void cons ();
void s_align_bytes ();
static void s_uacons PARAMS ((int));
int shl = 0;
static void
little (ignore)
int ignore;
{
shl = 1;
target_big_endian = 0;
}
@ -177,9 +174,6 @@ md_begin ()
sh_opcode_info *opcode;
char *prev_name = "";
if (! shl)
target_big_endian = 1;
opcode_hash_control = hash_new ();
/* Insert unique names into hash table */
@ -1233,7 +1227,6 @@ md_parse_option (c, arg)
break;
case OPTION_LITTLE:
shl = 1;
target_big_endian = 0;
break;

View File

@ -27,9 +27,6 @@
#define TARGET_ARCH bfd_arch_sh
/* Whether in little endian mode. */
extern int shl;
/* Whether -relax was used. */
extern int sh_relax;
@ -54,7 +51,7 @@ extern int sh_force_relocation ();
#define IGNORE_NONSTANDARD_ESCAPES
#define LISTING_HEADER (shl ? "Hitachi Super-H GAS Little Endian" : "Hitachi Super-H GAS Big Endian")
#define LISTING_HEADER (target_big_endian ? "Hitachi Super-H GAS Big Endian" : "Hitachi Super-H GAS Little Endian")
#define md_operand(x)
@ -101,7 +98,7 @@ extern void sh_frob_file PARAMS ((void));
#define BFD_ARCH TARGET_ARCH
#define COFF_MAGIC (shl ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG)
#define COFF_MAGIC (target_big_endian ? SH_ARCH_MAGIC_BIG : SH_ARCH_MAGIC_LITTLE)
/* We need to write out relocs which have not been completed. */
#define TC_COUNT_RELOC(fix) ((fix)->fx_addsy != NULL)
@ -138,9 +135,9 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *));
extern int target_big_endian;
#ifdef TE_NetBSD
#define TARGET_FORMAT (shl ? "elf32-shl-unx" : "elf32-sh-unx")
#define TARGET_FORMAT (target_big_endian ? "elf32-sh-unx" : "elf32-shl-unx")
#else
#define TARGET_FORMAT (shl ? "elf32-shl" : "elf32-sh")
#define TARGET_FORMAT (target_big_endian ? "elf32-sh" : "elf32-shl")
#endif
#endif /* OBJ_ELF */