2006-01-30 Marcin Dalecki <martin@dalecki.de>
[official-gcc.git] / gcc / config / sh / symbian-post.h
blobd47dbebd735d6041a4cc4f452497d6823cd4d8ed
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 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 2, 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 COPYING. If not, write to the
21 Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. */
24 #undef TARGET_VERSION
25 #define TARGET_VERSION \
26 fputs (" (Renesas SH for Symbian OS)", stderr);
28 #undef LINK_EMUL_PREFIX
29 #define LINK_EMUL_PREFIX "shlsymbian"
32 #define SYMBIAN_EXPORT_NAME(NAME,FILE,DECL) \
33 do \
34 { \
35 if ((DECL && sh_symbian_dllexport_p (DECL)) \
36 || sh_symbian_dllexport_name_p (NAME)) \
37 { \
38 fprintf ((FILE), "\t.pushsection .directive\n"); \
39 fprintf ((FILE), "\t.asciz \"EXPORT %s\\n\"\n", \
40 sh_symbian_strip_name_encoding (NAME)); \
41 fprintf ((FILE), "\t.popsection\n"); \
42 } \
43 } \
44 while (0)
46 /* Output a function definition label. */
47 #undef ASM_DECLARE_FUNCTION_NAME
48 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
49 do \
50 { \
51 SYMBIAN_EXPORT_NAME ((NAME), (FILE), (DECL)); \
52 ASM_OUTPUT_TYPE_DIRECTIVE ((FILE), (NAME), "function"); \
53 ASM_DECLARE_RESULT ((FILE), DECL_RESULT (DECL)); \
54 ASM_OUTPUT_LABEL ((FILE), (NAME)); \
55 } \
56 while (0)
58 /* Output the label for an initialized variable. */
59 #undef ASM_DECLARE_OBJECT_NAME
60 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
61 do \
62 { \
63 HOST_WIDE_INT size; \
65 SYMBIAN_EXPORT_NAME ((NAME), (FILE), (DECL)); \
66 ASM_OUTPUT_TYPE_DIRECTIVE ((FILE), (NAME), "object"); \
68 size_directive_output = 0; \
69 if (!flag_inhibit_size_directive \
70 && (DECL) \
71 && DECL_SIZE (DECL)) \
72 { \
73 size_directive_output = 1; \
74 size = int_size_in_bytes (TREE_TYPE (DECL)); \
75 ASM_OUTPUT_SIZE_DIRECTIVE ((FILE), (NAME), size); \
76 } \
78 ASM_OUTPUT_LABEL ((FILE), (NAME)); \
79 } \
80 while (0)
82 #undef ASM_OUTPUT_LABELREF
83 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
84 do \
85 { \
86 asm_fprintf ((FILE), "%U%s", \
87 sh_symbian_strip_name_encoding (NAME)); \
88 } \
89 while (0)