# stage2: implement \`@setAlignStack\` and 128-bit cmpxchg · gitcafe/zig

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

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

Visibility: public

Requested revision: dbe9a5114e2d56f847b674539ffa0d28fc57ea78

Requested commit: dbe9a5114e2d56f847b674539ffa0d28fc57ea78

Commit: dbe9a5114e2d56f847b674539ffa0d28fc57ea78

Tree: 078fe7aadd48de9c78aea90d6a383ba134622be5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: implement `@setAlignStack` and 128-bit cmpxchg

 * test runner is improved to respect `error.SkipZigTest`
 * start code is improved to `@setAlignStack(16)` before calling main()
 * the newly passing behavior test has a workaround for the fact that
   stage2 cannot yet call `std.Target.x86.featureSetHas()` at comptime.
   This is blocking on comptime closures. The workaround is that there
   is a new decl `@import("builtin").stage2_x86_cx16` which is a `bool`.
 * Implement `@setAlignStack`. This language feature should be re-evaluated
   at some point - I'll file an issue for it.
 * LLVM backend: apply/remove the cold attribute and noinline attribute
   where appropriate.
 * LLVM backend: loads and stores are properly annotated with alignment
   and volatile attributes.
 * LLVM backend: allocas are properly annotated with alignment.
 * Type: fix integers reporting wrong alignment for 256-bit integers and
   beyond. Once you get to 16 byte aligned, there is no further
   alignment for larger integers.

```

## Parents

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

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