config.gcc (i[34567]86-*-rdos*, [...]): New targets.
* config.gcc (i[34567]86-*-rdos*, x86_64-*-rdos*): New targets. * config/i386/i386.h (TARGET_RDOS): New macro. (DEFAULT_LARGE_SECTION_THRESHOLD): New macro. * config/i386/i386.c (ix86_option_override_internal): For 64bit TARGET_RDOS, set ix86_cmodel to CM_MEDIUM_PIC and flag_pic to 1. * config/i386/i386.opt (mlarge-data-threshold): Initialize to DEFAULT_LARGE_SECTION_THRESHOLD. * config/i386/i386.md (R14_REG, R15_REG): New constants. * config/i386/rdos.h: New file. * config/i386/rdos64.h: New file. From-SVN: r195516
This commit is contained in:
parent
51e44392b3
commit
5a579c3b65
@ -1,3 +1,16 @@
|
|||||||
|
2013-01-28 Leif Ekblad <leif@rdos.net>
|
||||||
|
|
||||||
|
* config.gcc (i[34567]86-*-rdos*, x86_64-*-rdos*): New targets.
|
||||||
|
* config/i386/i386.h (TARGET_RDOS): New macro.
|
||||||
|
(DEFAULT_LARGE_SECTION_THRESHOLD): New macro.
|
||||||
|
* config/i386/i386.c (ix86_option_override_internal): For 64bit
|
||||||
|
TARGET_RDOS, set ix86_cmodel to CM_MEDIUM_PIC and flag_pic to 1.
|
||||||
|
* config/i386/i386.opt (mlarge-data-threshold): Initialize to
|
||||||
|
DEFAULT_LARGE_SECTION_THRESHOLD.
|
||||||
|
* config/i386/i386.md (R14_REG, R15_REG): New constants.
|
||||||
|
* config/i386/rdos.h: New file.
|
||||||
|
* config/i386/rdos64.h: New file.
|
||||||
|
|
||||||
2013-01-28 Bernd Schmidt <bernds@codesourcery.com>
|
2013-01-28 Bernd Schmidt <bernds@codesourcery.com>
|
||||||
|
|
||||||
PR other/54814
|
PR other/54814
|
||||||
|
@ -738,6 +738,9 @@ case ${target} in
|
|||||||
use_gcc_stdint=wrap
|
use_gcc_stdint=wrap
|
||||||
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
|
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
|
||||||
;;
|
;;
|
||||||
|
*-*-rdos*)
|
||||||
|
use_gcc_stdint=wrap
|
||||||
|
;;
|
||||||
*-*-solaris2*)
|
*-*-solaris2*)
|
||||||
# i?86-*-solaris2* needs to insert headers between cpu default and
|
# i?86-*-solaris2* needs to insert headers between cpu default and
|
||||||
# Solaris 2 specific ones.
|
# Solaris 2 specific ones.
|
||||||
@ -1204,6 +1207,13 @@ i[34567]86-*-elf*)
|
|||||||
x86_64-*-elf*)
|
x86_64-*-elf*)
|
||||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
|
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
|
||||||
;;
|
;;
|
||||||
|
i[34567]86-*-rdos*)
|
||||||
|
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
|
||||||
|
;;
|
||||||
|
x86_64-*-rdos*)
|
||||||
|
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
|
||||||
|
tmake_file="i386/t-i386elf t-svr4"
|
||||||
|
;;
|
||||||
i[34567]86-*-freebsd*)
|
i[34567]86-*-freebsd*)
|
||||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
|
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
|
||||||
;;
|
;;
|
||||||
|
@ -3235,10 +3235,12 @@ ix86_option_override_internal (bool main_args_p)
|
|||||||
DLL, and is essentially just as efficient as direct addressing. */
|
DLL, and is essentially just as efficient as direct addressing. */
|
||||||
if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
|
if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
|
||||||
ix86_cmodel = CM_SMALL_PIC, flag_pic = 1;
|
ix86_cmodel = CM_SMALL_PIC, flag_pic = 1;
|
||||||
|
else if (TARGET_64BIT && TARGET_RDOS)
|
||||||
|
ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
|
||||||
else if (TARGET_64BIT)
|
else if (TARGET_64BIT)
|
||||||
ix86_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL;
|
ix86_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL;
|
||||||
else
|
else
|
||||||
ix86_cmodel = CM_32;
|
ix86_cmodel = CM_32;
|
||||||
}
|
}
|
||||||
if (TARGET_MACHO && ix86_asm_dialect == ASM_INTEL)
|
if (TARGET_MACHO && ix86_asm_dialect == ASM_INTEL)
|
||||||
{
|
{
|
||||||
|
@ -518,6 +518,9 @@ extern tree x86_mfence;
|
|||||||
#define MACHOPIC_INDIRECT 0
|
#define MACHOPIC_INDIRECT 0
|
||||||
#define MACHOPIC_PURE 0
|
#define MACHOPIC_PURE 0
|
||||||
|
|
||||||
|
/* For the RDOS */
|
||||||
|
#define TARGET_RDOS 0
|
||||||
|
|
||||||
/* For the Windows 64-bit ABI. */
|
/* For the Windows 64-bit ABI. */
|
||||||
#define TARGET_64BIT_MS_ABI (TARGET_64BIT && ix86_cfun_abi () == MS_ABI)
|
#define TARGET_64BIT_MS_ABI (TARGET_64BIT && ix86_cfun_abi () == MS_ABI)
|
||||||
|
|
||||||
@ -2081,6 +2084,10 @@ do { \
|
|||||||
asm (SECTION_OP "\n\t" \
|
asm (SECTION_OP "\n\t" \
|
||||||
"call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n" \
|
"call " CRT_MKSTR(__USER_LABEL_PREFIX__) #FUNC "\n" \
|
||||||
TEXT_SECTION_ASM_OP);
|
TEXT_SECTION_ASM_OP);
|
||||||
|
|
||||||
|
/* Default threshold for putting data in large sections
|
||||||
|
with x86-64 medium memory model */
|
||||||
|
#define DEFAULT_LARGE_SECTION_THRESHOLD 65536
|
||||||
|
|
||||||
/* Which processor to tune code generation for. */
|
/* Which processor to tune code generation for. */
|
||||||
|
|
||||||
|
@ -300,6 +300,8 @@
|
|||||||
(R11_REG 40)
|
(R11_REG 40)
|
||||||
(R12_REG 41)
|
(R12_REG 41)
|
||||||
(R13_REG 42)
|
(R13_REG 42)
|
||||||
|
(R14_REG 43)
|
||||||
|
(R15_REG 44)
|
||||||
(XMM8_REG 45)
|
(XMM8_REG 45)
|
||||||
(XMM9_REG 46)
|
(XMM9_REG 46)
|
||||||
(XMM10_REG 47)
|
(XMM10_REG 47)
|
||||||
|
@ -140,7 +140,7 @@ Target RejectNegative Joined UInteger Var(ix86_branch_cost)
|
|||||||
Branches are this expensive (1-5, arbitrary units)
|
Branches are this expensive (1-5, arbitrary units)
|
||||||
|
|
||||||
mlarge-data-threshold=
|
mlarge-data-threshold=
|
||||||
Target RejectNegative Joined UInteger Var(ix86_section_threshold) Init(65536)
|
Target RejectNegative Joined UInteger Var(ix86_section_threshold) Init(DEFAULT_LARGE_SECTION_THRESHOLD)
|
||||||
Data greater than given threshold will go into .ldata section in x86-64 medium model
|
Data greater than given threshold will go into .ldata section in x86-64 medium model
|
||||||
|
|
||||||
mcmodel=
|
mcmodel=
|
||||||
|
33
gcc/config/i386/rdos.h
Normal file
33
gcc/config/i386/rdos.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/* Definitions for RDOS on i386.
|
||||||
|
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GCC.
|
||||||
|
|
||||||
|
GCC is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GCC is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GCC; see the file COPYING3. If not see
|
||||||
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* RDOS uses .exe suffix */
|
||||||
|
#undef TARGET_EXECUTABLE_SUFFIX
|
||||||
|
#define TARGET_EXECUTABLE_SUFFIX ".exe"
|
||||||
|
|
||||||
|
#undef TARGET_RDOS
|
||||||
|
#define TARGET_RDOS 1
|
||||||
|
|
||||||
|
#define TARGET_OS_CPP_BUILTINS() \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
builtin_define ("__RDOS__"); \
|
||||||
|
builtin_assert ("system=rdos"); \
|
||||||
|
} \
|
||||||
|
while (0)
|
24
gcc/config/i386/rdos64.h
Normal file
24
gcc/config/i386/rdos64.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/* Definitions for RDOS on x86_64.
|
||||||
|
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GCC.
|
||||||
|
|
||||||
|
GCC is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GCC is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GCC; see the file COPYING3. If not see
|
||||||
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#undef REAL_PIC_OFFSET_TABLE_REGNUM
|
||||||
|
#define REAL_PIC_OFFSET_TABLE_REGNUM R15_REG
|
||||||
|
|
||||||
|
#undef DEFAULT_LARGE_SECTION_THRESHOLD
|
||||||
|
#define DEFAULT_LARGE_SECTION_THRESHOLD 16
|
Loading…
Reference in New Issue
Block a user