From 1179b8a20f952612ad05915f9153333639d4dfc1 Mon Sep 17 00:00:00 2001 From: losfair Date: Tue, 2 Apr 2019 00:17:52 +0800 Subject: [PATCH] Fix Operator::Br. --- lib/dynasm-backend/src/codegen_x64.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dynasm-backend/src/codegen_x64.rs b/lib/dynasm-backend/src/codegen_x64.rs index 1cd7a75d4..479b3dd6d 100644 --- a/lib/dynasm-backend/src/codegen_x64.rs +++ b/lib/dynasm-backend/src/codegen_x64.rs @@ -1276,11 +1276,11 @@ impl FunctionCodeGenerator for X64FunctionCode { } else { false }; - let released: Vec = self.value_stack.drain(frame.value_stack_depth..) - .filter(|&(_, lot)| lot == LocalOrTemp::Temp) - .map(|(x, _)| x) + let released: Vec = self.value_stack[frame.value_stack_depth..].iter() + .filter(|&&(_, lot)| lot == LocalOrTemp::Temp) + .map(|&(x, _)| x) .collect(); - self.machine.release_locations(a, &released); + self.machine.release_locations_keep_state(a, &released); a.emit_jmp(Condition::None, frame.label); self.unreachable_depth = 1; }