From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1725) id 59CD0395BC0E; Mon, 26 Apr 2021 20:51:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59CD0395BC0E Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: William Schmidt To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/wschmidt/heads/builtins10)] rs6000: Darwin builtin support X-Act-Checkin: gcc X-Git-Author: Bill Schmidt X-Git-Refname: refs/users/wschmidt/heads/builtins10 X-Git-Oldrev: 6d32a918a957cc6a3b9d981cc71570f0bdef6690 X-Git-Newrev: d6cde4733f4f47abf373135a9e4c2f7a60d1e14d Message-Id: <20210426205125.59CD0395BC0E@sourceware.org> Date: Mon, 26 Apr 2021 20:51:25 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2021 20:51:25 -0000 https://gcc.gnu.org/g:d6cde4733f4f47abf373135a9e4c2f7a60d1e14d commit d6cde4733f4f47abf373135a9e4c2f7a60d1e14d Author: Bill Schmidt Date: Thu Mar 4 19:54:00 2021 -0600 rs6000: Darwin builtin support 2021-03-04 Bill Schmidt gcc/ * config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Use the new decl when new_builtins_are_live. * config/rs6000/rs6000-builtin-new.def (__builtin_cfstring): New built-in. Diff: --- gcc/config/rs6000/darwin.h | 8 ++++++-- gcc/config/rs6000/rs6000-builtin-new.def | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 42f39e60305..6abf8e84f54 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -504,8 +504,12 @@ #define SUBTARGET_INIT_BUILTINS \ do { \ darwin_patch_builtins (); \ - rs6000_builtin_decls[(unsigned) (RS6000_BUILTIN_CFSTRING)] \ - = darwin_init_cfstring_builtins ((unsigned) (RS6000_BUILTIN_CFSTRING)); \ + if (new_builtins_are_live) \ + rs6000_builtin_decls_x[(unsigned) (RS6000_BIF_CFSTRING)] \ + = darwin_init_cfstring_builtins ((unsigned) (RS6000_BIF_CFSTRING)); \ + else \ + rs6000_builtin_decls[(unsigned) (RS6000_BUILTIN_CFSTRING)] \ + = darwin_init_cfstring_builtins ((unsigned) (RS6000_BUILTIN_CFSTRING)); \ } while(0) /* So far, there is no rs6000_fold_builtin, if one is introduced, then diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def index 5609e29affd..0ff2a0e1ed1 100644 --- a/gcc/config/rs6000/rs6000-builtin-new.def +++ b/gcc/config/rs6000/rs6000-builtin-new.def @@ -187,6 +187,12 @@ ; Builtins that have been around since time immemorial or are just ; considered available everywhere. [always] +; __builtin_cfstring is for Darwin, which will replace the decl we +; create here with another one during subtarget processing. We just +; need to ensure it has a slot in the builtin enumeration. + void __builtin_cfstring (); + CFSTRING nothing {} + void __builtin_cpu_init (); CPU_INIT nothing {cpu}