regop.isa (6443:fa4e81c993d0) regop.isa (6444:8e72cf8196cc)
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

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

706 '''
707 flag_code = '''
708 // If the shift amount is zero, no flags should be modified.
709 if (shiftAmt) {
710 //Zero out any flags we might modify. This way we only have to
711 //worry about setting them.
712 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit));
713 //If some combination of the CF bits need to be set, set them.
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

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

706 '''
707 flag_code = '''
708 // If the shift amount is zero, no flags should be modified.
709 if (shiftAmt) {
710 //Zero out any flags we might modify. This way we only have to
711 //worry about setting them.
712 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit));
713 //If some combination of the CF bits need to be set, set them.
714 if ((ext & (CFBit | ECFBit)) && bits(SrcReg1, shiftAmt - 1))
714 uint8_t effectiveShift =
715 (shiftAmt <= dataSize * 8) ? shiftAmt : (dataSize * 8);
716 if ((ext & (CFBit | ECFBit)) &&
717 bits(SrcReg1, effectiveShift - 1)) {
715 ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit));
718 ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit));
719 }
716 //Use the regular mechanisms to calculate the other flags.
717 ccFlagBits = genFlags(ccFlagBits, ext & ~(CFBit | ECFBit | OFBit),
718 DestReg, psrc1, op2);
719 }
720 '''
721
722 class Ror(RegOp):
723 code = '''

--- 582 unchanged lines hidden ---
720 //Use the regular mechanisms to calculate the other flags.
721 ccFlagBits = genFlags(ccFlagBits, ext & ~(CFBit | ECFBit | OFBit),
722 DestReg, psrc1, op2);
723 }
724 '''
725
726 class Ror(RegOp):
727 code = '''

--- 582 unchanged lines hidden ---