Add Intel MCU support to gas
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 11 May 2015 18:11:19 +0000 (11:11 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 11 May 2015 18:12:39 +0000 (11:12 -0700)
commit814860358c2e4194d372018dd1ae78b5c95a44d0
treec937ad8adddc54e3de0f75509aab0a017b5eceb1
parent7b6d09fbc60b12c196b25a9ebbb77ddc24e06334
Add Intel MCU support to gas

-march=iamcu must be passed to i386 assembler to generate Intel MCU object
file.

gas/

* config/tc-i386.c (cpu_arch): Add iamcu.
(i386_align_code): Handle PROCESSOR_IAMCU.
(i386_arch): Likewise.
(i386_mach): Likewise.
(i386_target_format): Likewise.
(valid_iamcu_cpu_flags): New function.
(check_cpu_arch_compatible): Only allow Intel MCU instructions
when targeting Intel MCU.
(set_cpu_arch): Call valid_iamcu_cpu_flags to check if CPU flags
are valid for Intel MCU.
(md_parse_option): Likewise.
* tc-i386.h (ELF_TARGET_IAMCU_FORMAT): New.
(processor_type): Add PROCESSOR_IAMCU.
* doc/c-i386.texi: Document iamcu.

gas/testsuite/

* gas/i386/i386.exp: Run iamcu-1, iamcu-2, iamcu-3, iamcu-inval-1,
iamcu-inval-2 and iamcu-inval-3.
* gas/i386/iamcu-1.d: New file.
* gas/i386/iamcu-1.s: Likewise.
* gas/i386/iamcu-2.d: Likewise.
* gas/i386/iamcu-2.s: Likewise.
* gas/i386/iamcu-3.d: Likewise.
* gas/i386/iamcu-3.s: Likewise.
* gas/i386/iamcu-inval-1.l: Likewise.
* gas/i386/iamcu-inval-1.s: Likewise.
* gas/i386/iamcu-inval-2.l: Likewise.
* gas/i386/iamcu-inval-2.s: Likewise.
* gas/i386/iamcu-inval-3.l: Likewise.
* gas/i386/iamcu-inval-3.s: Likewise.
18 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/config/tc-i386.h
gas/doc/c-i386.texi
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/iamcu-1.d [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-1.s [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-2.d [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-2.s [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-3.s [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-inval-1.l [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-inval-1.s [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-inval-2.l [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-inval-2.s [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-inval-3.l [new file with mode: 0644]
gas/testsuite/gas/i386/iamcu-inval-3.s [new file with mode: 0644]