mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
ARM: correct toggling behaviour
This was a thinko. The intent was to flip the explicit bits that need toggling rather than all bits. This would result in incorrect behaviour (which now is tested). Thanks to Nico Weber for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
78e8d52a58
commit
70d641fbec
2 files changed
+14
-8
No files matched your search
@@ -9580,14 +9580,12 @@ bool ARMAsmParser::parseDirectiveArchExtension(SMLoc L) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ToggleFeatures = EnableFeature
|
||||
? (~STI.getFeatureBits() & Extension.Features)
|
||||
: ( STI.getFeatureBits() & Extension.Features);
|
||||
if (ToggleFeatures) {
|
||||
unsigned Features =
|
||||
ComputeAvailableFeatures(STI.ToggleFeature(Extension.Features));
|
||||
setAvailableFeatures(Features);
|
||||
}
|
||||
unsigned ToggleFeatures = EnableFeature
|
||||
? (~STI.getFeatureBits() & Extension.Features)
|
||||
: ( STI.getFeatureBits() & Extension.Features);
|
||||
unsigned Features =
|
||||
ComputeAvailableFeatures(STI.ToggleFeature(ToggleFeatures));
|
||||
setAvailableFeatures(Features);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
@ RUN: llvm-mc -triple armv7-eabi -mattr hwdiv -filetype asm -o /dev/null %s
|
||||
|
||||
.syntax unified
|
||||
.thumb
|
||||
|
||||
udiv r0, r1, r2
|
||||
.arch_extension idiv
|
||||
udiv r0, r1, r2
|
||||
Reference in new issue
Block a user