diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-07-18 16:33:56 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-07-18 16:33:56 -0700 |
commit | 6c54b654a880ffa83a16a043d90612bd49815de6 (patch) | |
tree | 9259c09c5e7480eca19b8fc60978b16542a05ac9 /src/arch/x86/isa/insts/arithmetic/add_and_subtract.py | |
parent | bafb7ee5c1ba31c9a52de835a24d9df65b818ab6 (diff) | |
download | gem5-6c54b654a880ffa83a16a043d90612bd49815de6.tar.xz |
Implement some forms of add.
--HG--
extra : convert_revision : adbff2e9b9952ec09853cc43d40243e7262410a7
Diffstat (limited to 'src/arch/x86/isa/insts/arithmetic/add_and_subtract.py')
-rw-r--r-- | src/arch/x86/isa/insts/arithmetic/add_and_subtract.py | 23 |
1 files changed, 23 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 fbfe4be7e..4d6e40c74 100644 --- a/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py +++ b/src/arch/x86/isa/insts/arithmetic/add_and_subtract.py @@ -54,6 +54,29 @@ # Authors: Gabe Black microcode = ''' +def macroop ADD_R_I +{ + limm t1, imm + add reg, reg, t1 +}; + +def macroop ADD_M_I +{ + limm t2, imm + ld t1, ds, [scale, index, base], disp + add t1, t1, t2 + st t1, ds, [scale, index, base], disp +}; + +def macroop ADD_P_I +{ + rdip t7 + limm t2, imm + ld t1, ds, [scale, index, base], disp + add t1, t1, t2 + st t1, ds, [scale, index, base], disp +}; + def macroop SUB_R_I { limm t1, imm |