diff options
Diffstat (limited to 'src/arch/x86/isa/insts/logical.py')
-rw-r--r-- | src/arch/x86/isa/insts/logical.py | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/arch/x86/isa/insts/logical.py b/src/arch/x86/isa/insts/logical.py index fee631da7..ec0ed97b2 100644 --- a/src/arch/x86/isa/insts/logical.py +++ b/src/arch/x86/isa/insts/logical.py @@ -54,10 +54,43 @@ # Authors: Gabe Black microcode = ''' -def macroop XOR +def macroop XOR_R_R { xor "env.reg", "env.reg", "env.regm" }; + +def macroop XOR_R_I +{ + limm "NUM_INTREGS", "env.immediate" + xor "env.reg", "env.reg", "NUM_INTREGS" +}; + +def macroop XOR_M_R +{ + #Do a load to get one of the sources + xor "NUM_INTREGS", "NUM_INTREGS", "env.reg" + #Do a store to write the destination +}; + +def macroop XOR_R_M +{ + #Do a load to get one of the sources + xor "env.reg", "env.reg", "NUM_INTREGS" +}; + +def macroop AND_R_I +{ + limm "NUM_INTREGS", "env.immediate" + and "env.reg", "env.reg", "NUM_INTREGS" +}; + +def macroop AND_M_I +{ + #Do a load to get one of the sources + limm "NUM_INTREGS", "env.immediate" + and "NUM_INTREGS", "NUM_INTREGS", "NUM_INTREGS+1" + #Do a store to write the destination +}; ''' #let {{ #microcodeString = ''' |