Separate builtins for x84-64 and i386; implement __mulh and __umulh
authorAlbert Gutowski <agutowski@google.com>
Tue, 4 Oct 2016 22:29:49 +0000 (22:29 +0000)
committerAlbert Gutowski <agutowski@google.com>
Tue, 4 Oct 2016 22:29:49 +0000 (22:29 +0000)
commitf3a0bce1557f2c070518875122a8eb648f971211
treef1820a93a695c12671d7145bd32d722631905749
parente7439392f14f46b5214a5cf9c8d0244259cd6689
Separate builtins for x84-64 and i386; implement __mulh and __umulh

Summary: We need x86-64-specific builtins if we want to implement some of the MS intrinsics - winnt.h contains definitions of some functions for i386, but not for x86-64 (for example _InterlockedOr64), which means that we cannot treat them as builtins for both i386 and x86-64, because then we have definitions of builtin functions in winnt.h on i386.

Reviewers: thakis, majnemer, hans, rnk

Subscribers: cfe-commits

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

llvm-svn: 283264
clang/include/clang/Basic/BuiltinsX86_64.def [new file with mode: 0644]
clang/include/clang/Basic/TargetBuiltins.h
clang/lib/Basic/Targets.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Headers/intrin.h
clang/test/CodeGen/ms-intrinsics.c
clang/test/Sema/implicit-ms-builtin-decl.c