diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-07-23 01:07:49 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-07-23 01:07:49 +0000 |
commit | 85f9415a67f3f3b54a615c2e29576235d11428f3 (patch) | |
tree | 599f0410465cca36d8b94ebc2a34d5a21501d987 /src/arch/x86/isa/insts/arithmetic | |
parent | 089fce4f59fd0086202e9cf5f7b2a46c6545f7b6 (diff) | |
download | gem5-85f9415a67f3f3b54a615c2e29576235d11428f3.tar.xz |
Make the operand size reflect the size specifier on the operand tags, and implement NEG
--HG--
extra : convert_revision : da73ed6820d57f083c18f44b2fa868fc0976dd16
Diffstat (limited to 'src/arch/x86/isa/insts/arithmetic')
-rw-r--r-- | src/arch/x86/isa/insts/arithmetic/add_and_subtract.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py b/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py index 05aa6cd69..e637251d2 100644 --- a/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py +++ b/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py @@ -277,6 +277,26 @@ def macroop SBB_P_R sbb t1, t1, reg st t1, ds, [scale, index, base], disp }; + +def macroop NEG_R +{ + sub reg, t0, reg, flags=(CF,OF,SF,ZF,AF,PF) +}; + +def macroop NEG_M +{ + ld t1, ds, [scale, index, base], disp + sub t1, t0, t1, flags=(CF,OF,SF,ZF,AF,PF) + st t1, ds, [scale, index, base], disp +}; + +def macroop NEG_P +{ + rdip t7 + ld t1, ds, [0, t0, t7], disp + sub t1, t0, t1, flags=(CF,OF,SF,ZF,AF,PF) + st t1, ds, [0, t0, t7], disp +}; ''' #let {{ # class ADC(Inst): |