# stage2: x86_64: implement \`ptr_elem_val\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 6d7808e647e6d244e53a18139c22bce8cd38a3ca

Requested commit: 6d7808e647e6d244e53a18139c22bce8cd38a3ca

Commit: 6d7808e647e6d244e53a18139c22bce8cd38a3ca

Tree: 5cf473b372fff7177a6f91b00459de74dc006aa9

Author: mparadinha

Committer: mparadinha

## Message

```
stage2: x86_64: implement `ptr_elem_val`

The codegen for this is almost identical to `ptr_elem_ptr` except
there's an extra `mov` at the end to replace the pointer with the
value it points to, "in-place" (which can be done in a single
instruction without any extra registers).

```

## Parents

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

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