+2016-04-20 Matthew Wahab <matthew.wahab@arm.com>
+
+ * config/tc-aarch64.c (aarch64_features): Add "ras".
+ * doc/c-aarch64.texi (AArch64 Extensions): Add "ras".
+ * testsuite/gas/aarch64/armv8-ras-1.d: New.
+ * testsuite/gas/aarch64/armv8-ras-1.s: New.
+ * testsuite/gas/aarch64/illegal-ras-1.d: New.
+ * testsuite/gas/aarch64/illegal-ras-1.s: New.
+
2016-04-19 Andrew Burgess <andrew.burgess@embecosm.com>
* testsuite/gas/arc/nps400-6.d: New file.
{"simd", AARCH64_FEATURE (AARCH64_FEATURE_SIMD, 0)},
{"pan", AARCH64_FEATURE (AARCH64_FEATURE_PAN, 0)},
{"lor", AARCH64_FEATURE (AARCH64_FEATURE_LOR, 0)},
+ {"ras", AARCH64_FEATURE (AARCH64_FEATURE_RAS, 0)},
{"rdma", AARCH64_FEATURE (AARCH64_FEATURE_SIMD
| AARCH64_FEATURE_RDMA, 0)},
{"fp16", AARCH64_FEATURE (AARCH64_FEATURE_F16
@tab Enable Privileged Access Never support.
@item @code{profile} @tab ARMv8.2-A @tab No
@tab Enable statistical profiling extensions.
+@item @code{ras} @tab ARMv8-A @tab ARMv8.2-A or later
+ @tab Enable the Reliability, Availability and Serviceability
+ extension.
@item @code{rdma} @tab ARMv8-A @tab ARMv8.1-A or later
@tab Enable ARMv8.1 Advanced SIMD extensions. This implies @code{simd}.
@item @code{simd} @tab ARMv8-A @tab ARMv8-A or later
--- /dev/null
+#as: -march=armv8-a+ras
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+[^:]+: d503221f esb
+[^:]+: d503221f esb
+[^:]+: d5385305 mrs x5, erridr_el1
+[^:]+: d5185327 msr errselr_el1, x7
+[^:]+: d5385327 mrs x7, errselr_el1
+[^:]+: d5385405 mrs x5, erxfr_el1
+[^:]+: d5185425 msr erxctlr_el1, x5
+[^:]+: d5385425 mrs x5, erxctlr_el1
+[^:]+: d5185445 msr erxstatus_el1, x5
+[^:]+: d5385445 mrs x5, erxstatus_el1
+[^:]+: d5185465 msr erxaddr_el1, x5
+[^:]+: d5385465 mrs x5, erxaddr_el1
+[^:]+: d5185505 msr erxmisc0_el1, x5
+[^:]+: d5385505 mrs x5, erxmisc0_el1
+[^:]+: d5185525 msr erxmisc1_el1, x5
+[^:]+: d5385525 mrs x5, erxmisc1_el1
+[^:]+: d53c5265 mrs x5, vsesr_el2
+[^:]+: d518c125 msr disr_el1, x5
+[^:]+: d538c125 mrs x5, disr_el1
+[^:]+: d53cc125 mrs x5, vdisr_el2
+[^:]+: d503221f esb
+[^:]+: d503221f esb
+[^:]+: d5385305 mrs x5, erridr_el1
+[^:]+: d5185327 msr errselr_el1, x7
+[^:]+: d5385327 mrs x7, errselr_el1
+[^:]+: d5385405 mrs x5, erxfr_el1
+[^:]+: d5185425 msr erxctlr_el1, x5
+[^:]+: d5385425 mrs x5, erxctlr_el1
+[^:]+: d5185445 msr erxstatus_el1, x5
+[^:]+: d5385445 mrs x5, erxstatus_el1
+[^:]+: d5185465 msr erxaddr_el1, x5
+[^:]+: d5385465 mrs x5, erxaddr_el1
+[^:]+: d5185505 msr erxmisc0_el1, x5
+[^:]+: d5385505 mrs x5, erxmisc0_el1
+[^:]+: d5185525 msr erxmisc1_el1, x5
+[^:]+: d5385525 mrs x5, erxmisc1_el1
+[^:]+: d53c5265 mrs x5, vsesr_el2
+[^:]+: d518c125 msr disr_el1, x5
+[^:]+: d538c125 mrs x5, disr_el1
+[^:]+: d53cc125 mrs x5, vdisr_el2
+[^:]+: d503221f esb
+[^:]+: d503221f esb
+[^:]+: d5385305 mrs x5, erridr_el1
+[^:]+: d5185327 msr errselr_el1, x7
+[^:]+: d5385327 mrs x7, errselr_el1
+[^:]+: d5385405 mrs x5, erxfr_el1
+[^:]+: d5185425 msr erxctlr_el1, x5
+[^:]+: d5385425 mrs x5, erxctlr_el1
+[^:]+: d5185445 msr erxstatus_el1, x5
+[^:]+: d5385445 mrs x5, erxstatus_el1
+[^:]+: d5185465 msr erxaddr_el1, x5
+[^:]+: d5385465 mrs x5, erxaddr_el1
+[^:]+: d5185505 msr erxmisc0_el1, x5
+[^:]+: d5385505 mrs x5, erxmisc0_el1
+[^:]+: d5185525 msr erxmisc1_el1, x5
+[^:]+: d5385525 mrs x5, erxmisc1_el1
+[^:]+: d53c5265 mrs x5, vsesr_el2
+[^:]+: d518c125 msr disr_el1, x5
+[^:]+: d538c125 mrs x5, disr_el1
+[^:]+: d53cc125 mrs x5, vdisr_el2
--- /dev/null
+ /* ARMv8 RAS Extension. */
+ .text
+
+ .macro rw_sys_reg sys_reg xreg r w
+ .ifc \w, 1
+ msr \sys_reg, \xreg
+ .endif
+ .ifc \r, 1
+ mrs \xreg, \sys_reg
+ .endif
+ .endm
+
+ /* ARMv8-A. */
+ .arch armv8-a+ras
+ esb
+ hint #0x10
+
+ rw_sys_reg sys_reg=erridr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=errselr_el1 xreg=x7 r=1 w=1
+
+ rw_sys_reg sys_reg=erxfr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=erxctlr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxstatus_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxaddr_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=erxmisc0_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxmisc1_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=vsesr_el2 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=disr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=vdisr_el2 xreg=x5 r=1 w=0
+
+ /* ARMv8.1-A. */
+
+ .arch armv8.1-a+ras
+ esb
+ hint #0x10
+
+ rw_sys_reg sys_reg=erridr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=errselr_el1 xreg=x7 r=1 w=1
+
+ rw_sys_reg sys_reg=erxfr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=erxctlr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxstatus_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxaddr_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=erxmisc0_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxmisc1_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=vsesr_el2 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=disr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=vdisr_el2 xreg=x5 r=1 w=0
+
+ /* ARMv8.2-A. */
+
+ .arch armv8.2-a+ras
+ esb
+ hint #0x10
+
+ rw_sys_reg sys_reg=erridr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=errselr_el1 xreg=x7 r=1 w=1
+
+ rw_sys_reg sys_reg=erxfr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=erxctlr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxstatus_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxaddr_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=erxmisc0_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxmisc1_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=vsesr_el2 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=disr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=vdisr_el2 xreg=x5 r=1 w=0
--- /dev/null
+#name: Illegal RAS instruction use.
+#source: illegal-ras-1.s
+#as: -march=armv8-a -mno-verbose-error
+#error-output: illegal-ras-1.l
--- /dev/null
+[^:]+: Assembler messages:
+^[^:]+:[0-9]+: Error: selected processor does not support `esb'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erridr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'errselr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'errselr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxfr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxctlr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxctlr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxstatus_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxstatus_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxaddr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxaddr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc0_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc0_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc1_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc1_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'vsesr_el2'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'disr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'disr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'vdisr_el2'
+^[^:]+:[0-9]+: Error: selected processor does not support `esb'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erridr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'errselr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'errselr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxfr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxctlr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxctlr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxstatus_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxstatus_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxaddr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxaddr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc0_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc0_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc1_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'erxmisc1_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'vsesr_el2'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'disr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'disr_el1'
+^[^:]+:[0-9]+: Error: selected processor does not support system register name 'vdisr_el2'
--- /dev/null
+ /* Incorrect use of the RAS extension instructions. */
+ .text
+
+ .macro rw_sys_reg sys_reg xreg r w
+ .ifc \w, 1
+ msr \sys_reg, \xreg
+ .endif
+ .ifc \r, 1
+ mrs \xreg, \sys_reg
+ .endif
+ .endm
+
+ /* ARMv8-A. */
+ .arch armv8-a
+ esb
+ hint #0x10
+
+ rw_sys_reg sys_reg=erridr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=errselr_el1 xreg=x7 r=1 w=1
+
+ rw_sys_reg sys_reg=erxfr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=erxctlr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxstatus_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxaddr_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=erxmisc0_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxmisc1_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=vsesr_el2 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=disr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=vdisr_el2 xreg=x5 r=1 w=0
+
+ /* ARMv8.1-A. */
+
+ .arch armv8.1-a
+ esb
+ hint #0x10
+
+ rw_sys_reg sys_reg=erridr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=errselr_el1 xreg=x7 r=1 w=1
+
+ rw_sys_reg sys_reg=erxfr_el1 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=erxctlr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxstatus_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxaddr_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=erxmisc0_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=erxmisc1_el1 xreg=x5 r=1 w=1
+
+ rw_sys_reg sys_reg=vsesr_el2 xreg=x5 r=1 w=0
+ rw_sys_reg sys_reg=disr_el1 xreg=x5 r=1 w=1
+ rw_sys_reg sys_reg=vdisr_el2 xreg=x5 r=1 w=0