From f0276dd53b639e55c7ce490ba8245715e03e8649 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 8 Jan 2018 22:03:20 +0000 Subject: [PATCH] emit_x86: Fix nzcv for EmitSub --- src/backend_x64/emit_x64.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index 1dda7d08..b4fa7c7a 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -910,6 +910,7 @@ static void EmitSub(BlockOfCode* code, EmitContext& ctx, IR::Inst* inst, size_t if (nzcv_inst) { ctx.EraseInstruction(nzcv_inst); + code->cmc(); code->lahf(); code->seto(code->al); ctx.reg_alloc.DefineValue(nzcv_inst, nzcv);