2015-08-21 07:04:50 +00:00
|
|
|
/*
|
|
|
|
* FPU op helpers
|
|
|
|
*
|
|
|
|
* Copyright (c) 2003-2005 Fabrice Bellard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2018-02-19 05:52:39 +00:00
|
|
|
#include "qemu/osdep.h"
|
2015-08-21 07:04:50 +00:00
|
|
|
#include "cpu.h"
|
2018-02-26 00:12:34 +00:00
|
|
|
#include "exec/exec-all.h"
|
2015-08-21 07:04:50 +00:00
|
|
|
#include "exec/helper-proto.h"
|
2018-03-08 14:54:21 +00:00
|
|
|
#include "fpu/softfloat.h"
|
2015-08-21 07:04:50 +00:00
|
|
|
|
|
|
|
#define QT0 (env->qt0)
|
|
|
|
#define QT1 (env->qt1)
|
|
|
|
|
2018-02-26 00:12:34 +00:00
|
|
|
static target_ulong do_check_ieee_exceptions(CPUSPARCState *env, uintptr_t ra)
|
2015-08-21 07:04:50 +00:00
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong status = get_float_exception_flags(&env->fp_status);
|
|
|
|
target_ulong fsr = env->fsr;
|
|
|
|
|
|
|
|
if (unlikely(status)) {
|
|
|
|
/* Keep exception flags clear for next time. */
|
|
|
|
set_float_exception_flags(0, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
|
|
|
|
/* Copy IEEE 754 flags into FSR */
|
|
|
|
if (status & float_flag_invalid) {
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= FSR_NVC;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
if (status & float_flag_overflow) {
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= FSR_OFC;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
if (status & float_flag_underflow) {
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= FSR_UFC;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
if (status & float_flag_divbyzero) {
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= FSR_DZC;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
if (status & float_flag_inexact) {
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= FSR_NXC;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
2018-02-25 23:40:53 +00:00
|
|
|
if ((fsr & FSR_CEXC_MASK) & ((fsr & FSR_TEM_MASK) >> 23)) {
|
2019-06-12 16:11:48 +00:00
|
|
|
CPUState *cs = env_cpu(env);
|
2018-02-26 00:12:34 +00:00
|
|
|
|
2018-02-25 23:40:53 +00:00
|
|
|
/* Unmasked exception, generate a trap. Note that while
|
|
|
|
the helper is marked as NO_WG, we can get away with
|
|
|
|
writing to cpu state along the exception path, since
|
|
|
|
TCG generated code will never see the write. */
|
|
|
|
env->fsr = fsr | FSR_FTT_IEEE_EXCP;
|
2018-02-26 00:12:34 +00:00
|
|
|
cs->exception_index = TT_FP_EXCP;
|
|
|
|
cpu_loop_exit_restore(cs, ra);
|
2015-08-21 07:04:50 +00:00
|
|
|
} else {
|
|
|
|
/* Accumulate exceptions */
|
2018-03-12 16:38:17 +00:00
|
|
|
fsr |= (fsr & FSR_CEXC_MASK) << 5;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
}
|
2018-03-12 16:38:17 +00:00
|
|
|
|
2018-02-25 23:40:53 +00:00
|
|
|
return fsr;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
2018-02-26 00:12:34 +00:00
|
|
|
target_ulong helper_check_ieee_exceptions(CPUSPARCState *env)
|
|
|
|
{
|
|
|
|
return do_check_ieee_exceptions(env, GETPC());
|
|
|
|
}
|
|
|
|
|
2015-08-21 07:04:50 +00:00
|
|
|
#define F_HELPER(name, p) void helper_f##name##p(CPUSPARCState *env)
|
|
|
|
|
|
|
|
#define F_BINOP(name) \
|
|
|
|
float32 helper_f ## name ## s (CPUSPARCState *env, float32 src1, \
|
|
|
|
float32 src2) \
|
|
|
|
{ \
|
2018-02-25 23:40:53 +00:00
|
|
|
return float32_ ## name (src1, src2, &env->fp_status); \
|
2015-08-21 07:04:50 +00:00
|
|
|
} \
|
|
|
|
float64 helper_f ## name ## d (CPUSPARCState * env, float64 src1,\
|
|
|
|
float64 src2) \
|
|
|
|
{ \
|
2018-02-25 23:40:53 +00:00
|
|
|
return float64_ ## name (src1, src2, &env->fp_status); \
|
2015-08-21 07:04:50 +00:00
|
|
|
} \
|
|
|
|
F_HELPER(name, q) \
|
|
|
|
{ \
|
|
|
|
QT0 = float128_ ## name (QT0, QT1, &env->fp_status); \
|
|
|
|
}
|
|
|
|
|
|
|
|
F_BINOP(add);
|
|
|
|
F_BINOP(sub);
|
|
|
|
F_BINOP(mul);
|
|
|
|
F_BINOP(div);
|
|
|
|
#undef F_BINOP
|
|
|
|
|
|
|
|
float64 helper_fsmuld(CPUSPARCState *env, float32 src1, float32 src2)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float64_mul(float32_to_float64(src1, &env->fp_status),
|
|
|
|
float32_to_float64(src2, &env->fp_status),
|
|
|
|
&env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fdmulq(CPUSPARCState *env, float64 src1, float64 src2)
|
|
|
|
{
|
|
|
|
QT0 = float128_mul(float64_to_float128(src1, &env->fp_status),
|
|
|
|
float64_to_float128(src2, &env->fp_status),
|
|
|
|
&env->fp_status);
|
|
|
|
}
|
|
|
|
|
|
|
|
float32 helper_fnegs(float32 src)
|
|
|
|
{
|
|
|
|
return float32_chs(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef TARGET_SPARC64
|
|
|
|
float64 helper_fnegd(float64 src)
|
|
|
|
{
|
|
|
|
return float64_chs(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
F_HELPER(neg, q)
|
|
|
|
{
|
|
|
|
QT0 = float128_chs(QT1);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Integer to float conversion. */
|
|
|
|
float32 helper_fitos(CPUSPARCState *env, int32_t src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return int32_to_float32(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float64 helper_fitod(CPUSPARCState *env, int32_t src)
|
|
|
|
{
|
|
|
|
return int32_to_float64(src, &env->fp_status);
|
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fitoq(CPUSPARCState *env, int32_t src)
|
|
|
|
{
|
|
|
|
QT0 = int32_to_float128(src, &env->fp_status);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef TARGET_SPARC64
|
|
|
|
float32 helper_fxtos(CPUSPARCState *env, int64_t src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return int64_to_float32(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float64 helper_fxtod(CPUSPARCState *env, int64_t src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return int64_to_float64(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fxtoq(CPUSPARCState *env, int64_t src)
|
|
|
|
{
|
|
|
|
QT0 = int64_to_float128(src, &env->fp_status);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#undef F_HELPER
|
|
|
|
|
|
|
|
/* floating point conversion */
|
|
|
|
float32 helper_fdtos(CPUSPARCState *env, float64 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float64_to_float32(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float64 helper_fstod(CPUSPARCState *env, float32 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float32_to_float64(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float32 helper_fqtos(CPUSPARCState *env)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float128_to_float32(QT1, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fstoq(CPUSPARCState *env, float32 src)
|
|
|
|
{
|
|
|
|
QT0 = float32_to_float128(src, &env->fp_status);
|
|
|
|
}
|
|
|
|
|
|
|
|
float64 helper_fqtod(CPUSPARCState *env)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float128_to_float64(QT1, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fdtoq(CPUSPARCState *env, float64 src)
|
|
|
|
{
|
|
|
|
QT0 = float64_to_float128(src, &env->fp_status);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Float to integer conversion. */
|
|
|
|
int32_t helper_fstoi(CPUSPARCState *env, float32 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float32_to_int32_round_to_zero(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int32_t helper_fdtoi(CPUSPARCState *env, float64 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float64_to_int32_round_to_zero(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int32_t helper_fqtoi(CPUSPARCState *env)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float128_to_int32_round_to_zero(QT1, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef TARGET_SPARC64
|
|
|
|
int64_t helper_fstox(CPUSPARCState *env, float32 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float32_to_int64_round_to_zero(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int64_t helper_fdtox(CPUSPARCState *env, float64 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float64_to_int64_round_to_zero(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int64_t helper_fqtox(CPUSPARCState *env)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float128_to_int64_round_to_zero(QT1, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
float32 helper_fabss(float32 src)
|
|
|
|
{
|
|
|
|
return float32_abs(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef TARGET_SPARC64
|
|
|
|
float64 helper_fabsd(float64 src)
|
|
|
|
{
|
|
|
|
return float64_abs(src);
|
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fabsq(CPUSPARCState *env)
|
|
|
|
{
|
|
|
|
QT0 = float128_abs(QT1);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
float32 helper_fsqrts(CPUSPARCState *env, float32 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float32_sqrt(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float64 helper_fsqrtd(CPUSPARCState *env, float64 src)
|
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
return float64_sqrt(src, &env->fp_status);
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void helper_fsqrtq(CPUSPARCState *env)
|
|
|
|
{
|
|
|
|
QT0 = float128_sqrt(QT1, &env->fp_status);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define GEN_FCMP(name, size, reg1, reg2, FS, E) \
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong glue(helper_, name) (CPUSPARCState *env) \
|
2015-08-21 07:04:50 +00:00
|
|
|
{ \
|
2020-05-21 22:08:49 +00:00
|
|
|
FloatRelation ret; \
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong fsr; \
|
2015-08-21 07:04:50 +00:00
|
|
|
if (E) { \
|
|
|
|
ret = glue(size, _compare)(reg1, reg2, &env->fp_status); \
|
|
|
|
} else { \
|
|
|
|
ret = glue(size, _compare_quiet)(reg1, reg2, \
|
|
|
|
&env->fp_status); \
|
|
|
|
} \
|
2018-02-26 00:12:34 +00:00
|
|
|
fsr = do_check_ieee_exceptions(env, GETPC()); \
|
2015-08-21 07:04:50 +00:00
|
|
|
switch (ret) { \
|
|
|
|
case float_relation_unordered: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= (FSR_FCC1 | FSR_FCC0) << FS; \
|
|
|
|
fsr |= FSR_NVA; \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
case float_relation_less: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr &= ~(FSR_FCC1) << FS; \
|
|
|
|
fsr |= FSR_FCC0 << FS; \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
case float_relation_greater: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr &= ~(FSR_FCC0) << FS; \
|
|
|
|
fsr |= FSR_FCC1 << FS; \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
default: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr &= ~((FSR_FCC1 | FSR_FCC0) << FS); \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
} \
|
2018-02-25 23:40:53 +00:00
|
|
|
return fsr; \
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
#define GEN_FCMP_T(name, size, FS, E) \
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong glue(helper_, name)(CPUSPARCState *env, size src1, size src2)\
|
2015-08-21 07:04:50 +00:00
|
|
|
{ \
|
2020-05-21 22:08:49 +00:00
|
|
|
FloatRelation ret; \
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong fsr; \
|
2015-08-21 07:04:50 +00:00
|
|
|
if (E) { \
|
|
|
|
ret = glue(size, _compare)(src1, src2, &env->fp_status); \
|
|
|
|
} else { \
|
|
|
|
ret = glue(size, _compare_quiet)(src1, src2, \
|
|
|
|
&env->fp_status); \
|
|
|
|
} \
|
2018-02-26 00:12:34 +00:00
|
|
|
fsr = do_check_ieee_exceptions(env, GETPC()); \
|
2015-08-21 07:04:50 +00:00
|
|
|
switch (ret) { \
|
|
|
|
case float_relation_unordered: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr |= (FSR_FCC1 | FSR_FCC0) << FS; \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
case float_relation_less: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr &= ~(FSR_FCC1 << FS); \
|
|
|
|
fsr |= FSR_FCC0 << FS; \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
case float_relation_greater: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr &= ~(FSR_FCC0 << FS); \
|
|
|
|
fsr |= FSR_FCC1 << FS; \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
default: \
|
2018-02-25 23:40:53 +00:00
|
|
|
fsr &= ~((FSR_FCC1 | FSR_FCC0) << FS); \
|
2015-08-21 07:04:50 +00:00
|
|
|
break; \
|
|
|
|
} \
|
2018-02-25 23:40:53 +00:00
|
|
|
return fsr; \
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmps, float32, 0, 0);
|
|
|
|
GEN_FCMP_T(fcmpd, float64, 0, 0);
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmpes, float32, 0, 1);
|
|
|
|
GEN_FCMP_T(fcmped, float64, 0, 1);
|
|
|
|
|
|
|
|
GEN_FCMP(fcmpq, float128, QT0, QT1, 0, 0);
|
|
|
|
GEN_FCMP(fcmpeq, float128, QT0, QT1, 0, 1);
|
|
|
|
|
|
|
|
#ifdef TARGET_SPARC64
|
|
|
|
GEN_FCMP_T(fcmps_fcc1, float32, 22, 0);
|
|
|
|
GEN_FCMP_T(fcmpd_fcc1, float64, 22, 0);
|
|
|
|
GEN_FCMP(fcmpq_fcc1, float128, QT0, QT1, 22, 0);
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmps_fcc2, float32, 24, 0);
|
|
|
|
GEN_FCMP_T(fcmpd_fcc2, float64, 24, 0);
|
|
|
|
GEN_FCMP(fcmpq_fcc2, float128, QT0, QT1, 24, 0);
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmps_fcc3, float32, 26, 0);
|
|
|
|
GEN_FCMP_T(fcmpd_fcc3, float64, 26, 0);
|
|
|
|
GEN_FCMP(fcmpq_fcc3, float128, QT0, QT1, 26, 0);
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmpes_fcc1, float32, 22, 1);
|
|
|
|
GEN_FCMP_T(fcmped_fcc1, float64, 22, 1);
|
|
|
|
GEN_FCMP(fcmpeq_fcc1, float128, QT0, QT1, 22, 1);
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmpes_fcc2, float32, 24, 1);
|
|
|
|
GEN_FCMP_T(fcmped_fcc2, float64, 24, 1);
|
|
|
|
GEN_FCMP(fcmpeq_fcc2, float128, QT0, QT1, 24, 1);
|
|
|
|
|
|
|
|
GEN_FCMP_T(fcmpes_fcc3, float32, 26, 1);
|
|
|
|
GEN_FCMP_T(fcmped_fcc3, float64, 26, 1);
|
|
|
|
GEN_FCMP(fcmpeq_fcc3, float128, QT0, QT1, 26, 1);
|
|
|
|
#endif
|
|
|
|
#undef GEN_FCMP_T
|
|
|
|
#undef GEN_FCMP
|
|
|
|
|
2018-02-25 23:40:53 +00:00
|
|
|
static void set_fsr(CPUSPARCState *env, target_ulong fsr)
|
2015-08-21 07:04:50 +00:00
|
|
|
{
|
|
|
|
int rnd_mode;
|
|
|
|
|
2018-02-25 23:40:53 +00:00
|
|
|
switch (fsr & FSR_RD_MASK) {
|
2015-08-21 07:04:50 +00:00
|
|
|
case FSR_RD_NEAREST:
|
|
|
|
rnd_mode = float_round_nearest_even;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
case FSR_RD_ZERO:
|
|
|
|
rnd_mode = float_round_to_zero;
|
|
|
|
break;
|
|
|
|
case FSR_RD_POS:
|
|
|
|
rnd_mode = float_round_up;
|
|
|
|
break;
|
|
|
|
case FSR_RD_NEG:
|
|
|
|
rnd_mode = float_round_down;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
set_float_rounding_mode(rnd_mode, &env->fp_status);
|
|
|
|
}
|
|
|
|
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong helper_ldfsr(CPUSPARCState *env, target_ulong old_fsr,
|
|
|
|
uint32_t new_fsr)
|
2015-08-21 07:04:50 +00:00
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
old_fsr = (new_fsr & FSR_LDFSR_MASK) | (old_fsr & FSR_LDFSR_OLDMASK);
|
|
|
|
set_fsr(env, old_fsr);
|
|
|
|
return old_fsr;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef TARGET_SPARC64
|
2018-02-25 23:40:53 +00:00
|
|
|
target_ulong helper_ldxfsr(CPUSPARCState *env, target_ulong old_fsr,
|
|
|
|
uint64_t new_fsr)
|
2015-08-21 07:04:50 +00:00
|
|
|
{
|
2018-02-25 23:40:53 +00:00
|
|
|
old_fsr = (new_fsr & FSR_LDXFSR_MASK) | (old_fsr & FSR_LDXFSR_OLDMASK);
|
|
|
|
set_fsr(env, old_fsr);
|
|
|
|
return old_fsr;
|
2015-08-21 07:04:50 +00:00
|
|
|
}
|
|
|
|
#endif
|