[all-commits] [llvm/llvm-project] e5438f: clang/win: Add __readfsdword to intrin.h

Nico Weber via All-commits all-commits at lists.llvm.org
Thu Sep 2 09:22:24 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5438f386854136d848989315f53788808afa37a
      https://github.com/llvm/llvm-project/commit/e5438f386854136d848989315f53788808afa37a
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-09-02 (Thu, 02 Sep 2021)

  Changed paths:
    M clang/lib/Headers/intrin.h
    M clang/test/CodeGen/X86/ms-x86-intrinsics.c

  Log Message:
  -----------
  clang/win: Add __readfsdword to intrin.h

When using __readfsdword(), clang used to warn that one has
to include <intrin.h> -- no matter if that was already included
or not.

Now it only warns if it's not yet included.

To verify that this was the only intrin with this problem, I ran:

    $ for f in $(grep intrin.h clang/include/clang/Basic/BuiltinsX86* |
                 egrep -o '\([^,]+,' | egrep -o '[^(,]*'); do
        if ! grep -q $f clang/lib/Headers/intrin.h; then echo $f; fi;
      done

This printed 9 more functions, but those are all in emmintrin.h,
xsaveintrin.h (which are included by intrin.h based on /arch: flags).
So this is indeed the only built-in that was missing in intrin.h.

Fixes PR51188.

Differential Revision: https://reviews.llvm.org/D109085




More information about the All-commits mailing list