1721c1721
< if (srcElem1 < 0 && destElem >= 0) {
---
> if (ltz(srcElem1) && !ltz(destElem)) {
1743c1743
< if (shiftAmt > sizeof(Element) * 8 && srcElem1 < 0)
---
> if (shiftAmt > sizeof(Element) * 8 && ltz(srcElem1))
1752c1752
< if (srcElem1 < 0 && destElem >= 0) {
---
> if (ltz(srcElem1) && !ltz(destElem)) {
1781,1785d1780
< // Make sure the right shift sign extended when it should.
< if (srcElem1 < 0 && destElem >= 0) {
< destElem |= -((Element)1 << (sizeof(Element) * 8 -
< 1 - shiftAmt));
< }
1865,1866d1859
< if (shiftAmt > sizeof(Element) * 8 && srcElem1 < 0)
< rBit = 1;
1873,1877d1865
< // Make sure the right shift sign extended when it should.
< if (srcElem1 < 0 && destElem >= 0) {
< destElem |= -((Element)1 << (sizeof(Element) * 8 -
< 1 - shiftAmt));
< }
2017c2005
< bool negPreDest = (destElem < 0);
---
> bool negPreDest = ltz(destElem);
2019,2020c2007,2008
< bool negDest = (destElem < 0);
< bool negMid = (midElem < 0);
---
> bool negDest = ltz(destElem);
> bool negMid = ltz(midElem);
2042c2030
< bool negPreDest = (destElem < 0);
---
> bool negPreDest = ltz(destElem);
2044,2045c2032,2033
< bool negDest = (destElem < 0);
< bool posMid = (midElem > 0);
---
> bool negDest = ltz(destElem);
> bool posMid = ltz((BigElement)-midElem);
2364c2352
< if (srcElem1 < 0)
---
> if (ltz(srcElem1))
2378c2366
< mid = (srcElem1 < 0) ? -1 : 0;
---
> mid = ltz(srcElem1) ? -1 : 0;
2381c2369
< if (srcElem1 < 0 && mid >= 0) {
---
> if (ltz(srcElem1) && !ltz(mid)) {
2689,2690d2676
< if (srcElem1 < 0)
< destElem = ~destElem;