mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[ARM] Fix subtarget feature set truncation when using .cpu directive
This is a bug that was caused due to storing the feature bitset in a 32-bit variable when it is a 64-bit mask, discarding the top half of the feature set. llvm-svn: 228151
This commit is contained in:
parent
8107003a7b
commit
40791397a7
@ -9182,8 +9182,7 @@ bool ARMAsmParser::parseDirectiveCPU(SMLoc L) {
|
|||||||
// see: http://llvm.org/bugs/show_bug.cgi?id=20757
|
// see: http://llvm.org/bugs/show_bug.cgi?id=20757
|
||||||
STI.InitMCProcessorInfo(CPU, "");
|
STI.InitMCProcessorInfo(CPU, "");
|
||||||
STI.InitCPUSchedModel(CPU);
|
STI.InitCPUSchedModel(CPU);
|
||||||
unsigned FB = ComputeAvailableFeatures(STI.getFeatureBits());
|
setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
|
||||||
setAvailableFeatures(FB);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -11,3 +11,7 @@ dsb
|
|||||||
dsb
|
dsb
|
||||||
// CHECK-ERROR: error: Unknown CPU name
|
// CHECK-ERROR: error: Unknown CPU name
|
||||||
.cpu foobar
|
.cpu foobar
|
||||||
|
// CHECK: .cpu cortex-m3
|
||||||
|
.cpu cortex-m3
|
||||||
|
// CHECK: sub sp, #16
|
||||||
|
sub sp,#16
|
||||||
|
Loading…
Reference in New Issue
Block a user