mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Make the results for the rotate functions correct when rotateAmt == 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1249,6 +1249,8 @@ APInt APInt::shl(uint32_t shiftAmt) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
APInt APInt::rotl(uint32_t rotateAmt) const {
|
APInt APInt::rotl(uint32_t rotateAmt) const {
|
||||||
|
if (rotateAmt == 0)
|
||||||
|
return *this;
|
||||||
// Don't get too fancy, just use existing shift/or facilities
|
// Don't get too fancy, just use existing shift/or facilities
|
||||||
APInt hi(*this);
|
APInt hi(*this);
|
||||||
APInt lo(*this);
|
APInt lo(*this);
|
||||||
@@ -1258,6 +1260,8 @@ APInt APInt::rotl(uint32_t rotateAmt) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
APInt APInt::rotr(uint32_t rotateAmt) const {
|
APInt APInt::rotr(uint32_t rotateAmt) const {
|
||||||
|
if (rotateAmt == 0)
|
||||||
|
return *this;
|
||||||
// Don't get too fancy, just use existing shift/or facilities
|
// Don't get too fancy, just use existing shift/or facilities
|
||||||
APInt hi(*this);
|
APInt hi(*this);
|
||||||
APInt lo(*this);
|
APInt lo(*this);
|
||||||
|
Reference in New Issue
Block a user