This is an archive of the discontinued LLVM Phabricator instance.

[ARM]Decoding MSR with unpredictable destination register causes an assert
ClosedPublic

Authored by simpal01 on Feb 16 2018, 1:57 AM.

Details

Summary

This patch handling:

  1. Enable parsing of raw encodings of system registers .
  2. Allows UNPREDICTABLE sysregs to be decoded to a raw number in the same way that disasslib does, rather than llvm crashing.
  3. Disassemble msr/mrs with unpredictable sysregs as SoftFail.
  4. Fix regression due to SoftFailing some encodings.

Patch by Chris Ryder

Diff Detail

Repository
rL LLVM

Event Timeline

simpal01 created this revision.Feb 16 2018, 1:57 AM
simpal01 edited the summary of this revision. (Show Details)Feb 16 2018, 1:59 AM

Hi Simi,

Could you re-upload this with more context (git diff -U999999)?

simpal01 updated this revision to Diff 134580.Feb 16 2018, 2:26 AM

Reuploaded the diff with more context

javed.absar added inline comments.Feb 16 2018, 5:26 AM
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
4247 ↗(On Diff #134580)

Shouldn't this be 0xFF as that's what you checked one line up?

simpal01 updated this revision to Diff 136700.Mar 2 2018, 2:13 AM

@javed.absar Thanks Javed. I have made the changes according to your comments.

ChangeLog:

  • Changed 0xFFF to 0xFF
javed.absar accepted this revision.Mar 5 2018, 1:20 AM
This revision is now accepted and ready to land.Mar 5 2018, 1:20 AM
This revision was automatically updated to reflect the committed changes.
simpal01 marked an inline comment as done.