# stage2 x86_64: implement integer mul · gitcafe/zig

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

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

Visibility: public

Requested revision: c4b83ea02102611a85f75b189f0803d9b6a335c2

Requested commit: c4b83ea02102611a85f75b189f0803d9b6a335c2

Commit: c4b83ea02102611a85f75b189f0803d9b6a335c2

Tree: 5460625c3766085c5f1210f577e3144296c6a986

Author: gracefu

Committer: gracefu

## Message

```
stage2 x86_64: implement integer mul

This was also an experiment to see if it were easier to implement a new
feature when using the instruction encoder.

Verdict: It's not that much easier, but I think it's certainly much more
readable, because the description of the Instruction annotates what each
field means. Right now, precise knowledge of x86_64 instructions is
still required because things like when to set the 64-bit flag, how to
read x86_64 instruction references, etc. are still not automatically
done for you.

In the future, this interface might make it sligtly easier to write an
assembler for x86_64, by abstracting the bit-fiddling aspects of
instruction encoding.

```

## Parents

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

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