regop.isa (6447:eebbe9f1bf10) regop.isa (6449:a7a428f403da)
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

--- 713 unchanged lines hidden (view full) ---

722 DestReg, psrc1, op2);
723 }
724 '''
725
726 class Ror(RegOp):
727 code = '''
728 uint8_t shiftAmt =
729 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

--- 713 unchanged lines hidden (view full) ---

722 DestReg, psrc1, op2);
723 }
724 '''
725
726 class Ror(RegOp):
727 code = '''
728 uint8_t shiftAmt =
729 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
730 if(shiftAmt)
730 uint8_t realShiftAmt = shiftAmt % (dataSize * 8);
731 if(realShiftAmt)
731 {
732 {
732 uint64_t top = psrc1 << (dataSize * 8 - shiftAmt);
733 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt);
733 uint64_t top = psrc1 << (dataSize * 8 - realShiftAmt);
734 uint64_t bottom = bits(psrc1, dataSize * 8, realShiftAmt);
734 DestReg = merge(DestReg, top | bottom, dataSize);
735 }
736 else
737 DestReg = merge(DestReg, DestReg, dataSize);
738 '''
739 flag_code = '''
740 // If the shift amount is zero, no flags should be modified.
741 if (shiftAmt) {

--- 569 unchanged lines hidden ---
735 DestReg = merge(DestReg, top | bottom, dataSize);
736 }
737 else
738 DestReg = merge(DestReg, DestReg, dataSize);
739 '''
740 flag_code = '''
741 // If the shift amount is zero, no flags should be modified.
742 if (shiftAmt) {

--- 569 unchanged lines hidden ---