diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-01-25 20:32:43 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-01-25 20:32:43 -0800 |
commit | 3c5988b86c9fcb06927a8e12095e278b55593911 (patch) | |
tree | 37791cbfb0c3b9a972179070c7b92752247d5649 /src/arch/x86/isa/insts/general_purpose | |
parent | 919c3e7fb6675c35fdc8d54aebb13c6e938de4b9 (diff) | |
download | gem5-3c5988b86c9fcb06927a8e12095e278b55593911.tar.xz |
X86: Implement the bswap instruction.
Diffstat (limited to 'src/arch/x86/isa/insts/general_purpose')
-rw-r--r-- | src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py b/src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py index b375ac27e..ac2343462 100644 --- a/src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py +++ b/src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py @@ -53,7 +53,25 @@ # # Authors: Gabe Black -microcode = "" +microcode = ''' +def macroop BSWAP_D_R +{ + roli reg, reg, 8, dataSize=2 + roli reg, reg, 16, dataSize=4 + roli reg, reg, 8, dataSize=2 +}; + +def macroop BSWAP_Q_R +{ + roli reg, reg, 8, dataSize=2 + roli reg, reg, 16, dataSize=4 + roli reg, reg, 8, dataSize=2 + roli reg, reg, 32, dataSize=8 + roli reg, reg, 8, dataSize=2 + roli reg, reg, 16, dataSize=4 + roli reg, reg, 8, dataSize=2 +}; +''' #let {{ # class BSWAP(Inst): # "GenFault ${new UnimpInstFault}" |