# stage1: use u16 for \_\_truncxfhf2/\_\_extendhfxf2 on non-Arm CPUs · gitcafe/zig

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

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

Visibility: public

Requested revision: 755d116ecf2d221e2ad8b572c58a7d4f99163ff9

Requested commit: 755d116ecf2d221e2ad8b572c58a7d4f99163ff9

Commit: 755d116ecf2d221e2ad8b572c58a7d4f99163ff9

Tree: 91cd4f2689e323750c0f539bfb60777afcd3e3c4

Author: Koakuma

Committer: Veikka Tuominen

## Message

```
stage1: use u16 for __truncxfhf2/__extendhfxf2 on non-Arm CPUs

Non-Arm CPUs use u16 as the parameter to __extendhfxf2 and the return value of
__truncxfhf2, so insert appropriate bitcasts in gen_soft_f80_widen_or_shorten.
Otherwise, LLVM might crash because the functions are called in a different way
than its compiler-rt definition.

This fixes stage1 build on SPARCv9, and possibly other non-x86, non-Arm CPUs.

```

## Parents

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

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