regop.isa (6441:801f1fc07a58) | regop.isa (6442:580a6fbc7585) |
---|---|
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 --- 666 unchanged lines hidden (view full) --- 675 ''' 676 flag_code = ''' 677 // If the shift amount is zero, no flags should be modified. 678 if (shiftAmt) { 679 //Zero out any flags we might modify. This way we only have to 680 //worry about setting them. 681 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 682 //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 --- 666 unchanged lines hidden (view full) --- 675 ''' 676 flag_code = ''' 677 // If the shift amount is zero, no flags should be modified. 678 if (shiftAmt) { 679 //Zero out any flags we might modify. This way we only have to 680 //worry about setting them. 681 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 682 //If some combination of the CF bits need to be set, set them. |
683 if ((ext & (CFBit | ECFBit)) && bits(SrcReg1, shiftAmt - 1)) | 683 if ((ext & (CFBit | ECFBit)) && 684 shiftAmt <= dataSize * 8 && 685 bits(SrcReg1, shiftAmt - 1)) { |
684 ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit)); | 686 ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit)); |
687 } |
|
685 //Figure out what the OF bit should be. 686 if ((ext & OFBit) && bits(SrcReg1, dataSize * 8 - 1)) 687 ccFlagBits = ccFlagBits | OFBit; 688 //Use the regular mechanisms to calculate the other flags. 689 ccFlagBits = genFlags(ccFlagBits, ext & ~(CFBit | ECFBit | OFBit), 690 DestReg, psrc1, op2); 691 } 692 ''' --- 610 unchanged lines hidden --- | 688 //Figure out what the OF bit should be. 689 if ((ext & OFBit) && bits(SrcReg1, dataSize * 8 - 1)) 690 ccFlagBits = ccFlagBits | OFBit; 691 //Use the regular mechanisms to calculate the other flags. 692 ccFlagBits = genFlags(ccFlagBits, ext & ~(CFBit | ECFBit | OFBit), 693 DestReg, psrc1, op2); 694 } 695 ''' --- 610 unchanged lines hidden --- |