ldc-developers/ldc — pull request #298 by redstar (2013-03-02 19:38:03+00:00)
Title: Fix big-endian code generation for btc, btr and bts.

The `btc`, `btr` and `bts` intrinsics operate on size_t words. The generated LLVM IR operates
on bytes and therefore assumes a little-endian architecture.
The fix is to change the generated IR to work on size_t words.

The comment in `core/src/bitops.d` says:
It addresses bits like the expression:

p[index / (size_t.sizeof*8)] & (1 << (index & ((size_t.sizeof*8) - 1)))

That's now implemented.