136ac495dSmrg /* Definitions for PA_RISC with ELF format 236ac495dSmrg Copyright (C) 1999-2013 Free Software Foundation, Inc. 336ac495dSmrg 436ac495dSmrg This file is part of GCC. 536ac495dSmrg 636ac495dSmrg GCC is free software; you can redistribute it and/or modify 736ac495dSmrg it under the terms of the GNU General Public License as published by 836ac495dSmrg the Free Software Foundation; either version 3, or (at your option) 936ac495dSmrg any later version. 1036ac495dSmrg 1136ac495dSmrg GCC is distributed in the hope that it will be useful, 1236ac495dSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of 1336ac495dSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1436ac495dSmrg GNU General Public License for more details. 1536ac495dSmrg 1636ac495dSmrg You should have received a copy of the GNU General Public License 1736ac495dSmrg along with GCC; see the file COPYING3. If not see 1836ac495dSmrg <http://www.gnu.org/licenses/>. */ 1936ac495dSmrg 2036ac495dSmrg 2136ac495dSmrg #undef TARGET_OS_CPP_BUILTINS 2236ac495dSmrg #define TARGET_OS_CPP_BUILTINS() \ 2336ac495dSmrg do \ 2436ac495dSmrg { \ 2536ac495dSmrg NETBSD_OS_CPP_BUILTINS_ELF(); \ 2636ac495dSmrg builtin_assert ("machine=bigendian"); \ 2736ac495dSmrg } \ 2836ac495dSmrg while (0) 2936ac495dSmrg 3036ac495dSmrg #undef CPP_SPEC 3136ac495dSmrg #define CPP_SPEC NETBSD_CPP_SPEC 3236ac495dSmrg 3336ac495dSmrg #undef ASM_SPEC 3436ac495dSmrg #define ASM_SPEC \ 3536ac495dSmrg "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}" 3636ac495dSmrg 3736ac495dSmrg #undef EXTRA_SPECS 3836ac495dSmrg #define EXTRA_SPECS NETBSD_SUBTARGET_EXTRA_SPECS 3936ac495dSmrg #undef SUBTARGET_EXTRA_SPECS 4036ac495dSmrg 4136ac495dSmrg #define NETBSD_ENTRY_POINT "__start" 4236ac495dSmrg 4336ac495dSmrg #undef LINK_SPEC 4436ac495dSmrg #define LINK_SPEC NETBSD_LINK_SPEC_ELF 4536ac495dSmrg 4636ac495dSmrg /* NetBSD profiling functions don't need gcc to allocate counters. */ 4736ac495dSmrg #define NO_DEFERRED_PROFILE_COUNTERS 1 4836ac495dSmrg 4936ac495dSmrg /* Define the strings used for the special svr4 .type and .size directives. 5036ac495dSmrg These strings generally do not vary from one system running svr4 to 5136ac495dSmrg another, but if a given system (e.g. m88k running svr) needs to use 5236ac495dSmrg different pseudo-op names for these, they may be overridden in the 5336ac495dSmrg file which includes this one. */ 5436ac495dSmrg 5536ac495dSmrg #undef STRING_ASM_OP 5636ac495dSmrg #define STRING_ASM_OP "\t.stringz\t" 5736ac495dSmrg 5836ac495dSmrg #define TEXT_SECTION_ASM_OP "\t.text" 5936ac495dSmrg #define DATA_SECTION_ASM_OP "\t.data" 6036ac495dSmrg #define BSS_SECTION_ASM_OP "\t.section\t.bss" 6136ac495dSmrg 6236ac495dSmrg #define TARGET_ASM_FILE_START pa_linux_file_start 6336ac495dSmrg 6436ac495dSmrg /* We want local labels to start with period if made with asm_fprintf. */ 6536ac495dSmrg #undef LOCAL_LABEL_PREFIX 6636ac495dSmrg #define LOCAL_LABEL_PREFIX "." 6736ac495dSmrg 6836ac495dSmrg /* Define these to generate the Linux/ELF/SysV style of internal 6936ac495dSmrg labels all the time - i.e. to be compatible with 7036ac495dSmrg ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the 7136ac495dSmrg ones in pa.h and note the lack of dollar signs in these. FIXME: 7236ac495dSmrg shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */ 7336ac495dSmrg 7436ac495dSmrg #undef ASM_OUTPUT_ADDR_VEC_ELT 7536ac495dSmrg #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ 7636ac495dSmrg fprintf (FILE, "\t.word .L%d\n", VALUE) 7736ac495dSmrg 7836ac495dSmrg #undef ASM_OUTPUT_ADDR_DIFF_ELT 7936ac495dSmrg #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ 8036ac495dSmrg fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL) 8136ac495dSmrg 8236ac495dSmrg /* Use the default. */ 8336ac495dSmrg #undef ASM_OUTPUT_LABEL 8436ac495dSmrg 8536ac495dSmrg /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and 8636ac495dSmrg does what we want (i.e. uses colons). It must be compatible with 8736ac495dSmrg ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */ 8836ac495dSmrg 8936ac495dSmrg /* Use the default. */ 9036ac495dSmrg #undef ASM_OUTPUT_INTERNAL_LABEL 9136ac495dSmrg 9236ac495dSmrg /* Use the default. */ 9336ac495dSmrg #undef TARGET_ASM_GLOBALIZE_LABEL 9436ac495dSmrg /* Globalizing directive for a label. */ 9536ac495dSmrg #define GLOBAL_ASM_OP ".globl " 9636ac495dSmrg 9736ac495dSmrg /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple 9836ac495dSmrg labels in a function declaration (since pa.c seems determined to do 9936ac495dSmrg it differently) */ 10036ac495dSmrg 10136ac495dSmrg #undef ASM_DECLARE_FUNCTION_NAME 10236ac495dSmrg #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ 10336ac495dSmrg do \ 10436ac495dSmrg { \ 10536ac495dSmrg ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ 10636ac495dSmrg ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ 10736ac495dSmrg } \ 10836ac495dSmrg while (0) 10936ac495dSmrg 11036ac495dSmrg /* As well as globalizing the label, we need to encode the label 11136ac495dSmrg to ensure a plabel is generated in an indirect call. */ 11236ac495dSmrg 11336ac495dSmrg #undef ASM_OUTPUT_EXTERNAL_LIBCALL 11436ac495dSmrg #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ 11536ac495dSmrg do \ 11636ac495dSmrg { \ 11736ac495dSmrg if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \ 11836ac495dSmrg pa_encode_label (FUN); \ 11936ac495dSmrg (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \ 12036ac495dSmrg } \ 12136ac495dSmrg while (0) 12236ac495dSmrg 12336ac495dSmrg /* NetBSD always uses gas. */ 12436ac495dSmrg #undef TARGET_GAS 12536ac495dSmrg #define TARGET_GAS 1 12636ac495dSmrg 12736ac495dSmrg /* Use long int for these type to make hppa64 compatibility easier. */ 12836ac495dSmrg #undef SIZE_TYPE 12936ac495dSmrg #define SIZE_TYPE "long unsigned int" 13036ac495dSmrg 13136ac495dSmrg #undef PTRDIFF_TYPE 13236ac495dSmrg #define PTRDIFF_TYPE "long int" 13336ac495dSmrg 134*8feb0f0bSmrg /* NetBSD always uses 128 bits / 16 byte alignment. */ 135a2dc1f3fSmrg #undef MALLOC_ABI_ALIGNMENT 136a2dc1f3fSmrg #define MALLOC_ABI_ALIGNMENT 128 137a2dc1f3fSmrg 13836ac495dSmrg #if 0 13936ac495dSmrg #undef TARGET_SYNC_LIBCALL 14036ac495dSmrg #define TARGET_SYNC_LIBCALL 1 14136ac495dSmrg #endif 142