On Thu, Apr 16, 2015 at 12:51 PM, Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 27 March 2015 at 19:10, Greg Bellows <greg.bell...@linaro.org> wrote: > > Updated the various helper routines to set the target EL as needed. > > > > Signed-off-by: Greg Bellows <greg.bell...@linaro.org> > > --- > > target-arm/op_helper.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c > > index 72a973a..aa175b5 100644 > > --- a/target-arm/op_helper.c > > +++ b/target-arm/op_helper.c > > @@ -306,6 +306,7 @@ void HELPER(access_check_cp_reg)(CPUARMState *env, > void *rip, uint32_t syndrome) > > if (arm_feature(env, ARM_FEATURE_XSCALE) && ri->cp < 14 > > && extract32(env->cp15.c15_cpar, ri->cp, 1) == 0) { > > env->exception.syndrome = syndrome; > > + env->exception.target_el = MAX(arm_current_el(env), 1); > > Again, I don't think we should have all these MAX()es. > Added a dedicated function for determining the exception el. Note this is different than the one needed in translate as they take different input criteria. I can create a common core function with two wrappers, but that seems excessive. > > -- PMM >