mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
use llabs not abs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b3b89c28e
commit
01c8f6e452
@ -678,7 +678,7 @@ static struct ms magic(int64_t d) {
|
|||||||
const uint64_t two63 = 9223372036854775808ULL; // 2^63
|
const uint64_t two63 = 9223372036854775808ULL; // 2^63
|
||||||
struct ms mag;
|
struct ms mag;
|
||||||
|
|
||||||
ad = abs(d);
|
ad = llabs(d);
|
||||||
t = two63 + ((uint64_t)d >> 63);
|
t = two63 + ((uint64_t)d >> 63);
|
||||||
anc = t - 1 - t%ad; // absolute value of nc
|
anc = t - 1 - t%ad; // absolute value of nc
|
||||||
p = 63; // initialize p
|
p = 63; // initialize p
|
||||||
@ -1847,9 +1847,9 @@ unsigned AlphaISel::SelectExpr(SDOperand N) {
|
|||||||
//check if we can convert into a shift!
|
//check if we can convert into a shift!
|
||||||
if ((CSD = dyn_cast<ConstantSDNode>(N.getOperand(1).Val)) &&
|
if ((CSD = dyn_cast<ConstantSDNode>(N.getOperand(1).Val)) &&
|
||||||
(int64_t)CSD->getSignExtended() != 0 &&
|
(int64_t)CSD->getSignExtended() != 0 &&
|
||||||
ExactLog2(abs((int64_t)CSD->getSignExtended())) != 0)
|
ExactLog2(llabs(CSD->getSignExtended())) != 0)
|
||||||
{
|
{
|
||||||
unsigned k = ExactLog2(abs(CSD->getSignExtended()));
|
unsigned k = ExactLog2(llabs(CSD->getSignExtended()));
|
||||||
Tmp1 = SelectExpr(N.getOperand(0));
|
Tmp1 = SelectExpr(N.getOperand(0));
|
||||||
if (k == 1)
|
if (k == 1)
|
||||||
Tmp2 = Tmp1;
|
Tmp2 = Tmp1;
|
||||||
|
Loading…
Reference in New Issue
Block a user