mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 22:04:10 +00:00
Generalize a previous change, fixing PR8855 - an valid large immediate
rejected by the mc assembler. llvm-svn: 122557
This commit is contained in:
parent
a73a53e67f
commit
2129ce0891
@ -184,12 +184,12 @@ AsmToken AsmLexer::LexDigit() {
|
|||||||
|
|
||||||
long long Value;
|
long long Value;
|
||||||
if (Result.getAsInteger(10, Value)) {
|
if (Result.getAsInteger(10, Value)) {
|
||||||
// We have to handle minint_as_a_positive_value specially, because
|
// Allow positive values that are too large to fit into a signed 64-bit
|
||||||
// - minint_as_a_positive_value = minint and it is valid.
|
// integer, but that do fit in an unsigned one, we just convert them over.
|
||||||
if (Result == "9223372036854775808")
|
unsigned long long UValue;
|
||||||
Value = -9223372036854775808ULL;
|
if (Result.getAsInteger(10, UValue))
|
||||||
else
|
return ReturnError(TokStart, "invalid decimal number");
|
||||||
return ReturnError(TokStart, "Invalid decimal number");
|
Value = (long long)UValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The darwin/x86 (and x86-64) assembler accepts and ignores ULL and LL
|
// The darwin/x86 (and x86-64) assembler accepts and ignores ULL and LL
|
||||||
|
@ -916,3 +916,7 @@ movq %mm5, %rbx // CHECK: movd %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb]
|
|||||||
|
|
||||||
rex64 // CHECK: rex64 # encoding: [0x48]
|
rex64 // CHECK: rex64 # encoding: [0x48]
|
||||||
data16 // CHECK: data16 # encoding: [0x66]
|
data16 // CHECK: data16 # encoding: [0x66]
|
||||||
|
|
||||||
|
// PR8855
|
||||||
|
movq 18446744073709551615,%rbx // CHECK: movq -1, %rbx
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user