diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-04-19 04:56:02 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-04-19 04:56:02 -0700 |
commit | a7f79c904953fec11f617fdefa0f3500f94cca65 (patch) | |
tree | 2a5c3568f40f7e984398c70b4834a835a7a3e922 /src/arch/x86 | |
parent | d90456a4868baa931ca089a471c2b9230830d848 (diff) | |
download | gem5-a7f79c904953fec11f617fdefa0f3500f94cca65.tar.xz |
X86: Implement a locking version of ADD.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py b/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py index e58fc00d7..577c50367 100644 --- a/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py +++ b/src/arch/x86/isa/insts/general_purpose/arithmetic/add_and_subtract.py @@ -82,6 +82,23 @@ def macroop ADD_P_I st t1, seg, riprel, disp }; +def macroop ADD_LOCKED_M_I +{ + limm t2, imm + ldstl t1, seg, sib, disp + add t1, t1, t2, flags=(OF,SF,ZF,AF,PF,CF) + stul t1, seg, sib, disp +}; + +def macroop ADD_LOCKED_P_I +{ + rdip t7 + limm t2, imm + ldstl t1, seg, riprel, disp + add t1, t1, t2, flags=(OF,SF,ZF,AF,PF,CF) + stul t1, seg, riprel, disp +}; + def macroop ADD_M_R { ldst t1, seg, sib, disp @@ -97,6 +114,21 @@ def macroop ADD_P_R st t1, seg, riprel, disp }; +def macroop ADD_LOCKED_M_R +{ + ldstl t1, seg, sib, disp + add t1, t1, reg, flags=(OF,SF,ZF,AF,PF,CF) + stul t1, seg, sib, disp +}; + +def macroop ADD_LOCKED_P_R +{ + rdip t7 + ldstl t1, seg, riprel, disp + add t1, t1, reg, flags=(OF,SF,ZF,AF,PF,CF) + stul t1, seg, riprel, disp +}; + def macroop ADD_R_M { ld t1, seg, sib, disp |