diff options
author | David Brenken <david.brenken@efs-auto.de> | 2019-06-24 09:03:36 +0200 |
---|---|---|
committer | Bastian Koppelmann <kbastian@mail.uni-paderborn.de> | 2019-06-25 12:11:40 +0200 |
commit | 4e6fd2e3ad7b0c1c06902646dab53fb8088d89ec (patch) | |
tree | d600daf2fa4292fc96e9857e0f5a028f258741d4 /target/tricore/fpu_helper.c | |
parent | 1fa79fb02d85c8f2ba9f6f9cabaf1b3ab34b7bcd (diff) |
tricore: add UTOF instruction
Signed-off-by: Andreas Konopik <andreas.konopik@efs-auto.de>
Signed-off-by: David Brenken <david.brenken@efs-auto.de>
Signed-off-by: Georg Hofstetter <georg.hofstetter@efs-auto.de>
Signed-off-by: Robert Rasche <robert.rasche@efs-auto.de>
Signed-off-by: Lars Biermanski <lars.biermanski@efs-auto.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Message-Id: <20190624070339.4408-3-david.brenken@efs-auto.org>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Diffstat (limited to 'target/tricore/fpu_helper.c')
-rw-r--r-- | target/tricore/fpu_helper.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/tricore/fpu_helper.c b/target/tricore/fpu_helper.c index f079d9e939..432079c8e2 100644 --- a/target/tricore/fpu_helper.c +++ b/target/tricore/fpu_helper.c @@ -303,6 +303,22 @@ uint32_t helper_itof(CPUTriCoreState *env, uint32_t arg) return (uint32_t)f_result; } +uint32_t helper_utof(CPUTriCoreState *env, uint32_t arg) +{ + float32 f_result; + uint32_t flags; + + f_result = uint32_to_float32(arg, &env->fp_status); + + flags = f_get_excp_flags(env); + if (flags) { + f_update_psw_flags(env, flags); + } else { + env->FPU_FS = 0; + } + return (uint32_t)f_result; +} + uint32_t helper_ftoiz(CPUTriCoreState *env, uint32_t arg) { float32 f_arg = make_float32(arg); |