diff options
author | Jan Beulich <jbeulich@novell.com> | 2010-06-10 07:10:04 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2010-06-10 07:10:04 +0000 |
commit | 89507696901883db1e38b3fb6f005941d16edebc (patch) | |
tree | 0000adc5580a0167e63f016ac9bde3251c9b8cbd /gas | |
parent | 237630848887333671a3194009c3dcda489ea213 (diff) | |
download | gdb-89507696901883db1e38b3fb6f005941d16edebc.zip gdb-89507696901883db1e38b3fb6f005941d16edebc.tar.gz gdb-89507696901883db1e38b3fb6f005941d16edebc.tar.bz2 |
gas/
2010-06-10 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (cpu_arch): Add comment.
(i386_target_format): Set cpu_arch_isa_flags and cpu_arch_tune_flags
from the generic entries of cpu_arch[].
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 55 |
2 files changed, 16 insertions, 45 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 577580e..2bc3ad0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2010-06-10 Jan Beulich <jbeulich@novell.com> + + * config/tc-i386.c (cpu_arch): Add comment. + (i386_target_format): Set cpu_arch_isa_flags and cpu_arch_tune_flags + from the generic entries of cpu_arch[]. + 2010-06-08 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> * config/tc-arm.c (operand_parse_code): Add OP_RRnpctw enum diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 37d8211..0f329a6 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -562,6 +562,8 @@ const relax_typeS md_relax_table[] = static const arch_entry cpu_arch[] = { + /* Do not replace the first two entries - i386_target_format() + relies on them being there in this order. */ { STRING_COMMA_LEN ("generic32"), PROCESSOR_GENERIC32, CPU_GENERIC32_FLAGS, 0 }, { STRING_COMMA_LEN ("generic64"), PROCESSOR_GENERIC64, @@ -8435,54 +8437,17 @@ const char * i386_target_format (void) { if (!strcmp (default_arch, "x86_64")) - { - set_code_flag (CODE_64BIT); - if (cpu_flags_all_zero (&cpu_arch_isa_flags)) - { - cpu_arch_isa_flags.bitfield.cpui186 = 1; - cpu_arch_isa_flags.bitfield.cpui286 = 1; - cpu_arch_isa_flags.bitfield.cpui386 = 1; - cpu_arch_isa_flags.bitfield.cpui486 = 1; - cpu_arch_isa_flags.bitfield.cpui586 = 1; - cpu_arch_isa_flags.bitfield.cpui686 = 1; - cpu_arch_isa_flags.bitfield.cpuclflush = 1; - cpu_arch_isa_flags.bitfield.cpummx= 1; - cpu_arch_isa_flags.bitfield.cpusse = 1; - cpu_arch_isa_flags.bitfield.cpusse2 = 1; - cpu_arch_isa_flags.bitfield.cpulm = 1; - } - if (cpu_flags_all_zero (&cpu_arch_tune_flags)) - { - cpu_arch_tune_flags.bitfield.cpui186 = 1; - cpu_arch_tune_flags.bitfield.cpui286 = 1; - cpu_arch_tune_flags.bitfield.cpui386 = 1; - cpu_arch_tune_flags.bitfield.cpui486 = 1; - cpu_arch_tune_flags.bitfield.cpui586 = 1; - cpu_arch_tune_flags.bitfield.cpui686 = 1; - cpu_arch_tune_flags.bitfield.cpuclflush = 1; - cpu_arch_tune_flags.bitfield.cpummx= 1; - cpu_arch_tune_flags.bitfield.cpusse = 1; - cpu_arch_tune_flags.bitfield.cpusse2 = 1; - } - } + set_code_flag (CODE_64BIT); else if (!strcmp (default_arch, "i386")) - { - set_code_flag (CODE_32BIT); - if (cpu_flags_all_zero (&cpu_arch_isa_flags)) - { - cpu_arch_isa_flags.bitfield.cpui186 = 1; - cpu_arch_isa_flags.bitfield.cpui286 = 1; - cpu_arch_isa_flags.bitfield.cpui386 = 1; - } - if (cpu_flags_all_zero (&cpu_arch_tune_flags)) - { - cpu_arch_tune_flags.bitfield.cpui186 = 1; - cpu_arch_tune_flags.bitfield.cpui286 = 1; - cpu_arch_tune_flags.bitfield.cpui386 = 1; - } - } + set_code_flag (CODE_32BIT); else as_fatal (_("Unknown architecture")); + + if (cpu_flags_all_zero (&cpu_arch_isa_flags)) + cpu_arch_isa_flags = cpu_arch[flag_code == CODE_64BIT].flags; + if (cpu_flags_all_zero (&cpu_arch_tune_flags)) + cpu_arch_tune_flags = cpu_arch[flag_code == CODE_64BIT].flags; + switch (OUTPUT_FLAVOR) { #if defined (OBJ_MAYBE_AOUT) || defined (OBJ_AOUT) |