2004-07-09 James E Wilson * config/tc-ia64.c (default_big_endian): New. (dot_byteorder, md_begin): Use it. (md_parse_option): Set it. Index: tc-ia64.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-ia64.c,v retrieving revision 1.112 diff -p -r1.112 tc-ia64.c *** tc-ia64.c 4 Jul 2004 00:29:21 -0000 1.112 --- tc-ia64.c 9 Jul 2004 20:42:51 -0000 *************** struct label_fix *** 153,160 **** --- 153,164 ---- struct symbol *sym; }; + /* This is the endianness of the current section. */ extern int target_big_endian; + /* This is the default endianness. */ + static int default_big_endian = TARGET_BYTES_BIG_ENDIAN; + void (*ia64_number_to_chars) PARAMS ((char *, valueT, int)); static void ia64_float_to_chars_bigendian *************** dot_byteorder (byteorder) *** 4406,4413 **** if (byteorder == -1) { if (seginfo->tc_segment_info_data.endian == 0) ! seginfo->tc_segment_info_data.endian ! = TARGET_BYTES_BIG_ENDIAN ? 1 : 2; byteorder = seginfo->tc_segment_info_data.endian == 1; } else --- 4410,4416 ---- if (byteorder == -1) { if (seginfo->tc_segment_info_data.endian == 0) ! seginfo->tc_segment_info_data.endian = default_big_endian ? 1 : 2; byteorder = seginfo->tc_segment_info_data.endian == 1; } else *************** md_parse_option (c, arg) *** 6528,6537 **** --- 6531,6542 ---- else if (strcmp (arg, "le") == 0) { md.flags &= ~EF_IA_64_BE; + default_big_endian = 0; } else if (strcmp (arg, "be") == 0) { md.flags |= EF_IA_64_BE; + default_big_endian = 1; } else return 0; *************** md_begin () *** 6704,6710 **** /* Make sure function pointers get initialized. */ target_big_endian = -1; ! dot_byteorder (TARGET_BYTES_BIG_ENDIAN); alias_hash = hash_new (); alias_name_hash = hash_new (); --- 6709,6715 ---- /* Make sure function pointers get initialized. */ target_big_endian = -1; ! dot_byteorder (default_big_endian); alias_hash = hash_new (); alias_name_hash = hash_new ();