mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Add x86_64-mingw64 target
This commit is contained in:
@ -1,3 +1,17 @@
|
||||
2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
|
||||
|
||||
* configure.in: Add new target x86_64-pc-mingw64.
|
||||
* configure: Regenerate.
|
||||
* configure.tgt: Add new target x86_64-pc-mingw64.
|
||||
* config/obj-coff.h: Add handling for TE_PEP target specific code and definitions.
|
||||
* config/tc-i386.c: Add new targets.
|
||||
(md_parse_option): Add targets to OPTION_64.
|
||||
(x86_64_target_format): Add new method for setup proper default target cpu mode.
|
||||
* config/te-pep.h: Add new target definition header.
|
||||
(TE_PEP): New macro: Identifies new target architecture.
|
||||
(COFF_WITH_pex64): Set proper includes in bfd.
|
||||
* NEWS: Mention new target.
|
||||
|
||||
2006-09-18 Bernd Schmidt <bernd.schmidt@analog.com>
|
||||
|
||||
* config/bfin-parse.y (binary): Change sub of const to add of negated
|
||||
|
2
gas/NEWS
2
gas/NEWS
@ -1,4 +1,6 @@
|
||||
-*- text -*-
|
||||
* Add support for x86_64 PE+ target.
|
||||
|
||||
* Add support for Score target.
|
||||
|
||||
* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
|
||||
|
@ -55,16 +55,30 @@
|
||||
#endif
|
||||
|
||||
#ifdef TC_I386
|
||||
#ifndef TE_PEP
|
||||
#include "coff/x86_64.h"
|
||||
#else
|
||||
#include "coff/i386.h"
|
||||
#endif
|
||||
|
||||
#ifdef TE_PE
|
||||
#ifdef TE_PEP
|
||||
extern const char * x86_64_target_format (void);
|
||||
#define TARGET_FORMAT x86_64_target_format ()
|
||||
#define COFF_TARGET_FORMAT "pe-x86-64"
|
||||
#else
|
||||
#define TARGET_FORMAT "pe-i386"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_FORMAT
|
||||
#ifdef TE_PEP
|
||||
#define TARGET_FORMAT "coff-x86-64"
|
||||
#else
|
||||
#define TARGET_FORMAT "coff-i386"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TC_M68K
|
||||
#include "coff/m68k.h"
|
||||
|
@ -5766,9 +5766,10 @@ const char *md_shortopts = "qn";
|
||||
#define OPTION_MARCH (OPTION_MD_BASE + 3)
|
||||
#define OPTION_MTUNE (OPTION_MD_BASE + 4)
|
||||
|
||||
struct option md_longopts[] = {
|
||||
struct option md_longopts[] =
|
||||
{
|
||||
{"32", no_argument, NULL, OPTION_32},
|
||||
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
|
||||
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
|
||||
{"64", no_argument, NULL, OPTION_64},
|
||||
#endif
|
||||
{"divide", no_argument, NULL, OPTION_DIVIDE},
|
||||
@ -5812,14 +5813,18 @@ md_parse_option (int c, char *arg)
|
||||
/* -s: On i386 Solaris, this tells the native assembler to use
|
||||
.stab instead of .stab.excl. We always use .stab anyhow. */
|
||||
break;
|
||||
|
||||
#endif
|
||||
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
|
||||
case OPTION_64:
|
||||
{
|
||||
const char **list, **l;
|
||||
|
||||
list = bfd_target_list ();
|
||||
for (l = list; *l != NULL; l++)
|
||||
if (strncmp (*l, "elf64-x86-64", 12) == 0)
|
||||
if ( strncmp (*l, "elf64-x86-64", 12) == 0
|
||||
|| strcmp (*l, "coff-x86-64") == 0
|
||||
|| strcmp (*l, "pe-x86-64") == 0
|
||||
|| strcmp (*l, "pei-x86-64") == 0)
|
||||
{
|
||||
default_arch = "x86_64";
|
||||
break;
|
||||
@ -5927,6 +5932,26 @@ md_show_usage (stream)
|
||||
|
||||
}
|
||||
|
||||
#if defined(TE_PEP)
|
||||
const char *
|
||||
x86_64_target_format (void)
|
||||
{
|
||||
if (strcmp (default_arch, "x86_64") == 0)
|
||||
{
|
||||
set_code_flag (CODE_64BIT);
|
||||
return COFF_TARGET_FORMAT;
|
||||
}
|
||||
else if (strcmp (default_arch, "i386") == 0)
|
||||
{
|
||||
set_code_flag (CODE_32BIT);
|
||||
return "coff-i386";
|
||||
}
|
||||
|
||||
as_fatal (_("Unknown architecture"));
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
|
||||
|| defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
|
||||
|
||||
|
10
gas/config/te-pep.h
Normal file
10
gas/config/te-pep.h
Normal file
@ -0,0 +1,10 @@
|
||||
#define TE_PEP
|
||||
#define COFF_WITH_pex64
|
||||
|
||||
#define TE_PE
|
||||
#define LEX_AT (LEX_BEGIN_NAME | LEX_NAME) /* Can have @'s inside labels. */
|
||||
|
||||
/* The PE format supports long section names. */
|
||||
#define COFF_LONG_SECTION_NAMES
|
||||
|
||||
#include "obj-format.h"
|
24
gas/configure
vendored
24
gas/configure
vendored
@ -3921,7 +3921,7 @@ ia64-*-hpux*)
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
|
||||
x86_64-*linux*|x86_64-*mingw64*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
@ -3932,7 +3932,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
case $host in
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-*mingw64*)
|
||||
LD="${LD-ld} -m elf_i386"
|
||||
;;
|
||||
ppc64-*linux*|powerpc64-*linux*)
|
||||
@ -3948,7 +3948,7 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
|
||||
;;
|
||||
*64-bit*)
|
||||
case $host in
|
||||
x86_64-*linux*)
|
||||
x86_64-*linux*|x86_64-*mingw64*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
@ -4895,6 +4895,19 @@ if test ${all_targets} = "yes"; then
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
x86_64)
|
||||
case ${obj_format} in
|
||||
aout)
|
||||
emulations="$emulations i386coff i386elf"
|
||||
;;
|
||||
coff)
|
||||
emulations="$emulations i386aout i386elf"
|
||||
;;
|
||||
elf)
|
||||
emulations="$emulations i386aout i386coff"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -4956,6 +4969,11 @@ _ACEOF
|
||||
m88k)
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define M88KCOFF 1
|
||||
_ACEOF
|
||||
;;
|
||||
x86_64)
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define I386COFF 1
|
||||
_ACEOF
|
||||
;;
|
||||
esac
|
||||
|
@ -417,6 +417,19 @@ if test ${all_targets} = "yes"; then
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
x86_64)
|
||||
case ${obj_format} in
|
||||
aout)
|
||||
emulations="$emulations i386coff i386elf"
|
||||
;;
|
||||
coff)
|
||||
emulations="$emulations i386aout i386elf"
|
||||
;;
|
||||
elf)
|
||||
emulations="$emulations i386aout i386coff"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -461,6 +474,7 @@ case ${obj_format} in
|
||||
i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
|
||||
m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
|
||||
m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
|
||||
x86_64) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -79,7 +79,7 @@ case ${cpu} in
|
||||
strongarm*b) cpu_type=arm endian=big ;;
|
||||
strongarm*) cpu_type=arm endian=little ;;
|
||||
v850*) cpu_type=v850 ;;
|
||||
x86_64) cpu_type=i386 arch=x86_64;;
|
||||
x86_64*) cpu_type=i386 arch=x86_64;;
|
||||
xscale*be|xscale*b) cpu_type=arm endian=big ;;
|
||||
xscale*) cpu_type=arm endian=little ;;
|
||||
xtensa*) cpu_type=xtensa arch=xtensa ;;
|
||||
@ -212,6 +212,7 @@ case ${generic_target} in
|
||||
i386-*-cygwin*) fmt=coff em=pe ;;
|
||||
i386-*-interix*) fmt=coff em=interix ;;
|
||||
i386-*-mingw32*) fmt=coff em=pe ;;
|
||||
i386-*-mingw64*) fmt=coff em=pep ;;
|
||||
i386-*-nto-qnx*) fmt=elf ;;
|
||||
i386-*-*nt*) fmt=coff em=pe ;;
|
||||
i386-*-chaos) fmt=elf ;;
|
||||
|
@ -1,3 +1,18 @@
|
||||
2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
|
||||
|
||||
* gas/all/gas.exp: Add support for x86_64-*-mingw64.
|
||||
* gas/i386/immed64.d: Add #pass for avoid proplems with alignment paddings.
|
||||
* gas/i386/rex.d: Changed for x86_64-mingw32 target matching and padding.
|
||||
* gas/i386/i386.d: Likewise.
|
||||
* gas/i386/x86-64-addr32.d: Likewise.
|
||||
* gas/i386/x86-64-branch.d: Likewise.
|
||||
* gas/i386/x86-64-crx-suffix.d: Likewise.
|
||||
* gas/i386/x86-64-crx.d: Likewise.
|
||||
* gas/i386/x86-64-drx-suffix.d: Likewise.
|
||||
* gas/i386/x86-64-crx-suffix.d: Likewise.
|
||||
* gas/i386/x86-64-opcode.d: Likewise.
|
||||
* gas/i386/x86-64-pcrel.d: Likewise.
|
||||
|
||||
2006-09-19 Bernd Schmidt <bernd.schmidt@analog.com>
|
||||
|
||||
* gas/bfin/load.s, gas/bfin/load.d: Add constant folding tests.
|
||||
|
@ -207,6 +207,7 @@ if { ([istarget *-*-coff*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-
|
||||
|| [istarget i*86-*-isc*] \
|
||||
|| [istarget i*86-*-go32*] \
|
||||
|| [istarget i*86-*-cygwin*] \
|
||||
|| [istarget x86_64-*-mingw64*] \
|
||||
|| [istarget i*86-*-*nt] \
|
||||
|| [istarget i*86-*-interix*] \
|
||||
|| ([istarget i960-*-vxworks5.*] && ![istarget i960-*-vxworks5.0*]) } {
|
||||
|
@ -155,7 +155,9 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
|
||||
run_dump_test "x86-64-rep-suffix"
|
||||
run_dump_test "x86-64-gidt"
|
||||
run_dump_test "x86-64-nops"
|
||||
if ![istarget "*-*-mingw64*"] then {
|
||||
run_dump_test "x86-64-nops-1"
|
||||
}
|
||||
run_dump_test "x86-64-nops-1-k8"
|
||||
run_dump_test "x86-64-nops-1-nocona"
|
||||
run_dump_test "x86-64-nops-1-merom"
|
||||
|
@ -57,3 +57,4 @@ Disassembly of section \.text:
|
||||
[ ]*[0-9a-fA-F]+:[ ]+e5 04[ ]+inl? +\$0x4,%eax
|
||||
[ ]*[0-9a-fA-F]+:[ ]+e5 08[ ]+inl? +\$0x8,%eax
|
||||
[ ]*[0-9a-fA-F]+:[ ]+e5 00[ ]+inl? +\$0x0,%eax
|
||||
#pass
|
||||
|
@ -1,7 +1,7 @@
|
||||
#objdump: -dw
|
||||
#name: x86-64 manual rex prefix use
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#objdump: -drw
|
||||
#name: x86-64 32-bit addressing
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
@ -11,3 +11,4 @@ Disassembly of section .text:
|
||||
[ ]*8:[ ]+67 49 8d 80 00 00 00 00[ ]+addr32[ ]+lea[ ]+0x0\(%r8d?\),%rax.*
|
||||
[ ]*10:[ ]+67 48 8d 05 00 00 00 00[ ]+addr32[ ]+lea[ ]+0\(%[re]ip\),%rax.*
|
||||
[ ]*18:[ ]+67 48 8d 04 25 00 00 00 00[ ]+addr32[ ]+lea[ ]+0x0,%rax.*
|
||||
#pass
|
||||
|
@ -2,7 +2,7 @@
|
||||
#objdump: -drw
|
||||
#name: x86-64 indirect branch
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
@ -11,3 +11,4 @@ Disassembly of section .text:
|
||||
[ ]*2:[ ]+ff d0[ ]+callq[ ]+\*%rax
|
||||
[ ]*4:[ ]+ff e0[ ]+jmpq[ ]+\*%rax
|
||||
[ ]*6:[ ]+ff e0[ ]+jmpq[ ]+\*%rax
|
||||
#pass
|
||||
|
@ -2,7 +2,7 @@
|
||||
#name: x86-64 control register related opcodes (with suffixes)
|
||||
#source: x86-64-crx.s
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#name: x86-64 control register related opcodes
|
||||
#source: x86-64-crx.s
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#name: x86-64 debug register related opcodes (with suffixes)
|
||||
#source: x86-64-drx.s
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#objdump: -dw
|
||||
#name: x86-64 debug register related opcodes
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#objdump: -drw
|
||||
#name: x86-64 opcode
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#objdump: -drw
|
||||
#name: x86-64 pcrel
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#objdump: -drw
|
||||
#name: x86-64 rip addressing
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
@ -11,3 +11,4 @@ Disassembly of section .text:
|
||||
[ ]*6:[ ]+8d 05 11 11 11 11[ ]+lea[ ]+286331153\(%rip\),%eax[ ]*(#.*)?
|
||||
[ ]*c:[ ]+8d 05 01 00 00 00[ ]+lea[ ]+1\(%rip\),%eax[ ]*(#.*)?
|
||||
[ ]*12:[ ]+8d 05 00 00 00 00[ ]+lea[ ]+0\(%rip\),%eax[ ]*(#.*)?
|
||||
#pass
|
||||
|
@ -2,7 +2,7 @@
|
||||
#name: x86-64 stack-related opcodes (Intel mode)
|
||||
#source: x86-64-stack.s
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#name: x86-64 stack-related opcodes (with suffixes)
|
||||
#source: x86-64-stack.s
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#objdump: -dw
|
||||
#name: x86-64 stack-related opcodes
|
||||
|
||||
.*: +file format elf64-x86-64
|
||||
.*: +file format .*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
0+ <bar-0x1a7>:
|
||||
0+ <.*>:
|
||||
[ ]+0: 01 ca[ ]+add[ ]+%ecx,%edx
|
||||
[ ]+2: 44 01 ca[ ]+add[ ]+%r9d,%edx
|
||||
[ ]+5: 41 01 ca[ ]+add[ ]+%ecx,%r10d
|
||||
|
Reference in New Issue
Block a user