Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-7267 Minor revision to Hexagon pcode

ghidra1dbec68725c30
diff --git a/Ghidra/Processors/Hexagon/data/languages/hexagon.sinc b/Ghidra/Processors/Hexagon/data/languages/hexagon.sinc
index 2977629dbd..525f324584 100755
--- a/Ghidra/Processors/Hexagon/data/languages/hexagon.sinc
+++ b/Ghidra/Processors/Hexagon/data/languages/hexagon.sinc
@@ -11694,8 +11694,11 @@ define pcodeop memw_phys;
# |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|
# 1 0 0 1 0 0 1 0 0 0 0 s s s s s P P 0 0 1 0 0 0 0 0 0 d d d d d
-:memw_aq Rd5,rs5 EndPacket is iclass=9 & op2127=0x10 & op0513=0x40 & Rd5 & rs5 & $(END_PACKET)
-unimpl
+define pcodeop memw_aq;
+
+:memw_aq Rd5,rs5 EndPacket is iclass=9 & op2127=0x10 & op0513=0x40 & Rd5 & rs5 & $(END_PACKET) {
+ Rd5 = memw_aq(rs5);
+}
# (v2,13) min -- "Rd32 = min ( Rt32 , Rs32 )"
# _________________________________________________________________________________________________
diff --git a/Ghidra/Processors/Hexagon/data/languages/hexagon_hvx.sinc b/Ghidra/Processors/Hexagon/data/languages/hexagon_hvx.sinc
index 35a3daf4a8..b2ba6592a3 100644
--- a/Ghidra/Processors/Hexagon/data/languages/hexagon_hvx.sinc
+++ b/Ghidra/Processors/Hexagon/data/languages/hexagon_hvx.sinc
@@ -1,9 +1,7 @@
# Qualcomm Hexagon HVX Instruction Set
# NOTES:
-# - HVX implementation has been updated through V79
-# - Decode additionally covers the V66 ZReg matrix family (vrmpyz / vr8mpyz / vr16mpyz
-# and the z-register loads) plus V81 valign4, as decode-only stubs (unimpl pcode).
+# - HVX implementation has been updated through V81
# - HVX hardware supports either 64-byte or 128-byte vector lengths. See hexagon.slaspec for
# default length of 128-bytes.
@@ -6884,5 +6882,8 @@ define pcodeop scatter_release;
# |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|
# 0 0 0 1 1 0 0 0 0 0 0 z z t t t P P 0 u u u u u 1 0 1 d d d d d
-:valign4 Vd5,Vu_0812,Vz_1923,rt1618 EndPacket is iclass=0x1 & op2427=0x8 & op2123=0x0 & op13=0x0 & op0507=0x5 & Vd5 & Vu_0812 & Vz_1923 & rt1618 & $(END_PACKET) unimpl
+define pcodeop valign4;
+:valign4 Vd5,Vu_0812,Vz_1923,rt1618 EndPacket is iclass=0x1 & op2427=0x8 & op2123=0x0 & op13=0x0 & op0507=0x5 & Vd5 & Vu_0812 & Vz_1923 & rt1618 & $(END_PACKET) {
+ Vd5 = valign4(Vu_0812,Vz_1923,rt1618);
+}