@@ -152,7 +152,7 @@ class ARMDisassembler : public MCDisassembler {
152152 void AddThumb1SBit (MCInst &MI, bool InITBlock) const ;
153153 bool isVectorPredicable (const MCInst &MI) const ;
154154 DecodeStatus AddThumbPredicate (MCInst&) const ;
155- void UpdateThumbVFPPredicate (DecodeStatus &, MCInst& ) const ;
155+ void UpdateThumbPredicate (DecodeStatus &S , MCInst &MI ) const ;
156156
157157 llvm::endianness InstructionEndianness;
158158};
@@ -6278,13 +6278,12 @@ ARMDisassembler::AddThumbPredicate(MCInst &MI) const {
62786278 return S;
62796279}
62806280
6281- // Thumb VFP instructions are a special case. Because we share their
6282- // encodings between ARM and Thumb modes, and they are predicable in ARM
6281+ // Thumb VFP and some NEON instructions are a special case. Because we share
6282+ // their encodings between ARM and Thumb modes, and they are predicable in ARM
62836283// mode, the auto-generated decoder will give them an (incorrect)
62846284// predicate operand. We need to rewrite these operands based on the IT
62856285// context as a post-pass.
6286- void ARMDisassembler::UpdateThumbVFPPredicate (
6287- DecodeStatus &S, MCInst &MI) const {
6286+ void ARMDisassembler::UpdateThumbPredicate (DecodeStatus &S, MCInst &MI) const {
62886287 unsigned CC;
62896288 CC = ITBlock.getITCC ();
62906289 if (CC == 0xF )
@@ -6431,7 +6430,7 @@ DecodeStatus ARMDisassembler::getThumbInstruction(MCInst &MI, uint64_t &Size,
64316430 decodeInstruction (DecoderTableVFP32, MI, Insn32, Address, this , STI);
64326431 if (Result != MCDisassembler::Fail) {
64336432 Size = 4 ;
6434- UpdateThumbVFPPredicate (Result, MI);
6433+ UpdateThumbPredicate (Result, MI);
64356434 return Result;
64366435 }
64376436 }
@@ -6448,6 +6447,7 @@ DecodeStatus ARMDisassembler::getThumbInstruction(MCInst &MI, uint64_t &Size,
64486447 STI);
64496448 if (Result != MCDisassembler::Fail) {
64506449 Size = 4 ;
6450+ UpdateThumbPredicate (Result, MI);
64516451 return Result;
64526452 }
64536453 }
0 commit comments