mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Chris's constant data sequence refactoring actually enabled printing
vectors of all one bits to be printed more cleverly in the AsmPrinter. Unfortunately, the byte value for all one bits is the same with -fsigned-char as the error return of '-1'. Force this to be the unsigned byte value when returning it to avoid this problem, and update the test case for the shiny new behavior. Yay for building LLVM and Clang with -funsigned-char. Chris, please review, and let me know if there is any reason to not desire this change. It seems good on the surface, and certainly intended based on the code written. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
893a045cdb
commit
beb05952ce
@ -1558,7 +1558,7 @@ static int isRepeatedByteSequence(const ConstantDataSequential *V) {
|
||||
char C = Data[0];
|
||||
for (unsigned i = 1, e = Data.size(); i != e; ++i)
|
||||
if (Data[i] != C) return -1;
|
||||
return C;
|
||||
return static_cast<uint8_t>(C); // Ensure 255 is not returned as -1.
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,10 +8,7 @@
|
||||
; RAGreedy defeats the test by splitting live ranges.
|
||||
|
||||
; Constant pool all-ones vector:
|
||||
; CHECK: .long 4294967295
|
||||
; CHECK-NEXT: .long 4294967295
|
||||
; CHECK-NEXT: .long 4294967295
|
||||
; CHECK-NEXT: .long 4294967295
|
||||
; CHECK: .space 16,255
|
||||
|
||||
; No pcmpeqd instructions, everybody uses the constant pool.
|
||||
; CHECK: program_1:
|
||||
|
Loading…
Reference in New Issue
Block a user