regop.isa (6452:751b06abbaae) | regop.isa (6453:1d4dbb357560) |
---|---|
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 --- 763 unchanged lines hidden (view full) --- 772 DestReg = merge(DestReg, top | bottom, dataSize); 773 } 774 else 775 DestReg = merge(DestReg, DestReg, dataSize); 776 ''' 777 flag_code = ''' 778 // If the shift amount is zero, no flags should be modified. 779 if (shiftAmt) { | 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 --- 763 unchanged lines hidden (view full) --- 772 DestReg = merge(DestReg, top | bottom, dataSize); 773 } 774 else 775 DestReg = merge(DestReg, DestReg, dataSize); 776 ''' 777 flag_code = ''' 778 // If the shift amount is zero, no flags should be modified. 779 if (shiftAmt) { |
780 int origCFBit = (ccFlagBits & CFBit) ? 1 : 0; |
|
780 //Zero out any flags we might modify. This way we only have to 781 //worry about setting them. 782 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 783 //Figure out what the OF bit should be. | 781 //Zero out any flags we might modify. This way we only have to 782 //worry about setting them. 783 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 784 //Figure out what the OF bit should be. |
784 if ((ext & OFBit) && ((ccFlagBits & CFBit) ^ 785 bits(SrcReg1, dataSize * 8 - 1))) | 785 if ((ext & OFBit) && (origCFBit ^ 786 bits(SrcReg1, dataSize * 8 - 1))) { |
786 ccFlagBits = ccFlagBits | OFBit; | 787 ccFlagBits = ccFlagBits | OFBit; |
788 } |
|
787 //If some combination of the CF bits need to be set, set them. 788 if ((ext & (CFBit | ECFBit)) && bits(SrcReg1, shiftAmt - 1)) 789 ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit)); 790 //Use the regular mechanisms to calculate the other flags. 791 ccFlagBits = genFlags(ccFlagBits, ext & ~(CFBit | ECFBit | OFBit), 792 DestReg, psrc1, op2); 793 } 794 ''' --- 517 unchanged lines hidden --- | 789 //If some combination of the CF bits need to be set, set them. 790 if ((ext & (CFBit | ECFBit)) && bits(SrcReg1, shiftAmt - 1)) 791 ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit)); 792 //Use the regular mechanisms to calculate the other flags. 793 ccFlagBits = genFlags(ccFlagBits, ext & ~(CFBit | ECFBit | OFBit), 794 DestReg, psrc1, op2); 795 } 796 ''' --- 517 unchanged lines hidden --- |