[PATCH] [AArch64] Fix problems in handling generic MSR/MRS instructions

Petr Pavlu petr.pavlu at arm.com
Mon Jan 26 03:29:31 PST 2015


This change fixes the following problems:
1) Decoding to MSRpstate should occur only if <op1><op2> represents a valid <pstatefield>, else the instruction should be decoded to a generic MSR.
2) AsmParser should not produce a MSR/MRS MCInst that can encode to a same bitpattern as another system instruction.

Unfortunately, it seems it is currently not possible to fix these problems cleanly at the TableGen level. The patch works around it by ugly rewriting MCInsts in Disassembler and AsmParser.

http://reviews.llvm.org/D7174

Files:
  lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
  test/MC/AArch64/arm64-system-encoding.s
  test/MC/AArch64/basic-a64-instructions.s
  test/MC/Disassembler/AArch64/basic-a64-instructions.txt

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7174.18747.patch
Type: text/x-patch
Size: 11768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150126/a72dac5c/attachment.bin>


More information about the llvm-commits mailing list