Simplified file structure

This commit is contained in:
Eduard Urbach 2024-08-07 19:39:10 +02:00
parent cacee7260a
commit a466281307
Signed by: eduard
GPG key ID: 49226B848C78F6C8
219 changed files with 453 additions and 457 deletions

View file

@ -1,20 +0,0 @@
package x64
import "git.akyoto.dev/cli/q/src/build/cpu"
// DivRegister divides RDX:RAX by the value in the register.
func DivRegister(code []byte, divisor cpu.Register) []byte {
rex := byte(0x48)
if divisor >= 8 {
rex++
divisor -= 8
}
return append(
code,
rex,
0xF7,
0xF8+byte(divisor),
)
}