From fa85be2b8c362f92e872335667f429c482721e2c Mon Sep 17 00:00:00 2001 From: Forest Belton Date: Mon, 13 Sep 2021 22:47:47 -0400 Subject: [PATCH] Assemble bitwise negation operator --- lib/asm.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/asm.ts b/lib/asm.ts index a09edba..5ba4fe7 100644 --- a/lib/asm.ts +++ b/lib/asm.ts @@ -136,6 +136,12 @@ export const convertASM_SSA_Unary = (state: ASMState, ssa: SSAUnary): void => { ) break + case '~': + state.insns.push( + `CPL` + ) + break + default: throw new Error(`unsupported unary op \`'${ssa.op}`) }