From 71479ebd553c408285326c53deb15aa3bb7c541b Mon Sep 17 00:00:00 2001 From: billow Date: Mon, 3 Jun 2024 04:52:47 +0800 Subject: [PATCH] tricore : add fp emulateme test --- librz/arch/isa/tricore/tricore_il_fp.inc | 2 +- test/db/rzil/tricore | 30 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/librz/arch/isa/tricore/tricore_il_fp.inc b/librz/arch/isa/tricore/tricore_il_fp.inc index 693cd26c16d..a60a0d45aab 100644 --- a/librz/arch/isa/tricore/tricore_il_fp.inc +++ b/librz/arch/isa/tricore/tricore_il_fp.inc @@ -497,7 +497,7 @@ static RzAnalysisLiftedILOp div_f(RzAsmTriCoreContext *ctx) { SETL("_fb", _32F64(VARG(R(2)))), SETL("_arg_a", denorm_to_zere64(VARL("_fa"))), SETL("_arg_b", denorm_to_zere64(VARL("_fb"))), - SETL("_precise_result", FDIV(0, _32F64(VARL("_arg_a")), _32F64(VARL("_arg_b")))), + SETL("_precise_result", FDIV(0, VARL("_arg_a"), VARL("_arg_b"))), SETL("_normal_result", denorm_to_zere64(VARL("_precise_result"))), SETL("_rounded_result", FCAST32(FCONVERT, RZ_FLOAT_IEEE754_BIN_32, VARL("_normal_result"), PSW_RM())), SETL("_result", diff --git a/test/db/rzil/tricore b/test/db/rzil/tricore index a87f7d50842..40ea2914874 100644 --- a/test/db/rzil/tricore +++ b/test/db/rzil/tricore @@ -15,3 +15,33 @@ FCX = 0x1 Hello from RzIL! EOF RUN + +NAME=Testing the decryption in emulateme +FILE=bins/tricore/emulateme-fp.tricore.elf +TIMEOUT=30 +CMDS=<