diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2010-10-22 10:28:57 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2010-10-22 10:28:57 +0000 |
commit | 2670598830de0d9a1a65724d15dd428eae38e6f2 (patch) | |
tree | 930cb5a100d0242c1b4f82c25d186b96318cd1a6 /gcc/config/rs6000/darwin.h | |
parent | 5e5db3b4b48ede7d0d1815ec2126b669affeda96 (diff) | |
download | gcc-2670598830de0d9a1a65724d15dd428eae38e6f2.tar.gz |
CFStrings for Darwin.
gcc:
Based on the CFString implementation in FSF apple/trunk branch.
* target.def (objc_construct_string): New Hook.
* doc/tm.texi (objc_construct_string): Document.
* doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING): New.
* config/t-darwin: Amend build rules for darwin.o.
* config/darwin.opt: Add cfstrings flags.
* config/darwin-c.c: Define __CONSTANT_CFSTRINGS__.
(darwin_objc_construct_string): New.
* config/i386/darwin.h (SUBTARGET_INIT_BUILTINS): Define.
* config/i386/i386.c (ix86_init_builtins): Add SUBTARGET_INIT_BUILTINS.
* config/darwin-protos.h (darwin_init_cfstring_builtins): New prototype.
(darwin_fold_builtin): Likewise.
(darwin_build_constant_cfstring): Likewise.
(darwin_objc_construct_string): Likewise.
(darwin_cfstring_p): Likewise.
(darwin_enter_string_into_cfstring_table): Likewise.
* config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS) Update for CFString.
* config/darwin.c (darwin_running_cxx): New var.
(machopic_select_section): Return cfstring_constant_object_section.
(darwin_override_options): Set darwin_running_cxx.
(add_builtin_field_decl): New.
(darwin_init_cfstring_builtins): New.
(darwin_build_constant_cfstring): New.
(darwin_fold_builtin): New.
(cfstring_hash): New.
(cfstring_eq): New.
(darwin_enter_string_into_cfstring_table): New.
* config/darwin-sections.def (cfstring_constant_object_section): New.
* config/darwin.h (TARGET_FOLD_BUILTIN): Define.
(TARGET_OBJC_CONSTRUCT_STRING): Define.
gcc/objc:
Based on the CFString implementation in FSF apple/trunk branch.
* objc/objc-act.c (objc_build_string_object): Handle CFStrings.
From-SVN: r165820
Diffstat (limited to 'gcc/config/rs6000/darwin.h')
-rw-r--r-- | gcc/config/rs6000/darwin.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 810563e0ed0..2e0db78c7b5 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -436,5 +436,10 @@ extern int darwin_emit_branch_islands; default, as kernel code doesn't save/restore those registers. */ #define OS_MISSING_ALTIVEC (flag_mkernel || flag_apple_kext) -/* Darwin has to rename some of the long double builtins. */ -#define SUBTARGET_INIT_BUILTINS darwin_patch_builtins () +/* PPC Darwin has to rename some of the long double builtins. */ +#undef SUBTARGET_INIT_BUILTINS +#define SUBTARGET_INIT_BUILTINS \ +do { \ + darwin_patch_builtins (); \ + darwin_init_cfstring_builtins ((unsigned) (RS6000_BUILTIN_COUNT)); \ +} while(0) |