public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/rust/master] Merge #1543
Date: Mon, 10 Oct 2022 07:34:03 +0000 (GMT)	[thread overview]
Message-ID: <20221010073403.A86893858C53@sourceware.org> (raw)

https://gcc.gnu.org/g:bef31ea273689021f0fc8168f417edf386060512

commit bef31ea273689021f0fc8168f417edf386060512
Merge: e623ee314fb bb5efc657ae
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Fri Oct 7 11:03:59 2022 +0000

    Merge #1543
    
    1543: Reintroduce targetrustm hooks without the maze of macro definitions in target headers r=CohenArthur a=ibuclaw
    
    - Adds skeleton support and documentation for targetrustm hooks.
    - Re-adds previously reverted `TARGET_RUST_CPU_INFO` target hook.
    - Re-adds the previously reverted `TARGET_RUST_OS_INFO` target hook.
    - Implements `TARGET_RUST_CPU_INFO` hook for x86 (only a subset of the original i386-rust.cc was re-added)
    - Implements `TARGET_RUST_OS_INFO` hook for darwin (covers both x86 and powerpc).
    
    There's quite a bit to unpick from what was removed, but I hope this shows how firstly `rust-target.h` and `tm_rust.h` should be kept as empty as possible for the `default-rust.cc` source file that pulls in these headers; secondly all rust macros and declarations be put in rust-specific headers, then pulled into tm_rust.h as-needed. From every other `${target}-rust.cc` file, you can include as much as you like in order to pry out the information you need to get at.
    
    I've verified this does work as expected with the `-frust-dump-target_options` switch, e.g with `-mavx2`
    ```
    target_endian: "little"
    target_pointer_width: "64"
    target_feature: "fxsr"
    target_feature: "popcnt"
    target_feature: "avx2"
    target_feature: "ssse3"
    target_feature: "sse4.1"
    target_feature: "sse3"
    target_feature: "avx"
    target_feature: "sse"
    target_feature: "xsave"
    target_feature: "sse4.2"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86_64"
    ```
    
    I've also built a few darwin cross compilers with the following results on i686-darwin
    ```
    target_pointer_width: "32"
    target_env: ""
    target_vendor: "apple"
    target_endian: "little"
    target_os: "macos"
    target_family: "unix"
    target_feature: "sse3"
    target_feature: "sse"
    target_feature: "sse2"
    target_feature: "mmx"
    target_arch: "x86"
    ```
    and on powerpc64-darwin
    ```
    target_pointer_width: "64"
    target_env: ""
    target_vendor: "apple"
    target_endian: "big"
    target_os: "macos"
    target_family: "unix"
    ```
    
    Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>

Diff:

 .github/bors_log_expected_warnings |   8 +--
 gcc/Makefile.in                    |  34 +++++++++-
 gcc/config.gcc                     |  27 ++++++++
 gcc/config/darwin-rust.cc          |  44 +++++++++++++
 gcc/config/default-rust.cc         |  29 +++++++++
 gcc/config/i386/i386-rust.cc       | 129 +++++++++++++++++++++++++++++++++++++
 gcc/config/i386/i386-rust.h        |  22 +++++++
 gcc/config/i386/t-i386             |   4 ++
 gcc/config/t-darwin                |   4 ++
 gcc/configure                      |  21 +++++-
 gcc/configure.ac                   |  14 ++++
 gcc/doc/tm.texi                    |  26 ++++++++
 gcc/doc/tm.texi.in                 |  17 +++++
 gcc/genhooks.cc                    |   1 +
 gcc/rust/rust-lang.cc              |   2 -
 gcc/rust/rust-session-manager.cc   |   8 ++-
 gcc/rust/rust-target-def.h         |  20 ++++++
 gcc/rust/rust-target.def           |  52 +++++++++++++++
 gcc/rust/rust-target.h             |  35 ++++++++++
 19 files changed, 487 insertions(+), 10 deletions(-)

                 reply	other threads:[~2022-10-10  7:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221010073403.A86893858C53@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).