Skip to content
Snippets Groups Projects
Commit 772b3eb4 authored by Matheus Tavares Bernardino's avatar Matheus Tavares Bernardino Committed by Taylor Simpson
Browse files

Hexagon (gen_tcg_funcs.py): avoid duplicated tcg code on A_CVI_NEW


Hexagon instructions with the A_CVI_NEW attribute produce a vector value
that can be used in the same packet. The python function responsible for
generating code for such instructions has a typo ("if" instead of
"elif"), which makes genptr_dst_write_ext() be executed twice, thus also
generating the same tcg code twice. Fortunately, this doesn't cause any
problems for correctness, but it is less efficient than it could be. Fix
it by using an "elif" and avoiding the unnecessary extra code gen.

Signed-off-by: default avatarMatheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: default avatarTaylor Simpson <tsimpson@quicinc.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: default avatarTaylor Simpson <tsimpson@quicinc.com>
Message-Id: <fa706b192b2a3a0ffbd399fa8dbf0d5b2c5b82d9.1664568492.git.quic_mathbern@quicinc.com>
parent 661ad999
No related branches found
No related tags found
No related merge requests found
......@@ -548,7 +548,7 @@ def genptr_dst_write_opn(f,regtype, regid, tag):
if (hex_common.is_hvx_reg(regtype)):
if (hex_common.is_new_result(tag)):
genptr_dst_write_ext(f, tag, regtype, regid, "EXT_NEW")
if (hex_common.is_tmp_result(tag)):
elif (hex_common.is_tmp_result(tag)):
genptr_dst_write_ext(f, tag, regtype, regid, "EXT_TMP")
else:
genptr_dst_write_ext(f, tag, regtype, regid, "EXT_DFL")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment