Mercurial > hg > CbC > CbC_gcc
diff gcc/config/pa/pa.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/config/pa/pa.h Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/config/pa/pa.h Thu Oct 25 07:37:49 2018 +0900 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for the HP Spectrum. - Copyright (C) 1992-2017 Free Software Foundation, Inc. + Copyright (C) 1992-2018 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for Software Science at the University of Utah. @@ -177,6 +177,8 @@ builtin_define("_PA_RISC1_1"); \ else \ builtin_define("_PA_RISC1_0"); \ + if (HPUX_LONG_DOUBLE_LIBRARY) \ + builtin_define("__SIZEOF_FLOAT128__=16"); \ } while (0) /* An old set of OS defines for various BSD-like systems. */ @@ -307,7 +309,7 @@ POSIX types such as pthread_mutex_t require 16-byte alignment. Again, this is non critical since 16-byte alignment is no longer needed for atomic operations. */ -#define MALLOC_ABI_ALIGNMENT (TARGET_SOM ? 64 : 128) +#define MALLOC_ABI_ALIGNMENT (TARGET_64BIT ? 128 : 64) /* Make arrays of chars word-aligned for the same reasons. */ #define DATA_ALIGNMENT(TYPE, ALIGN) \ @@ -535,7 +537,7 @@ marker, although the runtime documentation only describes a 16 byte marker. For compatibility, we allocate 48 bytes. */ #define STACK_POINTER_OFFSET \ - (TARGET_64BIT ? -(crtl->outgoing_args_size + 48): -32) + (TARGET_64BIT ? -(crtl->outgoing_args_size + 48) : poly_int64 (-32)) #define STACK_DYNAMIC_OFFSET(FNDECL) \ (TARGET_64BIT \ @@ -592,15 +594,6 @@ (CUM).indirect = 0, \ (CUM).nargs_prototype = 1000 -/* Figure out the size in words of the function argument. The size - returned by this macro should always be greater than zero because - we pass variable and zero sized objects by reference. */ - -#define FUNCTION_ARG_SIZE(MODE, TYPE) \ - ((((MODE) != BLKmode \ - ? (HOST_WIDE_INT) GET_MODE_SIZE (MODE) \ - : int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - /* Determine where to put an argument to a function. Value is zero to push the argument on the stack, or a hard register in which to store the argument. @@ -691,8 +684,8 @@ extern int may_call_alloca; #define EXIT_IGNORE_STACK \ - (get_frame_size () != 0 \ - || cfun->calls_alloca || crtl->outgoing_args_size) + (maybe_ne (get_frame_size (), 0) \ + || cfun->calls_alloca || maybe_ne (crtl->outgoing_args_size, 0)) /* Length in units of the trampoline for entering a nested function. */ @@ -1121,8 +1114,18 @@ PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */ -#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ - sprintf (LABEL, "*%c$%s%04ld", (PREFIX)[0], (PREFIX) + 1, (long)(NUM)) +#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ + do \ + { \ + char *__p; \ + (LABEL)[0] = '*'; \ + (LABEL)[1] = (PREFIX)[0]; \ + (LABEL)[2] = '$'; \ + __p = stpcpy (&(LABEL)[3], &(PREFIX)[1]); \ + sprint_ul (__p, (unsigned long) (NUM)); \ + } \ + while (0) + /* Output the definition of a compiler-generated label named NAME. */ @@ -1140,35 +1143,37 @@ #define ASM_OUTPUT_ASCII(FILE, P, SIZE) \ pa_output_ascii ((FILE), (P), (SIZE)) -/* Jump tables are always placed in the text section. Technically, it - is possible to put them in the readonly data section. This has the - benefit of getting the table out of .text and reducing branch lengths - as a result. +/* Jump tables are always placed in the text section. We have to do + this for the HP-UX SOM target as we can't switch sections in the + middle of a function. - The downside is that an additional insn (addil) is needed to access + On ELF targets, it is possible to put them in the readonly-data section. + This would get the table out of .text and reduce branch lengths. + + A downside is that an additional insn (addil) is needed to access the table when generating PIC code. The address difference table - also has to use 32-bit pc-relative relocations. Currently, GAS does - not support these relocations, although it is easily modified to do - this operation. + also has to use 32-bit pc-relative relocations. The table entries need to look like "$L1+(.+8-$L0)-$PIC_pcrel$0" when using ELF GAS. A simple difference can be used when using - SOM GAS or the HP assembler. The final downside is GDB complains - about the nesting of the label for the table when debugging. */ + the HP assembler. + + The final downside is GDB complains about the nesting of the label + for the table. */ #define JUMP_TABLES_IN_TEXT_SECTION 1 /* This is how to output an element of a case-vector that is absolute. */ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - fprintf (FILE, "\t.word L$%04d\n", VALUE) + fprintf (FILE, "\t.word L$%d\n", VALUE) /* This is how to output an element of a case-vector that is relative. Since we always place jump tables in the text section, the difference is absolute and requires no relocation. */ #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word L$%04d-L$%04d\n", VALUE, REL) + fprintf (FILE, "\t.word L$%d-L$%d\n", VALUE, REL) /* This is how to output an absolute case-vector. */ @@ -1184,7 +1189,7 @@ location counter to a multiple of 2**LOG bytes. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ - fprintf (FILE, "\t.align %d\n", (1<<(LOG))) + fprintf (FILE, "\t.align %d\n", (1 << (LOG))) #define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.blockz " HOST_WIDE_INT_PRINT_UNSIGNED"\n", \