Added more destructive mnemonics

This commit is contained in:
Eduard Urbach 2024-07-31 23:47:44 +02:00
parent c8824e699a
commit 8862dec3e4
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -4,7 +4,7 @@ import "git.akyoto.dev/cli/q/src/build/asm"
func isDestructive(mnemonic asm.Mnemonic) bool { func isDestructive(mnemonic asm.Mnemonic) bool {
switch mnemonic { switch mnemonic {
case asm.MOVE, asm.ADD, asm.SUB, asm.MUL, asm.DIV: case asm.MOVE, asm.ADD, asm.SUB, asm.MUL, asm.DIV, asm.MODULO, asm.AND, asm.OR, asm.XOR, asm.SHIFTL, asm.SHIFTRS, asm.NEGATE:
return true return true
default: default:
return false return false