diff options
author | Jim Wilson <wilson@tuliptree.org> | 2004-07-09 23:21:54 +0000 |
---|---|---|
committer | Jim Wilson <wilson@tuliptree.org> | 2004-07-09 23:21:54 +0000 |
commit | 549f748d67130775c5e5929f0744451471fd5d19 (patch) | |
tree | a087818f736322b50917a12fab2c3c9db1f7056a /gas/config | |
parent | f21a12b65701571e144f98cb730721d0c0dfbb5a (diff) | |
download | binutils-549f748d67130775c5e5929f0744451471fd5d19.zip binutils-549f748d67130775c5e5929f0744451471fd5d19.tar.gz binutils-549f748d67130775c5e5929f0744451471fd5d19.tar.bz2 |
Make -meb/-mel options work.
* config/tc-ia64.c (default_big_endian): New.
(dot_byteorder, md_begin): Use it.
(md_parse_option): Set it.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-ia64.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 74ee215..13cf19d 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -153,8 +153,12 @@ struct label_fix 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 @@ -4406,8 +4410,7 @@ dot_byteorder (byteorder) if (byteorder == -1) { if (seginfo->tc_segment_info_data.endian == 0) - seginfo->tc_segment_info_data.endian - = TARGET_BYTES_BIG_ENDIAN ? 1 : 2; + seginfo->tc_segment_info_data.endian = default_big_endian ? 1 : 2; byteorder = seginfo->tc_segment_info_data.endian == 1; } else @@ -6528,10 +6531,12 @@ md_parse_option (c, arg) 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; @@ -6704,7 +6709,7 @@ md_begin () /* Make sure function pointers get initialized. */ target_big_endian = -1; - dot_byteorder (TARGET_BYTES_BIG_ENDIAN); + dot_byteorder (default_big_endian); alias_hash = hash_new (); alias_name_hash = hash_new (); |