# LLVM: fix C ABI for windows · gitcafe/zig

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

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

Visibility: public

Requested revision: 44252f4d352d53afd86d678c0b0a40b3f681c7eb

Requested commit: 44252f4d352d53afd86d678c0b0a40b3f681c7eb

Commit: 44252f4d352d53afd86d678c0b0a40b3f681c7eb

Tree: 91dddc4c240b1aa429ea6d80835640b4a85e2c23

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
LLVM: fix C ABI for windows

 * sret logic needed a check for hasRuntimeBits()
 * lower f128 on windows targets with the "sse" class rather than
   "memory". For reference, clang emits a compile error when __float128
   is used with the MSVC ABI, saying that this type is not supported.
   The docs for the x64 calling convention have both of these sentences:
   - "Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes,
     must be passed by reference."
   - "All floating point operations are done using the 16 XMM registers."
 * For i128, however, it is clear that the Windows calling convention
   wants such an object to be passed by reference. I fixed the LLVM
   lowering for function parameters to make this work.

```

## Parents

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

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