vms.opt: Add vms-opts.h header.
2012-03-12 Tristan Gingold <gingold@adacore.com> * config/vms/vms.opt: Add vms-opts.h header. (mmalloc64): Use flag_vms_malloc64 flag instead of MALLOC64 target mask. (-mvms-return-codes): Document. (-mpointer-size): New option. (vms_pointer_size): Add enumeration. * config/vms/vms-opts.h: New file. * config/vms/vms.h (TARGET_OS_CPP_BUILTINS): Define __INITIAL_POINTER_SIZE. (POINTER_SIZE, SIZE_TYPE, PTRDIFF_TYPE): Adjust definition. (C_COMMON_OVERRIDE_OPTIONS): Define. (DWARF2_ADDR_SIZE): Define. * config/vms/vms.c (vms_patch_builtins): Adjust condition. * config/vms/vms-protos.h (vms_c_common_override_options): New prototype. * config/vms/vms-c.c (vms_pragma_pointer_size): Ignore pragma if -mno-pointer-size. (vms_c_common_override_options): New function. * config/ia64/vms.h (TARGET_DEFAULT): Remove MASK_MALLOC64. * config/alpha/vms.h (TARGET_DEFAULT): Remove MASK_MALLOC64. (MALLOC_ABI_ALIGNMENT): Use flag_vms_malloc64 and flag_vms_pointer_size. (MASK_RETURN_ADDR): Set according to flag_vms_pointer_size. * config.gcc (*-*-*vms*): Define xm_file. (alpha*-dec-*vms*): Do not define xm_file. (alpha64-dec-*vms*): Remove. (ia64-hp-*vms*): Do not define xm_file. Simplify tm_file and tmake_file. libgcc/ 2012-03-12 Tristan Gingold <gingold@adacore.com> * config/alpha/t-vms: Define HOST_LIBGCC2_CFLAGS. * config/ia64/t-vms: Likewise. gcc/ada/ 2012-03-12 Tristan Gingold <gingold@adacore.com> * gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64 instead of TARGET_MALLOC64. * gcc-interface/gigi.h (flag_vms_malloc64): Define instead of TARGET_MALLOC64. From-SVN: r185224
This commit is contained in:
parent
10ee90e9fe
commit
d8aba32a09
17 changed files with 172 additions and 76 deletions
|
@ -1,3 +1,34 @@
|
|||
2012-03-12 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/vms/vms.opt: Add vms-opts.h header.
|
||||
(mmalloc64): Use flag_vms_malloc64 flag instead of MALLOC64
|
||||
target mask.
|
||||
(-mvms-return-codes): Document.
|
||||
(-mpointer-size): New option.
|
||||
(vms_pointer_size): Add enumeration.
|
||||
* config/vms/vms-opts.h: New file.
|
||||
* config/vms/vms.h (TARGET_OS_CPP_BUILTINS): Define
|
||||
__INITIAL_POINTER_SIZE.
|
||||
(POINTER_SIZE, SIZE_TYPE, PTRDIFF_TYPE): Adjust definition.
|
||||
(C_COMMON_OVERRIDE_OPTIONS): Define.
|
||||
(DWARF2_ADDR_SIZE): Define.
|
||||
* config/vms/vms.c (vms_patch_builtins): Adjust condition.
|
||||
* config/vms/vms-protos.h (vms_c_common_override_options):
|
||||
New prototype.
|
||||
* config/vms/vms-c.c (vms_pragma_pointer_size): Ignore pragma
|
||||
if -mno-pointer-size.
|
||||
(vms_c_common_override_options): New function.
|
||||
* config/ia64/vms.h (TARGET_DEFAULT): Remove MASK_MALLOC64.
|
||||
* config/alpha/vms.h (TARGET_DEFAULT): Remove MASK_MALLOC64.
|
||||
(MALLOC_ABI_ALIGNMENT): Use flag_vms_malloc64
|
||||
and flag_vms_pointer_size.
|
||||
(MASK_RETURN_ADDR): Set according to flag_vms_pointer_size.
|
||||
* config.gcc (*-*-*vms*): Define xm_file.
|
||||
(alpha*-dec-*vms*): Do not define xm_file.
|
||||
(alpha64-dec-*vms*): Remove.
|
||||
(ia64-hp-*vms*): Do not define xm_file. Simplify tm_file
|
||||
and tmake_file.
|
||||
|
||||
2012-03-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/51721
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2012-03-12 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* gcc-interface/decl.c (gnat_to_gnu_param): Use flag_vms_malloc64
|
||||
instead of TARGET_MALLOC64.
|
||||
* gcc-interface/gigi.h (flag_vms_malloc64): Define instead
|
||||
of TARGET_MALLOC64.
|
||||
|
||||
2012-03-09 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* a-direct.adb, comperr.adb, freeze.adb: Minor reformatting.
|
||||
|
|
|
@ -5488,7 +5488,7 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech,
|
|||
|
||||
/* VMS descriptors are themselves passed by reference. */
|
||||
if (mech == By_Short_Descriptor ||
|
||||
(mech == By_Descriptor && TARGET_ABI_OPEN_VMS && !TARGET_MALLOC64))
|
||||
(mech == By_Descriptor && TARGET_ABI_OPEN_VMS && !flag_vms_malloc64))
|
||||
gnu_param_type
|
||||
= build_pointer_type (build_vms_descriptor32 (gnu_param_type,
|
||||
Mechanism (gnat_param),
|
||||
|
|
|
@ -999,13 +999,11 @@ extern void enumerate_modes (void (*f) (const char *, int, int, int, int, int,
|
|||
intrusive preprocessor directives. */
|
||||
#ifndef TARGET_ABI_OPEN_VMS
|
||||
#define TARGET_ABI_OPEN_VMS 0
|
||||
#endif
|
||||
|
||||
/* VMS macro set by default, when clear forces 32bit mallocs and 32bit
|
||||
/* VMS option set by default, when clear forces 32bit mallocs and 32bit
|
||||
Descriptors. Always used in combination with TARGET_ABI_OPEN_VMS
|
||||
so no effect on non-VMS systems. */
|
||||
#ifndef TARGET_MALLOC64
|
||||
#define TARGET_MALLOC64 0
|
||||
#define flag_vms_malloc64 0
|
||||
#endif
|
||||
|
||||
/* Convenient shortcuts. */
|
||||
|
|
|
@ -737,6 +737,7 @@ case ${target} in
|
|||
extra_objs="vms.o"
|
||||
target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
|
||||
tm_p_file="${tm_p_file} vms/vms-protos.h"
|
||||
xm_file="vms/xm-vms.h"
|
||||
c_target_objs="vms-c.o"
|
||||
cxx_target_objs="vms-c.o"
|
||||
if test x$gnu_ld != xyes; then
|
||||
|
@ -811,14 +812,8 @@ alpha*-dec-osf5.1*)
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
alpha64-dec-*vms*)
|
||||
tm_file="${tm_file} vms/vms.h vms/vms64.h alpha/vms.h"
|
||||
xm_file="alpha/xm-vms.h vms/xm-vms64.h"
|
||||
tmake_file="${tmake_file} vms/t-vms64 alpha/t-vms"
|
||||
;;
|
||||
alpha*-dec-*vms*)
|
||||
tm_file="${tm_file} vms/vms.h alpha/vms.h"
|
||||
xm_file="alpha/xm-vms.h"
|
||||
tmake_file="${tmake_file} alpha/t-vms"
|
||||
;;
|
||||
arm-wrs-vxworks)
|
||||
|
@ -1556,9 +1551,8 @@ ia64*-*-hpux*)
|
|||
esac
|
||||
;;
|
||||
ia64-hp-*vms*)
|
||||
tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h vms/vms.h vms/vms64.h ia64/vms.h"
|
||||
xm_file="vms/xm-vms.h vms/xm-vms64.h"
|
||||
tmake_file="${tmake_file} vms/t-vms64 ia64/t-ia64"
|
||||
tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
|
||||
tmake_file="${tmake_file} ia64/t-ia64"
|
||||
target_cpu_default="0"
|
||||
if test x$gas = xyes
|
||||
then
|
||||
|
|
|
@ -44,11 +44,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
} while (0)
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#if POINTER_SIZE == 64
|
||||
#define TARGET_DEFAULT (MASK_FPREGS | MASK_GAS | MASK_MALLOC64)
|
||||
#else
|
||||
#define TARGET_DEFAULT (MASK_FPREGS | MASK_GAS)
|
||||
#endif
|
||||
|
||||
#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO"
|
||||
|
||||
|
@ -58,7 +54,9 @@ along with GCC; see the file COPYING3. If not see
|
|||
|
||||
/* The maximum alignment 'malloc' honors. */
|
||||
#undef MALLOC_ABI_ALIGNMENT
|
||||
#define MALLOC_ABI_ALIGNMENT ((TARGET_MALLOC64 ? 16 : 8) * BITS_PER_UNIT)
|
||||
#define MALLOC_ABI_ALIGNMENT \
|
||||
((flag_vms_malloc64 && flag_vms_pointer_size != VMS_POINTER_SIZE_NONE \
|
||||
? 16 : 8) * BITS_PER_UNIT)
|
||||
|
||||
#undef FIXED_REGISTERS
|
||||
#define FIXED_REGISTERS \
|
||||
|
@ -160,11 +158,12 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info;
|
|||
|
||||
#define DEFAULT_PCC_STRUCT_RETURN 0
|
||||
|
||||
#if POINTER_SIZE == 64
|
||||
/* Eventhough pointers are 64bits, only 32bit ever remain significant in code
|
||||
addresses. */
|
||||
#define MASK_RETURN_ADDR (GEN_INT (0xffffffff))
|
||||
#endif
|
||||
#define MASK_RETURN_ADDR \
|
||||
(flag_vms_pointer_size == VMS_POINTER_SIZE_NONE \
|
||||
? constm1_rtx \
|
||||
: GEN_INT (0xffffffff))
|
||||
|
||||
#undef ASM_WEAKEN_LABEL
|
||||
#define ASM_WEAKEN_LABEL(FILE, NAME) \
|
||||
|
|
|
@ -28,11 +28,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
|
||||
/* Need .debug_line info generated from gcc and gas. */
|
||||
#undef TARGET_DEFAULT
|
||||
#if POINTER_SIZE == 64
|
||||
#define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_GNU_AS | MASK_MALLOC64)
|
||||
#else
|
||||
#define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_GNU_AS)
|
||||
#endif
|
||||
|
||||
#define VMS_DEBUG_MAIN_POINTER "TRANSFER$BREAK$GO"
|
||||
|
||||
|
|
|
@ -335,8 +335,8 @@ handle_pragma_pointer_size (const char *pragma_name)
|
|||
static void
|
||||
vms_pragma_pointer_size (cpp_reader * ARG_UNUSED (dummy))
|
||||
{
|
||||
/* Ignore if 32 bit only. */
|
||||
if (POINTER_SIZE != 64)
|
||||
/* Ignore if no -mpointer-size option. */
|
||||
if (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE)
|
||||
return;
|
||||
|
||||
handle_pragma_pointer_size ("pointer_size");
|
||||
|
@ -449,3 +449,20 @@ vms_c_register_includes (const char *sysroot,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
vms_c_common_override_options (void)
|
||||
{
|
||||
/* Initialize c_default_pointer_mode. */
|
||||
switch (flag_vms_pointer_size)
|
||||
{
|
||||
case VMS_POINTER_SIZE_NONE:
|
||||
break;
|
||||
case VMS_POINTER_SIZE_32:
|
||||
c_default_pointer_mode = SImode;
|
||||
break;
|
||||
case VMS_POINTER_SIZE_64:
|
||||
c_default_pointer_mode = DImode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
31
gcc/config/vms/vms-opts.h
Normal file
31
gcc/config/vms/vms-opts.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* Definitions for option handling for OpenVMS.
|
||||
Copyright (C) 2012
|
||||
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/>. */
|
||||
|
||||
#ifndef VMS_OPTS_H
|
||||
#define VMS_OPTS_H
|
||||
|
||||
enum vms_pointer_size
|
||||
{
|
||||
VMS_POINTER_SIZE_NONE,
|
||||
VMS_POINTER_SIZE_32,
|
||||
VMS_POINTER_SIZE_64
|
||||
};
|
||||
|
||||
#endif
|
|
@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
|
||||
/* vms-c.c */
|
||||
extern void vms_c_register_pragma (void);
|
||||
extern void vms_c_common_override_options (void);
|
||||
|
||||
/* vms.c */
|
||||
void vms_patch_builtins (void);
|
||||
|
|
|
@ -160,9 +160,11 @@ vms_patch_builtins (void)
|
|||
alt[1 + nlen + 2] = 0;
|
||||
vms_add_crtl_xlat (alt, nlen + 3, res, rlen + nlen);
|
||||
|
||||
use_64 = (((n->flags & VMS_CRTL_64) && POINTER_SIZE == 64)
|
||||
use_64 = (((n->flags & VMS_CRTL_64)
|
||||
&& flag_vms_pointer_size == VMS_POINTER_SIZE_64)
|
||||
|| ((n->flags & VMS_CRTL_MALLOC)
|
||||
&& TARGET_MALLOC64));
|
||||
&& flag_vms_malloc64
|
||||
&& flag_vms_pointer_size != VMS_POINTER_SIZE_NONE));
|
||||
if (!use_64)
|
||||
vms_add_crtl_xlat (n->name, nlen, res, rlen + nlen);
|
||||
|
||||
|
|
|
@ -21,17 +21,19 @@ along with GCC; see the file COPYING3. If not see
|
|||
#define TARGET_OBJECT_SUFFIX ".obj"
|
||||
#define TARGET_EXECUTABLE_SUFFIX ".exe"
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define_std ("vms"); \
|
||||
builtin_define_std ("VMS"); \
|
||||
builtin_assert ("system=vms"); \
|
||||
SUBTARGET_OS_CPP_BUILTINS(); \
|
||||
if (POINTER_SIZE == 64) \
|
||||
{ \
|
||||
builtin_define ("__LONG_POINTERS=1"); \
|
||||
builtin_define ("__int64=long long"); \
|
||||
} \
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do { \
|
||||
builtin_define_std ("vms"); \
|
||||
builtin_define_std ("VMS"); \
|
||||
builtin_assert ("system=vms"); \
|
||||
SUBTARGET_OS_CPP_BUILTINS(); \
|
||||
builtin_define ("__int64=long long"); \
|
||||
if (flag_vms_pointer_size == VMS_POINTER_SIZE_32) \
|
||||
builtin_define ("__INITIAL_POINTER_SIZE=32"); \
|
||||
else if (flag_vms_pointer_size == VMS_POINTER_SIZE_64) \
|
||||
builtin_define ("__INITIAL_POINTER_SIZE=64"); \
|
||||
if (POINTER_SIZE == 64) \
|
||||
builtin_define ("__LONG_POINTERS=1"); \
|
||||
} while (0)
|
||||
|
||||
extern void vms_c_register_includes (const char *, const char *, int);
|
||||
|
@ -53,15 +55,25 @@ extern void vms_c_register_includes (const char *, const char *, int);
|
|||
|
||||
/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */
|
||||
#undef POINTER_SIZE
|
||||
#define POINTER_SIZE 32
|
||||
#define POINTER_SIZE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? 32 : 64)
|
||||
#define POINTERS_EXTEND_UNSIGNED 0
|
||||
|
||||
/* Always 32 bits. */
|
||||
/* FIXME: It should always be a 32 bit type. */
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
#define SIZE_TYPE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? \
|
||||
"unsigned int" : "long long unsigned int")
|
||||
/* ???: Defined as a 'int' by dec-c, but obstack.h doesn't like it. */
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "int"
|
||||
#define PTRDIFF_TYPE (flag_vms_pointer_size == VMS_POINTER_SIZE_NONE ? \
|
||||
"int" : "long long int")
|
||||
|
||||
#define C_COMMON_OVERRIDE_OPTIONS vms_c_common_override_options ()
|
||||
|
||||
/* VMS doesn't support other sections than .text for code. */
|
||||
|
||||
#define TARGET_ASM_FUNCTION_SECTION vms_function_section
|
||||
|
||||
/* Always use 8 bytes addresses in dwarf2 debug info. The default value doesn't
|
||||
work as it may be 4 bytes, which won't match gas default (8 bytes for ia64),
|
||||
and will thus produce incorrect values. */
|
||||
#define DWARF2_ADDR_SIZE 8
|
||||
|
|
|
@ -16,11 +16,14 @@
|
|||
; along with GCC; see the file COPYING3. If not see
|
||||
; <http://www.gnu.org/licenses/>.
|
||||
|
||||
HeaderInclude
|
||||
config/vms/vms-opts.h
|
||||
|
||||
map
|
||||
Target RejectNegative
|
||||
|
||||
mmalloc64
|
||||
Target Report Mask(MALLOC64)
|
||||
Target Report Var(flag_vms_malloc64) Init(1)
|
||||
Malloc data into P2 space
|
||||
|
||||
mdebug-main=
|
||||
|
@ -28,4 +31,29 @@ Target RejectNegative Joined Var(vms_debug_main)
|
|||
Set name of main routine for the debugger
|
||||
|
||||
mvms-return-codes
|
||||
Target RejectNegative
|
||||
Target Report Var(flag_vms_return_codes)
|
||||
Use VMS exit codes instead of posix ones
|
||||
|
||||
mpointer-size=
|
||||
Target Joined Report RejectNegative Enum(vms_pointer_size) Var(flag_vms_pointer_size) Init(VMS_POINTER_SIZE_NONE)
|
||||
-mpointer-size=[no,32,short,64,long] Set the default pointer size
|
||||
|
||||
Enum
|
||||
Name(vms_pointer_size) Type(enum vms_pointer_size) UnknownError(unknown pointer size model %qs)
|
||||
|
||||
EnumValue
|
||||
Enum(vms_pointer_size) String(no) Value(VMS_POINTER_SIZE_NONE)
|
||||
|
||||
EnumValue
|
||||
Enum(vms_pointer_size) String(32) Value(VMS_POINTER_SIZE_32)
|
||||
|
||||
EnumValue
|
||||
Enum(vms_pointer_size) String(short) Value(VMS_POINTER_SIZE_32)
|
||||
|
||||
EnumValue
|
||||
Enum(vms_pointer_size) String(64) Value(VMS_POINTER_SIZE_64)
|
||||
|
||||
EnumValue
|
||||
Enum(vms_pointer_size) String(long) Value(VMS_POINTER_SIZE_64)
|
||||
|
||||
; This comment is to ensure we retain the blank line above.
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/* Output variables, constants and external declarations, for GNU compiler.
|
||||
Copyright (C) 2001, 2007, 2009 Free Software Foundation, Inc.
|
||||
Contributed by Douglas Rupp (rupp@gnat.com).
|
||||
|
||||
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 LONG_TYPE_SIZE
|
||||
#define LONG_TYPE_SIZE 64
|
||||
|
||||
#undef POINTER_SIZE
|
||||
#define POINTER_SIZE 64
|
||||
|
||||
/* Defaults to "long int" */
|
||||
#undef SIZE_TYPE
|
||||
#undef PTRDIFF_TYPE
|
|
@ -1,3 +1,8 @@
|
|||
2012-03-12 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/alpha/t-vms: Define HOST_LIBGCC2_CFLAGS.
|
||||
* config/ia64/t-vms: Likewise.
|
||||
|
||||
2012-03-11 Michael Hope <michael.hope@linaro.org>
|
||||
|
||||
* longlong.h [ARM] (add_ssaaaa, sub_ddmmss, umul_ppmm): Enable
|
||||
|
|
|
@ -7,3 +7,5 @@ vms-dwarf2eh.o: $(srcdir)/config/alpha/vms-dwarf2eh.S
|
|||
$(gcc_compile) -c -x assembler-with-cpp $<
|
||||
|
||||
LIB2ADD += $(srcdir)/config/alpha/vms-gcc_shell_handler.c
|
||||
|
||||
HOST_LIBGCC2_CFLAGS=-mpointer-size=64
|
||||
|
|
|
@ -5,3 +5,5 @@ crtinitS.o: $(srcdir)/config/ia64/vms-crtinit.S
|
|||
$(gcc_compile) -c -x assembler-with-cpp $<
|
||||
|
||||
LIB2ADDEH += $(srcdir)/config/ia64/fde-vms.c
|
||||
|
||||
HOST_LIBGCC2_CFLAGS=-mpointer-size=64
|
||||
|
|
Loading…
Add table
Reference in a new issue