regop.isa (5028:b9d42ad1f94e) | regop.isa (5032:17f771e6b2f2) |
---|---|
1// Copyright (c) 2007 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 --- 576 unchanged lines hidden (view full) --- 585 DestReg = merge(DestReg, (psrc1 >> shiftAmt) & logicalMask, dataSize); 586 ''') 587 defineMicroRegOp('Sra', ''' 588 uint8_t shiftAmt = (op2 & ((dataSize == 8) ? mask(6) : mask(5))); 589 // Because what happens to the bits shift -in- on a right shift 590 // is not defined in the C/C++ standard, we have to sign extend 591 // them manually to be sure. 592 uint64_t arithMask = | 1// Copyright (c) 2007 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 --- 576 unchanged lines hidden (view full) --- 585 DestReg = merge(DestReg, (psrc1 >> shiftAmt) & logicalMask, dataSize); 586 ''') 587 defineMicroRegOp('Sra', ''' 588 uint8_t shiftAmt = (op2 & ((dataSize == 8) ? mask(6) : mask(5))); 589 // Because what happens to the bits shift -in- on a right shift 590 // is not defined in the C/C++ standard, we have to sign extend 591 // them manually to be sure. 592 uint64_t arithMask = |
593 -bits(op2, dataSize * 8 - 1) << (dataSize * 8 - shiftAmt); | 593 -bits(psrc1, dataSize * 8 - 1) << (dataSize * 8 - shiftAmt); |
594 DestReg = merge(DestReg, (psrc1 >> shiftAmt) | arithMask, dataSize); 595 ''') 596 defineMicroRegOp('Ror', ''' 597 uint8_t shiftAmt = 598 (op2 & ((dataSize == 8) ? mask(6) : mask(5))); 599 if(shiftAmt) 600 { 601 uint64_t top = psrc1 << (dataSize * 8 - shiftAmt); --- 75 unchanged lines hidden --- | 594 DestReg = merge(DestReg, (psrc1 >> shiftAmt) | arithMask, dataSize); 595 ''') 596 defineMicroRegOp('Ror', ''' 597 uint8_t shiftAmt = 598 (op2 & ((dataSize == 8) ? mask(6) : mask(5))); 599 if(shiftAmt) 600 { 601 uint64_t top = psrc1 << (dataSize * 8 - shiftAmt); --- 75 unchanged lines hidden --- |