From 4b3a20cdeca2e72606c435ee59abc936cfcb6db2 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 30 Jul 2007 13:19:11 -0700 Subject: [PATCH] X86: Implement LEAVE --HG-- extra : convert_revision : c642d5018ece82c644e1cfa389b2d3dbd6ab5ffd --- src/arch/x86/isa/insts/data_transfer/stack_operations.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/arch/x86/isa/insts/data_transfer/stack_operations.py b/src/arch/x86/isa/insts/data_transfer/stack_operations.py index 1c13b44b4..082e24485 100644 --- a/src/arch/x86/isa/insts/data_transfer/stack_operations.py +++ b/src/arch/x86/isa/insts/data_transfer/stack_operations.py @@ -141,6 +141,15 @@ def macroop POPA { ld rax, ss, [0, t0, rsp], "7 * env.dataSize" addi rsp, rsp, "8 * env.dataSize" }; + +def macroop LEAVE { + # Make the default data size of pops 64 bits in 64 bit mode + .adjust_env oszIn64Override + + mov rsp, rsp, rbp + ld rbp, ss, [0, t0, rsp] + addi rsp, rsp, dsz +}; ''' #let {{ # class ENTER(Inst): -- 2.30.2