From 624d0f94d7eaa178f59b1a2103c57310b77ec2ec Mon Sep 17 00:00:00 2001 From: Alexey Esaulenko Date: Thu, 1 Oct 2020 19:04:16 +0300 Subject: [PATCH] Infineon Tricore: simplify st.t instruction --- Ghidra/Processors/tricore/data/languages/tricore.sinc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Ghidra/Processors/tricore/data/languages/tricore.sinc b/Ghidra/Processors/tricore/data/languages/tricore.sinc index ef92070238..263af2819b 100644 --- a/Ghidra/Processors/tricore/data/languages/tricore.sinc +++ b/Ghidra/Processors/tricore/data/languages/tricore.sinc @@ -7972,8 +7972,10 @@ macro multiply_u_u(mres0, rega, regb, n) { # ST.T off18, bpos3, b (ABSB) :st.t off18,const0810Z,const1111Z is PCPMode=0 & ( const0810Z & const1111Z & op0007=0xd5 ; op2627=0x0 ) & off18 { - local tmp:4 = *[ram]:1 off18; - tmp = (tmp & ~(1 << const0810Z)) | (const1111Z << const0810Z); + local tmp:1 = *[ram]:1 off18; + ternary(tmp, const1111Z, + tmp | (1 << const0810Z), + tmp & ~(1 << const0810Z)); *[ram]:1 off18 = tmp; }