From c526b00b35d7f135aa926186159df396ee41fbd3 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 18 Oct 2007 22:40:48 -0700 Subject: X86: Implement the BOUND instruction. --HG-- extra : convert_revision : 7bcfa5b4a47d342bee267cc593a1bd4b4f31abe0 --- .../insts/general_purpose/compare_and_test/bounds.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/arch/x86/isa/insts') diff --git a/src/arch/x86/isa/insts/general_purpose/compare_and_test/bounds.py b/src/arch/x86/isa/insts/general_purpose/compare_and_test/bounds.py index 4b6cc8f71..2df5cf746 100644 --- a/src/arch/x86/isa/insts/general_purpose/compare_and_test/bounds.py +++ b/src/arch/x86/isa/insts/general_purpose/compare_and_test/bounds.py @@ -53,8 +53,17 @@ # # Authors: Gabe Black -microcode = "" -#let {{ -# class BOUND(Inst): -# "GenFault ${new UnimpInstFault}" -#}}; +microcode = ''' +def macroop BOUND_R_M { + ld t1, seg, sib, disp, dataSize="env.dataSize * 2" + srli t2, t1, "env.dataSize * 8" + sub t1, t1, reg, flags=(ECF,) + fault "new BoundRange", flags=(CECF,) + sub t2, reg, t2, flags=(ECF,) + fault "new BoundRange", flags=(CECF,) +}; + +def macroop BOUND_R_P { + fault "new UnimpInstFault" +}; +''' -- cgit v1.2.3