Skip to content
  1. Sep 09, 2016
  2. Sep 07, 2016
  3. Aug 16, 2016
  4. Aug 06, 2016
    • Saleem Abdulrasool's avatar
      Headers: Add ARM support to intrin.h for MSVC compatibility · afdef205
      Saleem Abdulrasool authored
      This fixes compiling with headers from the Windows SDK for ARM, where the
      YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST.
      
      The actual MSVC armintr.h contains a lot more definitions, but this is enough to
      build code that uses the Windows SDK but doesn't use ARM intrinsics directly.
      
      An alternative would to just keep the addition to intrin.h (to include
      armintr.h), but not actually ship armintr.h, instead having clang's intrin.h
      include armintr.h from MSVC's include directory. (That one works fine with
      clang, at least for building code that uses the Windows SDK.)
      
      Patch by Martin Storsjö!
      
      llvm-svn: 277928
      afdef205
  5. Jun 28, 2016
  6. Jun 14, 2016
  7. May 27, 2016
  8. Feb 20, 2016
  9. Oct 14, 2015
  10. Oct 13, 2015
    • Amjad Aboud's avatar
      [X86] Add XSAVE intrinsic family · 2b9b8a59
      Amjad Aboud authored
      Add intrinsics for the
        XSAVE instructions (XSAVE/XSAVE64/XRSTOR/XRSTOR64)
        XSAVEOPT instructions (XSAVEOPT/XSAVEOPT64)
        XSAVEC instructions (XSAVEC/XSAVEC64)
        XSAVES instructions (XSAVES/XSAVES64/XRSTORS/XRSTORS64)
      
      Differential Revision: http://reviews.llvm.org/D13014
      
      llvm-svn: 250158
      2b9b8a59
  11. Sep 22, 2015
    • Nico Weber's avatar
      ms Intrin.h: Fix __movsw's and __stosw's inline asm. · 1f22a344
      Nico Weber authored
      Before, clang's internal assembler would reject the inline asm in clang's
      Intrin.h.  To make sure this doesn't happen for other Intrin.h functions using
      __asm__ blocks, add 32-bit and 64-bit codegen tests for Intrin.h.
      
      Sadly, these tests discovered that __readcr3 and __writecr3 have bad
      implementations in 64-bit builds.  This will have to be fixed in a follow-up.
      
      llvm-svn: 248234
      1f22a344
  12. Aug 25, 2015
  13. Jul 16, 2015
    • David Majnemer's avatar
      [Intrin.h] Use compiler builtins to model memory barriers · 6b8e2970
      David Majnemer authored
      _ReadBarrier, _WriteBarrier, and _ReadWriteBarrier are essentially
      memory barriers of one form or another.  Model these as
      atomic_signal_fence(ATOMIC_SEQ_CST).
      
      __faststorefence is a curious intrinsic.  It's single purpose seems to
      an alternative to mfence when that instruction is slow.  However, mfence
      is not always slow and is, in general, preferable to a 'lock or'
      sequence on certain CPUs.  Give the compiler freedom to select the best
      sequence to get a fence.
      
      llvm-svn: 242378
      6b8e2970
  14. Jul 14, 2015
  15. Jul 13, 2015
    • David Majnemer's avatar
      Intrin.h: Don't invade the program's namespace · 8dadce78
      David Majnemer authored
      The program is permitted to have stuff like '#define x' in it so avoid
      using identifiers not reserved for the implementation.
      
      llvm-svn: 242010
      8dadce78
    • David Majnemer's avatar
      Intrin.h: Clean up our atomic intrinsics · 3c8ea5f3
      David Majnemer authored
      Three things:
      - The atomic intrinsics mandate memory barriers, let's start emitting
        some.
      - We don't need to manually create RMW operations, we can just do
        __atomic_fetch_foo instead of performing __atomic_foo_fetch and
        undoing foo.
      - Don't use inline assembly, we don't need it for these intrinsics.
      
      This fixes PR24101.
      
      llvm-svn: 242009
      3c8ea5f3
  16. Jun 30, 2015
  17. Jun 16, 2015
  18. Jun 05, 2015
  19. Feb 04, 2015
  20. Jan 28, 2015
  21. Dec 04, 2014
  22. Dec 03, 2014
  23. Nov 03, 2014
  24. Oct 29, 2014
    • Saleem Abdulrasool's avatar
      CodeGen: add __readfsdword builtin · a25fbef0
      Saleem Abdulrasool authored
      The Windows NT SDK uses __readfsdword and declares it as a compiler provided
      builtin (#pragma intrinsic(__readfsword).  Because intrin.h is not referenced
      by winnt.h, it is not possible to provide an out-of-line definition for the
      intrinsic.  Provide a proper compiler builtin definition.
      
      llvm-svn: 220859
      a25fbef0
  25. Jul 08, 2014
    • Nico Weber's avatar
      Don't pull in setjmp.h in -ffreestanding compiles. · a62cffae
      Nico Weber authored
      Also provide _setjmpex(). r200243 put in _setjmp() and _setjmpex() behind a
      comment since jmp_buf wasn't available. r200344 added jmp_buf and put in
      _setjmp(), but missed _setjmpex().
      
      llvm-svn: 212557
      a62cffae
    • Saleem Abdulrasool's avatar
      Headers: conditionalise more declarations · c4ebb129
      Saleem Abdulrasool authored
      Protect MMX specific declarations under a __MMX__ guard.  This header can be
      included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA.
      Use the preprocessor to prevent these declarations from being processed.
      
      llvm-svn: 212512
      c4ebb129
  26. Jun 25, 2014
    • Saleem Abdulrasool's avatar
      Headers: be a bit more careful about inline asm · 702eefed
      Saleem Abdulrasool authored
      Conditionally include x86intrin.h if we are building for x86 or x86_64.
      Conditionalise definition of inline assembly routines which use x86 or x86_64
      inline assembly. This is needed as clang can target Windows on ARM where these
      definitions may be included into user code.
      
      llvm-svn: 211716
      702eefed
  27. Jun 18, 2014
    • Saleem Abdulrasool's avatar
      CodeGen: improve ms instrincics support · 114efe0d
      Saleem Abdulrasool authored
      Add support for _InterlockedCompareExchangePointer, _InterlockExchangePointer,
      _InterlockExchange.  These are available as a compiler intrinsic on ARM and x86.
      These are used directly by the Windows SDK headers without use of the intrin
      header.
      
      llvm-svn: 211216
      114efe0d
  28. May 13, 2014
Loading