diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-10-18 22:40:48 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-10-18 22:40:48 -0700 |
commit | c526b00b35d7f135aa926186159df396ee41fbd3 (patch) | |
tree | 47d37207163537ef2e7888389dedc20e24345aa1 /src | |
parent | 33dbd8a76698fefeb3a0c3f735da22c044b8a872 (diff) | |
download | gem5-c526b00b35d7f135aa926186159df396ee41fbd3.tar.xz |
X86: Implement the BOUND instruction.
--HG--
extra : convert_revision : 7bcfa5b4a47d342bee267cc593a1bd4b4f31abe0
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/isa/decoder/one_byte_opcodes.isa | 2 | ||||
-rw-r--r-- | src/arch/x86/isa/insts/general_purpose/compare_and_test/bounds.py | 19 |
2 files changed, 15 insertions, 6 deletions
diff --git a/src/arch/x86/isa/decoder/one_byte_opcodes.isa b/src/arch/x86/isa/decoder/one_byte_opcodes.isa index 10118eae8..23ba243fb 100644 --- a/src/arch/x86/isa/decoder/one_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/one_byte_opcodes.isa @@ -186,7 +186,7 @@ } 0x2: decode MODE_SUBMODE { 0x0: UD2(); - default: WarnUnimpl::bound_Gv_Ma(); + default: BOUND(Gv,Mv); } 0x3: decode MODE_SUBMODE { //The second operand should really be of size "d", but it's 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" +}; +''' |