From: Gabe Black Date: Mon, 30 Jul 2007 20:19:11 +0000 (-0700) Subject: X86: Implement LEAVE X-Git-Tag: m5_2.0_beta4~246 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b3a20cdeca2e72606c435ee59abc936cfcb6db2;p=gem5.git X86: Implement LEAVE --HG-- extra : convert_revision : c642d5018ece82c644e1cfa389b2d3dbd6ab5ffd --- 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):