On Sat, Mar 29, 2014 at 2:09 AM, Peter Maydell <peter.maydell@xxxxxxxxxx> wrote: > Because unallocated encodings generate different exception syndrome > information from traps due to FP being disabled, we can't do a single > "is fp access disabled" check at a high level in the decode tree. > To help in catching bugs where the access check was forgotten in some > code path, we set this flag when the access check is done, and assert > that it is set at the point where we actually touch the FP regs. > > This requires us to pass the DisasContext to the vec_reg_offset > and fp_reg_offset functions. > > Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx> > --- > target-arm/translate-a64.c | 74 +++++++++++++++++++++++++++++++--------------- > target-arm/translate.h | 8 +++++ > 2 files changed, 58 insertions(+), 24 deletions(-) > > diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c > index 2f67af3..b7cf907 100644 > --- a/target-arm/translate-a64.c > +++ b/target-arm/translate-a64.c > @@ -353,11 +353,29 @@ static TCGv_i64 read_cpu_reg_sp(DisasContext *s, int reg, int sf) > return v; > } > > +/* We should have at some point before trying to access an FP register > + * done the necessary access check, so assert that (a) we did the check > + * and (b) we didn't then just plough ahead anyway if it failed. Might as well do the listing of "(a) foo" and "(b) bar" on new lines for readability. > + *.Print the instruction pattern in the abort message so we can figure Extraneous "." Otherwise, Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xxxxxxxxxx> > + * out what we need to fix if a user encounters this problem in the wild. > + */ _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm