op_helper.c (e1b5a5ed6f817515e9328561ad0230f8a7af440a) op_helper.c (f49b3537cb28b98284f6ce893ef7240a3cacded3)
1/*
2 * Helpers for HPPA instructions.
3 *
4 * Copyright (c) 2016 Richard Henderson <rth@twiddle.net>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 600 unchanged lines hidden (view full) ---

609 /* ??? On second reading this condition simply seems
610 to be undefined rather than a diagnosed trap. */
611 if (nsm & ~psw & PSW_Q) {
612 dynexcp(env, EXCP_ILL, GETPC());
613 }
614 env->psw = (psw & ~PSW_SM) | (nsm & PSW_SM);
615 return psw & PSW_SM;
616}
1/*
2 * Helpers for HPPA instructions.
3 *
4 * Copyright (c) 2016 Richard Henderson <rth@twiddle.net>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 600 unchanged lines hidden (view full) ---

609 /* ??? On second reading this condition simply seems
610 to be undefined rather than a diagnosed trap. */
611 if (nsm & ~psw & PSW_Q) {
612 dynexcp(env, EXCP_ILL, GETPC());
613 }
614 env->psw = (psw & ~PSW_SM) | (nsm & PSW_SM);
615 return psw & PSW_SM;
616}
617
618void HELPER(rfi)(CPUHPPAState *env)
619{
620 /* ??? On second reading this condition simply seems
621 to be undefined rather than a diagnosed trap. */
622 if (env->psw & (PSW_I | PSW_R | PSW_Q)) {
623 helper_excp(env, EXCP_ILL);
624 }
625 env->iaoq_f = env->cr[CR_IIAOQ];
626 env->iaoq_b = env->cr_back[1];
627 cpu_hppa_put_psw(env, env->cr[CR_IPSW]);
628}
629
630void HELPER(rfi_r)(CPUHPPAState *env)
631{
632 env->gr[1] = env->shadow[0];
633 env->gr[8] = env->shadow[1];
634 env->gr[9] = env->shadow[2];
635 env->gr[16] = env->shadow[3];
636 env->gr[17] = env->shadow[4];
637 env->gr[24] = env->shadow[5];
638 env->gr[25] = env->shadow[6];
639 helper_rfi(env);
640}
617#endif
641#endif