# implement runtime \`@byteSwap\` and other fixups · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/380c8ec2c95fa8d732c141c705d9940629eb2012)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 380c8ec2c95fa8d732c141c705d9940629eb2012

Requested commit: 380c8ec2c95fa8d732c141c705d9940629eb2012

Commit: 380c8ec2c95fa8d732c141c705d9940629eb2012

Tree: 6f4139367553fea653662d1fb65bd23421bad77a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
implement runtime `@byteSwap` and other fixups

 * update docs for `@byteSwap`.
 * fix hash & eql functions for ZigLLVMFnIdBswap not updated to
   include vector len. this was causing incorrect bswap function
   being called in unrelated code
 * fix `@byteSwap` behavior tests only testing comptime and not
   runtime operations
 * implement runtime `@byteSwap`
 * fix incorrect logic in ir_render_vector_to_array and
   ir_render_array_to_vector with regards to whether or not to bitcast
 * `@byteSwap` accepts an array operand which it will cast to vector
 * simplify `@byteSwap` semantic analysis code and various fixes

```

## Parents

- [76f53960778e84ab49730edb77b85490b07fbea2](https://git.cafe/gitcafe/zig/commit/76f53960778e84ab49730edb77b85490b07fbea2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/380c8ec2c95fa8d732c141c705d9940629eb2012?format=markdown)
