[PATCH] D33516: Add generic __bswap[ds]i2 implementations

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 13:33:14 PDT 2017


dim created this revision.
Herald added subscribers: arichardson, mgorny.

In FreeBSD we needed to add generic implementations for `__bswapdi2` and
`__bswapsi2`, since gcc 6.x for mips is emitting calls to these.  See:

https://reviews.freebsd.org/D10838 and https://reviews.freebsd.org/rS318601

The actual mips code generated for these generic C versions is pretty
OK, as can be seen in the (FreeBSD) review.

I checked over gcc sources, and it seems that it can emit these calls on
more architectures, so maybe it's best to simply always add them to the
compiler-rt builtins library.


https://reviews.llvm.org/D33516

Files:
  lib/builtins/CMakeLists.txt
  lib/builtins/README.txt
  lib/builtins/bswapdi2.c
  lib/builtins/bswapsi2.c
  test/builtins/Unit/bswapdi2_test.c
  test/builtins/Unit/bswapsi2_test.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33516.100154.patch
Type: text/x-patch
Size: 4442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170524/d09f9081/attachment-0001.bin>


More information about the llvm-commits mailing list