X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=gcc%2Fconfig%2Frs6000%2Faix.h;h=69db93ef47b8be1fb7a1aa86b65010cb5d8d779a;hb=83ffe9cde7fe0b4deb0d1b54175fd9b19c38179c;hp=f6eb122d45a761629e61c1541f7c2a5b85fa0ec9;hpb=a7790c7174a016fcea0af852a493479f0dadfdf3;p=thirdparty%2Fgcc.git diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index f6eb122d45a7..69db93ef47b8 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-3.0-or-later /* Definitions of target machine for GNU compiler, for IBM RS/6000 POWER running AIX. - Copyright (C) 2000-2016 Free Software Foundation, Inc. + Copyright (C) 2000-2023 Free Software Foundation, Inc. This file is part of GCC. @@ -29,8 +30,7 @@ #define TARGET_AIX_OS 1 /* AIX always has a TOC. */ -#define TARGET_NO_TOC 0 -#define TARGET_TOC 1 +#define TARGET_HAS_TOC 1 #define FIXED_R2 1 /* AIX allows r13 to be used in 32-bit mode. */ @@ -54,30 +54,32 @@ sizes of the fixed area and the parameter area must be a multiple of STACK_BOUNDARY. */ -#undef STARTING_FRAME_OFFSET -#define STARTING_FRAME_OFFSET \ - (FRAME_GROWS_DOWNWARD \ - ? 0 \ - : (cfun->calls_alloca \ - ? RS6000_ALIGN (crtl->outgoing_args_size + RS6000_SAVE_AREA, 16) \ - : (RS6000_ALIGN (crtl->outgoing_args_size, 16) + RS6000_SAVE_AREA))) +#undef RS6000_STARTING_FRAME_OFFSET +#define RS6000_STARTING_FRAME_OFFSET \ + (cfun->calls_alloca \ + ? RS6000_ALIGN (crtl->outgoing_args_size + RS6000_SAVE_AREA, 16) \ + : (RS6000_ALIGN (crtl->outgoing_args_size, 16) + RS6000_SAVE_AREA)) /* Offset from the stack pointer register to an item dynamically allocated on the stack, e.g., by `alloca'. The default value for this macro is `STACK_POINTER_OFFSET' plus the length of the outgoing arguments. The default is correct for most - machines. See `function.c' for details. + machines. See `function.cc' for details. This value must be a multiple of STACK_BOUNDARY (hard coded in - `emit-rtl.c'). */ + `emit-rtl.cc'). */ #undef STACK_DYNAMIC_OFFSET #define STACK_DYNAMIC_OFFSET(FUNDECL) \ - RS6000_ALIGN (crtl->outgoing_args_size + STACK_POINTER_OFFSET, 16) + RS6000_ALIGN (crtl->outgoing_args_size.to_constant () \ + + STACK_POINTER_OFFSET, 16) #undef TARGET_IEEEQUAD #define TARGET_IEEEQUAD 0 +#undef TARGET_IEEEQUAD_DEFAULT +#define TARGET_IEEEQUAD_DEFAULT 0 + /* The AIX linker will discard static constructors in object files before collect has a chance to see them, so scan the object files directly. */ #define COLLECT_EXPORT_LIST @@ -218,10 +220,9 @@ /* This now supports a natural alignment mode. */ /* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints. */ -#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ - ((TARGET_ALIGN_NATURAL == 0 \ - && TYPE_MODE (strip_array_types (TREE_TYPE (FIELD))) == DFmode) \ - ? MIN ((COMPUTED), 32) \ +#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \ + (TARGET_ALIGN_NATURAL == 0 \ + ? rs6000_special_adjust_field_align (TYPE, COMPUTED) \ : (COMPUTED)) /* AIX increases natural record alignment to doubleword if the first @@ -248,7 +249,7 @@ registers and memory. FIRST is nonzero if this is the only element. */ #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ - (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE)) + (!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE)) /* Indicate that jump tables go in the text section. */ @@ -276,3 +277,10 @@ /* Use standard DWARF numbering for DWARF debugging information. */ #define RS6000_USE_DWARF_NUMBERING +#define TARGET_PRECOMPUTE_TLS_P rs6000_aix_precompute_tls_p + +/* Replace -m64 with -maix64 and -m32 with -maix32. */ +#undef SUBTARGET_DRIVER_SELF_SPECS +#define SUBTARGET_DRIVER_SELF_SPECS \ +"%{m64:-maix64} %