regop.isa (6446:cc8568cfce8f) | regop.isa (6447:eebbe9f1bf10) |
---|---|
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 --- 720 unchanged lines hidden (view full) --- 729 (op2 & ((dataSize == 8) ? mask(6) : mask(5))); 730 if(shiftAmt) 731 { 732 uint64_t top = psrc1 << (dataSize * 8 - shiftAmt); 733 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt); 734 DestReg = merge(DestReg, top | bottom, dataSize); 735 } 736 else | 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 --- 720 unchanged lines hidden (view full) --- 729 (op2 & ((dataSize == 8) ? mask(6) : mask(5))); 730 if(shiftAmt) 731 { 732 uint64_t top = psrc1 << (dataSize * 8 - shiftAmt); 733 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt); 734 DestReg = merge(DestReg, top | bottom, dataSize); 735 } 736 else |
737 DestReg = DestReg; | 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) { 742 //Zero out any flags we might modify. This way we only have to 743 //worry about setting them. 744 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 745 //Find the most and second most significant bits of the result. --- 20 unchanged lines hidden (view full) --- 766 CCFlagBits flags = ccFlagBits; 767 uint64_t top = flags.cf << (dataSize * 8 - shiftAmt); 768 if(shiftAmt > 1) 769 top |= psrc1 << (dataSize * 8 - shiftAmt - 1); 770 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt); 771 DestReg = merge(DestReg, top | bottom, dataSize); 772 } 773 else | 738 ''' 739 flag_code = ''' 740 // If the shift amount is zero, no flags should be modified. 741 if (shiftAmt) { 742 //Zero out any flags we might modify. This way we only have to 743 //worry about setting them. 744 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 745 //Find the most and second most significant bits of the result. --- 20 unchanged lines hidden (view full) --- 766 CCFlagBits flags = ccFlagBits; 767 uint64_t top = flags.cf << (dataSize * 8 - shiftAmt); 768 if(shiftAmt > 1) 769 top |= psrc1 << (dataSize * 8 - shiftAmt - 1); 770 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt); 771 DestReg = merge(DestReg, top | bottom, dataSize); 772 } 773 else |
774 DestReg = DestReg; | 774 DestReg = merge(DestReg, DestReg, dataSize); |
775 ''' 776 flag_code = ''' 777 // If the shift amount is zero, no flags should be modified. 778 if (shiftAmt) { 779 //Zero out any flags we might modify. This way we only have to 780 //worry about setting them. 781 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 782 //Figure out what the OF bit should be. --- 17 unchanged lines hidden (view full) --- 800 if(realShiftAmt) 801 { 802 uint64_t top = psrc1 << realShiftAmt; 803 uint64_t bottom = 804 bits(psrc1, dataSize * 8 - 1, dataSize * 8 - realShiftAmt); 805 DestReg = merge(DestReg, top | bottom, dataSize); 806 } 807 else | 775 ''' 776 flag_code = ''' 777 // If the shift amount is zero, no flags should be modified. 778 if (shiftAmt) { 779 //Zero out any flags we might modify. This way we only have to 780 //worry about setting them. 781 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 782 //Figure out what the OF bit should be. --- 17 unchanged lines hidden (view full) --- 800 if(realShiftAmt) 801 { 802 uint64_t top = psrc1 << realShiftAmt; 803 uint64_t bottom = 804 bits(psrc1, dataSize * 8 - 1, dataSize * 8 - realShiftAmt); 805 DestReg = merge(DestReg, top | bottom, dataSize); 806 } 807 else |
808 DestReg = DestReg; | 808 DestReg = merge(DestReg, DestReg, dataSize); |
809 ''' 810 flag_code = ''' 811 // If the shift amount is zero, no flags should be modified. 812 if (shiftAmt) { 813 //Zero out any flags we might modify. This way we only have to 814 //worry about setting them. 815 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 816 //The CF bits, if set, would be set to the lsb of the result. --- 22 unchanged lines hidden (view full) --- 839 uint64_t bottom = flags.cf << (shiftAmt - 1); 840 if(shiftAmt > 1) 841 bottom |= 842 bits(psrc1, dataSize * 8 - 1, 843 dataSize * 8 - shiftAmt + 1); 844 DestReg = merge(DestReg, top | bottom, dataSize); 845 } 846 else | 809 ''' 810 flag_code = ''' 811 // If the shift amount is zero, no flags should be modified. 812 if (shiftAmt) { 813 //Zero out any flags we might modify. This way we only have to 814 //worry about setting them. 815 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 816 //The CF bits, if set, would be set to the lsb of the result. --- 22 unchanged lines hidden (view full) --- 839 uint64_t bottom = flags.cf << (shiftAmt - 1); 840 if(shiftAmt > 1) 841 bottom |= 842 bits(psrc1, dataSize * 8 - 1, 843 dataSize * 8 - shiftAmt + 1); 844 DestReg = merge(DestReg, top | bottom, dataSize); 845 } 846 else |
847 DestReg = DestReg; | 847 DestReg = merge(DestReg, DestReg, dataSize); |
848 ''' 849 flag_code = ''' 850 // If the shift amount is zero, no flags should be modified. 851 if (shiftAmt) { 852 //Zero out any flags we might modify. This way we only have to 853 //worry about setting them. 854 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 855 int msb = bits(DestReg, dataSize * 8 - 1); --- 455 unchanged lines hidden --- | 848 ''' 849 flag_code = ''' 850 // If the shift amount is zero, no flags should be modified. 851 if (shiftAmt) { 852 //Zero out any flags we might modify. This way we only have to 853 //worry about setting them. 854 ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit)); 855 int msb = bits(DestReg, dataSize * 8 - 1); --- 455 unchanged lines hidden --- |