diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 24 | ||||
-rw-r--r-- | gas/configure.tgt | 1 |
3 files changed, 30 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ce9c733..7010e64 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2015-05-11 H.J. Lu <hongjiu.lu@intel.com> + * configure.tgt (arch): Set to iamcu for i386-*-elfiamcu target. + * config/tc-i386.c (i386_mach): Support iamcu. + (i386_target_format): Likewise. + +2015-05-11 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (cpu_arch): Add iamcu. (i386_align_code): Handle PROCESSOR_IAMCU. (i386_arch): Likewise. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 8a6da64..db263ee 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2468,7 +2468,8 @@ i386_mach (void) else return bfd_mach_x64_32; } - else if (!strcmp (default_arch, "i386")) + else if (!strcmp (default_arch, "i386") + || !strcmp (default_arch, "iamcu")) { if (cpu_arch_isa == PROCESSOR_IAMCU) { @@ -10071,6 +10072,27 @@ i386_target_format (void) } else if (!strcmp (default_arch, "i386")) update_code_flag (CODE_32BIT, 1); + else if (!strcmp (default_arch, "iamcu")) + { + update_code_flag (CODE_32BIT, 1); + if (cpu_arch_isa == PROCESSOR_UNKNOWN) + { + static const i386_cpu_flags iamcu_flags = CPU_IAMCU_FLAGS; + cpu_arch_name = "iamcu"; + cpu_sub_arch_name = NULL; + cpu_arch_flags = iamcu_flags; + cpu_arch_isa = PROCESSOR_IAMCU; + cpu_arch_isa_flags = iamcu_flags; + if (!cpu_arch_tune_set) + { + cpu_arch_tune = cpu_arch_isa; + cpu_arch_tune_flags = cpu_arch_isa_flags; + } + } + else + as_fatal (_("Intel MCU doesn't support `%s' architecture"), + cpu_arch_name); + } else as_fatal (_("unknown architecture")); diff --git a/gas/configure.tgt b/gas/configure.tgt index 09ee275..d14bcdf 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt @@ -215,6 +215,7 @@ case ${generic_target} in i386-*-beospe*) fmt=coff em=pe ;; i386-*-beos*) fmt=elf ;; i386-*-coff) fmt=coff ;; + i386-*-elfiamcu) fmt=elf arch=iamcu ;; i386-*-elf*) fmt=elf ;; i386-*-kaos*) fmt=elf ;; i386-*-bsd*) fmt=aout em=386bsd ;; |