Merged with mainline at revision 128810.
[official-gcc.git] / gcc / config / sh / symbian-post.h
blobd8d56b13cc4a5282cdaaa95a912ce44adc15785e
1 /* Definitions for the Symbian OS running on an SH part.
2 This file is included after all the other target specific headers.
4 Copyright (C) 2004, 2007 Free Software Foundation, Inc.
5 Contributed by Red Hat.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 3, or (at your
12 option) any later version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #undef TARGET_VERSION
24 #define TARGET_VERSION \
25 fputs (" (Renesas SH for Symbian OS)", stderr);
27 #undef LINK_EMUL_PREFIX
28 #define LINK_EMUL_PREFIX "shlsymbian"
31 #define SYMBIAN_EXPORT_NAME(NAME,FILE,DECL) \
32 do \
33 { \
34 if ((DECL && sh_symbian_dllexport_p (DECL)) \
35 || sh_symbian_dllexport_name_p (NAME)) \
36 { \
37 fprintf ((FILE), "\t.pushsection .directive\n"); \
38 fprintf ((FILE), "\t.asciz \"EXPORT %s\\n\"\n", \
39 sh_symbian_strip_name_encoding (NAME)); \
40 fprintf ((FILE), "\t.popsection\n"); \
41 } \
42 } \
43 while (0)
45 /* Output a function definition label. */
46 #undef ASM_DECLARE_FUNCTION_NAME
47 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
48 do \
49 { \
50 SYMBIAN_EXPORT_NAME ((NAME), (FILE), (DECL)); \
51 ASM_OUTPUT_TYPE_DIRECTIVE ((FILE), (NAME), "function"); \
52 ASM_DECLARE_RESULT ((FILE), DECL_RESULT (DECL)); \
53 ASM_OUTPUT_LABEL ((FILE), (NAME)); \
54 } \
55 while (0)
57 /* Output the label for an initialized variable. */
58 #undef ASM_DECLARE_OBJECT_NAME
59 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
60 do \
61 { \
62 HOST_WIDE_INT size; \
64 SYMBIAN_EXPORT_NAME ((NAME), (FILE), (DECL)); \
65 ASM_OUTPUT_TYPE_DIRECTIVE ((FILE), (NAME), "object"); \
67 size_directive_output = 0; \
68 if (!flag_inhibit_size_directive \
69 && (DECL) \
70 && DECL_SIZE (DECL)) \
71 { \
72 size_directive_output = 1; \
73 size = int_size_in_bytes (TREE_TYPE (DECL)); \
74 ASM_OUTPUT_SIZE_DIRECTIVE ((FILE), (NAME), size); \
75 } \
77 ASM_OUTPUT_LABEL ((FILE), (NAME)); \
78 } \
79 while (0)
81 #undef ASM_OUTPUT_LABELREF
82 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
83 do \
84 { \
85 asm_fprintf ((FILE), "%U%s", \
86 sh_symbian_strip_name_encoding (NAME)); \
87 } \
88 while (0)