From dbf361128a1e9940ada0af32d9d0d728d08b8943 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 18 Jul 2007 17:47:40 -0700 Subject: [PATCH] Implement near returns. --HG-- extra : convert_revision : 3d6e8a976d31cb016a4b78200716b0ece155137a --- .../x86/isa/insts/control_transfer/xreturn.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/arch/x86/isa/insts/control_transfer/xreturn.py b/src/arch/x86/isa/insts/control_transfer/xreturn.py index aaffa2b92..1e8e0ba55 100644 --- a/src/arch/x86/isa/insts/control_transfer/xreturn.py +++ b/src/arch/x86/isa/insts/control_transfer/xreturn.py @@ -53,8 +53,14 @@ # # Authors: Gabe Black -microcode = "" -#let {{ -# class RET(Inst): -# "GenFault ${new UnimpInstFault}" -#}}; +microcode = ''' +def macroop RET +{ + # Make the default data size of rets 64 bits in 64 bit mode + .adjust_env oszIn64Override + + ld t1, ss, [0, t0, rsp] + addi rsp, rsp, dsz + wripi t1, 0 +}; +''' -- 2.30.2