From: Gabe Black Date: Fri, 7 Aug 2009 17:13:24 +0000 (-0700) Subject: X86: Implement SHLD. X-Git-Tag: Calvin_Submission~151 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f5270f9468cc9959f12206659f84a06c0c2077e;p=gem5.git X86: Implement SHLD. --- diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 401e02965..c47fb5184 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -820,8 +820,8 @@ Rdx = result.rdx; }}); 0x3: Inst::BT(Ev,Gv); - 0x4: shld_Ev_Gv_Ib(); - 0x5: shld_Ev_Gv_rCl(); + 0x4: Inst::SHLD(Ev,Gv,Ib); + 0x5: Inst::SHLD(Ev,Gv); 0x6: xbts_and_cmpxchg(); 0x7: ibts_and_cmpxchg(); } diff --git a/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/shift.py b/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/shift.py index caaeca974..d2a579ecb 100644 --- a/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/shift.py +++ b/src/arch/x86/isa/insts/general_purpose/rotate_and_shift/shift.py @@ -114,6 +114,52 @@ def macroop SAL_P_R st t1, seg, riprel, disp }; +def macroop SHLD_R_R +{ + mdbi regm, 0 + sld reg, reg, rcx, flags=(CF,OF,SF,ZF,PF) +}; + +def macroop SHLD_M_R +{ + ldst t1, seg, sib, disp + mdbi reg, 0 + sld t1, t1, rcx, flags=(CF,OF,SF,ZF,PF) + st t1, seg, sib, disp +}; + +def macroop SHLD_P_R +{ + rdip t7 + ldst t1, seg, riprel, disp + mdbi reg, 0 + sld t1, t1, rcx, flags=(CF,OF,SF,ZF,PF) + st t1, seg, riprel, disp +}; + +def macroop SHLD_R_R_I +{ + mdbi regm, 0 + sldi reg, reg, imm, flags=(CF,OF,SF,ZF,PF) +}; + +def macroop SHLD_M_R_I +{ + ldst t1, seg, sib, disp + mdbi reg, 0 + sldi t1, t1, imm, flags=(CF,OF,SF,ZF,PF) + st t1, seg, sib, disp +}; + +def macroop SHLD_P_R_I +{ + rdip t7 + ldst t1, seg, riprel, disp + mdbi reg, 0 + sldi t1, t1, imm, flags=(CF,OF,SF,ZF,PF) + st t1, seg, riprel, disp +}; + def macroop SHR_R_I { srli reg, reg, imm, flags=(CF,OF,SF,ZF,PF)