On 4/11/22 09:18, Peter Maydell wrote:
+      ESB        ---- 0011 0010 0000 1111 ---- 0001 0000
+    ]

Why don't we decode bits [11:8] here? I see it's the same
as YIELD/WFE/WFI, but I'm not sure why we're not decoding
those bits in those insns either...

See page F4-7074 in H.a, where bits [11:8] of the imm12 field are described 
with 'xxxx'.

+static bool trans_ESB(DisasContext *s, arg_ESB *a)
+{
+    if (dc_isar_feature(aa32_ras, s) &&
+        arm_dc_feature(s, ARM_FEATURE_EL2) &&
+        s->current_el <= 1) {

This is doing the right thing for M-profile but only rather
indirectly because it happens to get caught by the FEATURE_EL2
check.

Yes, I had though that a feature, reducing the number of checks, but...


I think it would be safer to explicitly check for
not-M-profile (which then gives you a place to put the
"For M-profile minimal-RAS ESB can be a NOP" comment that got
removed above).

... fair enough.

I think a comment noting that without RAS we must NOP would
be useful here.

Ok.


r~

Reply via email to