mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-01 03:33:42 +00:00
Use INT64_C to emit constant values, to avoid problems with
constants that don't fit in an int. This fixes "this decimal constant is unsigned only in ISO C90" warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
63f97201dc
commit
b2a1432507
@ -444,7 +444,8 @@ public:
|
||||
if (N->isLeaf()) {
|
||||
if (IntInit *II = dynamic_cast<IntInit*>(N->getLeafValue())) {
|
||||
emitCheck("cast<ConstantSDNode>(" + RootName +
|
||||
")->getSExtValue() == " + itostr(II->getValue()));
|
||||
")->getSExtValue() == INT64_C(" +
|
||||
itostr(II->getValue()) + ")");
|
||||
return;
|
||||
} else if (!NodeIsComplexPattern(N)) {
|
||||
assert(0 && "Cannot match this as a leaf value!");
|
||||
@ -578,7 +579,7 @@ public:
|
||||
const char *MaskPredicate = N->getOperator()->getName() == "or"
|
||||
? "CheckOrMask(" : "CheckAndMask(";
|
||||
emitCheck(MaskPredicate + RootName + "0, cast<ConstantSDNode>(" +
|
||||
RootName + "1), " + itostr(II->getValue()) + ")");
|
||||
RootName + "1), INT64_C(" + itostr(II->getValue()) + "))");
|
||||
|
||||
EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0), RootName,
|
||||
ChainSuffix + utostr(0), FoundChain);
|
||||
|
Loading…
x
Reference in New Issue
Block a user