mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
For PR1245:
Account for the sign bit when computing the number of bits required for a negative integer literal constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
818c085232
commit
87707b90b1
@ -377,7 +377,7 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
|
||||
}
|
||||
}
|
||||
{NInteger} { int len = strlen(yytext);
|
||||
uint32_t numBits = (((len-1) * 64) / 19) + 1;
|
||||
uint32_t numBits = (((len-1) * 64) / 19) + 2;
|
||||
APInt Tmp(numBits, yytext, len, 10);
|
||||
uint32_t minBits = Tmp.getMinSignedBits();
|
||||
if (minBits > 0 && minBits < numBits)
|
||||
|
Loading…
Reference in New Issue
Block a user