HomePhabricator

[ARM] Unify handling of M-Class system registers

Description

[ARM] Unify handling of M-Class system registers

This patch cleans up and fixes issues in the M-Class system register handling:

  1. It defines the system registers and the encoding (SYSm values) in one place: a new ARMSystemRegister.td using SearchableTable, thereby removing the hand-coded values which existed in multiple places.
  1. Some system registers e.g. BASEPRI_MAX_NS which do not exist were being allowed! Ref: ARMv6/7/8M architecture reference manual.

Reviewed by: @t.p.northover, @olist01, @john.brawn
Differential Revision: https://reviews.llvm.org/D35209