2151 Commits
Author SHA1 Message Date
Ryan Kurtz ddf878a631 Merge remote-tracking branch
'origin/GP-7217_ghidorahrex_PR-9581_shmuelfomberg_vmread_vmwrite_fix'
into Ghidra_12.2 (Closes #9581)
2026-10-07 12:48:39 -04:00
Ryan Kurtz 417e91c683 Merge remote-tracking branch 'origin/GP-7313_ghidorahrex_AARCH64_exclusive_or_fix--SQUASHED' into Ghidra_12.2 2026-10-07 12:46:11 -04:00
Ryan Kurtz bece70ae40 Merge remote-tracking branch 'origin/GP-2336_ghidorahrex_xsaveopt_prefix_fix' into Ghidra_12.2 2026-10-07 12:42:04 -04:00
Ryan Kurtz dc1e375e1f Merge remote-tracking branch
'origin/GP-7279_ghidorahrex_PR-9637_hochwasser_x86_mov_sreg_fix' into
Ghidra_12.2 (Closes #9635, Closes #9637)
2026-10-07 12:39:11 -04:00
ghidorahrex 51bd4207a0 GP-7313: Corrected several AARCH64 NEON exclusive-OR and rotate operations. 2026-10-07 10:47:34 -04:00
Ryan Kurtz 4cd0644f1e GP-7264: Improved parsing of Code_attribute 2026-10-06 08:15:44 -04:00
ghidorahrex e932b6b495 GP-2336: Added missing NP to xsave/restore instructions 2026-09-15 08:47:16 -04:00
hochwasser 2957746367 Swap segment and register in mov instruction
GP-7018 introduced a regression by swapping the segment and register in a mov instruction.
2026-09-14 13:26:50 -04:00
ghidra1 b374d71ef1 Merge remote-tracking branch 'origin/patch' into Ghidra_12.2 2026-09-10 19:10:58 -04:00
ghidra1 dbec68725c GP-7267 Minor revision to Hexagon pcode 2026-09-10 19:02:19 -04:00
Shawn Hoffman 91c767284d hexagon: swap vmin/vmax/shuffo/vaddw operand display to match LLVM
Same class of bug as the earlier min/minu fix: the displayed source
operand order contradicts the instruction syntax recorded in each
constructor's own doc comment (and LLVM/the PRM).

  vminb/vminh/vminub/vminuh/vminuw/vminw, vmaxb/vmaxh/vmaxub/vmaxuh/
  vmaxuw/vmaxw and shuffob/shuffoh are documented as "f ( Rtt32 , Rss32 )"
  but displayed Rss before Rtt.
  vaddw and vaddw:sat are documented as "vaddw ( Rss32 , Rtt32 )" but
  displayed Rtt before Rss.

Includes the V62 "Rdd32,Pe4 = vminub ( Rtt32 , Rss32 )" form.

The pcodeop / inline arguments are swapped to match, so the emitted call
argument order still follows the displayed operand order. For the min,
max and add forms this is semantically neutral (all commutative); it
matters for vminubPred, whose result is defined relative to the first
operand, and for the opaque shuffob/shuffoh, whose operand roles are
positional.

Verified: SleighCompile clean, all 60 Hexagon unit tests pass. No test
expectations change (the one test pinning vminub uses R1R0 for both
sources).
2026-09-10 16:54:28 -04:00
Shawn Hoffman daf46c9777 Hexagon: expand tests for shift edge cases and recent fixes 2026-09-10 16:54:25 -04:00
Shawn Hoffman 55f425223b hexagon: drop stale TODOs that no longer apply 2026-09-10 16:54:23 -04:00
Shawn Hoffman ce95d4edb3 hexagon_float: build sfmake/dfmake from bit pattern per V73 2026-09-10 16:54:20 -04:00
Shawn Hoffman 0345ff83cf hexagon: refresh comments to reflect current support
Records the decode coverage this branch adds (V66 ZReg matrix extension
and V81 valign4, both decode-only stubs) and narrows the shift-amount
KNOWN ISSUE to what is actually fixed: register-form shifts now model
the 7-bit signed shift amount, other forms may still assume positive.
2026-09-10 16:54:18 -04:00
Shawn Hoffman d29b9c718f hexagon: model sxt7 shift amount in register-form shifts 2026-09-10 16:54:15 -04:00
Shawn Hoffman 0402ed5476 hexagon: drop redundant togglebit shift-count guard 2026-09-10 16:54:13 -04:00
Shawn Hoffman 9d4c191a46 Hexagon: add stub- and packet-coverage regression-pin tests
Two new JUnit tests pin the disassembly text emitted for representative
encodings of the recently added decoder stubs (HexagonStubCoverageTest)
and packet-context decoding (HexagonPacketCoverageTest), so a future edit
that accidentally drops or shadows a constructor will surface as a
deliberate review point rather than a silent regression.
2026-09-10 16:54:10 -04:00
Shawn Hoffman 671add87ab hexagon_hvx: add V81 valign4 stub
Adds a decode-only stub for V6_valign4.

The six veqhf/veqsf qfloat-accumulating predicate forms that originally
accompanied this are not added: upstream's hexagon_hvx2.sinc implements
all of them with real p-code.
2026-09-10 16:54:08 -04:00
Shawn Hoffman 42ea4784b2 hexagon_hvx: tighten vassign bit constraints
Replace the open-ended op21/op1617 patterns on the existing vassign and
Vsf/Vhf-from-qf32/qf16 constructors with the full op2123/op1620 fields,
matching the LLVM encodings exactly so neighbouring stubs don't decode
ambiguously.
2026-09-10 16:54:05 -04:00
Shawn Hoffman 8215297c83 hexagon: add V68 memw_aq decode-only stub
Acquire-load form L2_loadw_aq from V68; same iclass/op2127 family as the
existing memw_phys constructor but distinguished by op0513=0x40.
2026-09-10 13:55:39 -04:00
Shawn Hoffman 0740f82ce4 hexagon: swap min/minu operand display to match LLVM
LLVM prints min as "min(Rt, Rs)" not "min(Rs, Rt)".  Reorder the
display tokens for the four scalar/pair min and minu constructors;
pcode already evaluates min(rt, rs).
2026-09-10 13:55:37 -04:00
Shawn Hoffman 51685f00ff hexagon: drop spurious Rd5 from ictagw match list
ictagw has no destination register; Rd5 was listed in the constructor's
operand expression but never used.  Remove it so the constructor only
binds the operands it actually consumes.
2026-09-10 13:55:34 -04:00
Shawn Hoffman 80c5e9d07f hexagon: fix M2_mpyu_*_s1 typo squaring Rs instead of Rs*Rt
Both the plain and accumulating M2_mpyu :<<1 forms had zext(Rs)*zext(Rs).
Multiply by Rt as the encoding intends.
2026-09-10 13:55:32 -04:00
Shawn Hoffman b8bcbac047 hexagon: prefix !cmp.eq/gt/gtu rather than suffix
LLVM disassembles the negated cmp constructors as "!cmp.eq Pd, Rs, Rt"
not "cmp.eq! Pd, Rs, Rt".  Quote the bang into the head token so the
display matches; pcode is unchanged.
2026-09-10 13:55:29 -04:00
Shawn Hoffman ed3cbae4aa hexagon: fix rol pcode to compute true rotate
The rol* constructors were emitting (rs << N) | zext(rs s< 0) which only
folds the sign bit into bit 0 instead of rotating the high bits back into
the low.  Use the standard (x << N) | (x >> (W - N)) pattern so the
single-shot, accumulating, and bitwise variants all match the ISA.
2026-09-10 13:55:27 -04:00
Shmuel Fomberg 83743d9c45 Refactor VMREAD and VMWRITE definitions in ia.sinc
not use opsize at all is a better solution
2026-09-08 08:24:02 -04:00
Shmuel Fomberg ed4f2ef6ae Add support for VMREAD and VMWRITE in long mode with opsize=1
as documentation, in vmwrite/vmread, in 64 bit long mode, the parameters are always 64 bit. with 0x48 prefix or without the prefix. 
see: https://www.felixcloutier.com/x86/vmwrite
2026-09-08 08:24:00 -04:00
Ryan Kurtz 6045e130b7 Merge remote-tracking branch 'origin/GP-5976_Dan_jitConstFolding--SQUASHED' 2026-09-03 05:12:02 -04:00
Dan 9d186a3e30 GP-5976: Implement constant folding and other optimizations in JIT emulator. 2026-09-02 18:36:58 +00:00
Ryan Kurtz d1b43934aa Merge remote-tracking branch 'origin/patch' 2026-09-01 11:21:45 -04:00
Ryan Kurtz 5b6ef3a5cc Merge remote-tracking branch 'origin/GP-6698_ghidorahrex_superh_shift_mask--SQUASHED' into patch 2026-09-01 11:19:01 -04:00
ghidorahrex 3f16b10680 GP-6698: Fixed SuperH shift instruction bit masking 2026-09-01 10:04:51 -04:00
Ryan Kurtz f0774b72f2 Merge remote-tracking branch 'origin/GP-7167_caheckman_HighPtrPossible'
(Closes #9359)
2026-09-01 05:06:24 -04:00
Ryan Kurtz b7cbb8522f Merge remote-tracking branch 'origin/patch' 2026-08-31 13:30:09 -04:00
Ryan Kurtz 7940485949 Merge remote-tracking branch
'origin/GP-7027_ghidorahrex_x86_zext_upper_32_fix--SQUASHED' into patch
(Closes #9325)
2026-08-31 13:24:43 -04:00
ghidorahrex 1735e73f4e GP-7027: Fixed issue with x86 64 not zeroing out 32-bit partial regs 2026-08-31 13:02:20 -04:00
Ryan Kurtz 680e2b103a Merge remote-tracking branch
'origin/GP-7041_ghidorahrex_PR-9345_crbednarz_nds32-fmul-fdiv-match-fix'
into patch (Closes #9345)
2026-08-31 11:29:30 -04:00
Ryan Kurtz 9cfd36f755 Merge remote-tracking branch
'origin/GP-6951_ghidorahrex_PR-9082_liamwhite_sleigh-aarch64-extendreg-s'
into patch (Closes #9042, Closes #9082, Closes #9515)
2026-08-31 11:24:14 -04:00
caheckman f17a0b5719 GP-7167 highPtrPossible in ActionConstantPtr 2026-08-27 22:47:51 +00:00
ghidra1 c655b76d91 Merge remote-tracking branch 'origin/patch' 2026-08-27 18:11:56 -04:00
ghidra1 b7937a39d5 GP-7110 Additional Hexagon fixes 2026-08-27 17:59:27 -04:00
ghidra1 6845af53ff GP-1 Cleanup Hexagon file syntax 2026-08-27 13:29:45 -04:00
Ryan Kurtz 44342048e5 Merge remote-tracking branch 'origin/GP-9_caheckman_ReturnStructGcc' 2026-08-26 04:50:13 -04:00
Ryan Kurtz b5ff768527 Merge remote-tracking branch 'origin/patch' 2026-08-26 04:46:55 -04:00
ghidra1 ce276c838a GP-7110 Rework of Hexagon module, includes dont-care-bit fixes plus
added missing instructions
2026-08-25 16:32:29 -04:00
caheckman 47c7b910a5 All models return structures via input pointer 2026-08-24 18:59:00 +00:00
Ryan Kurtz b33536d0ba Merge remote-tracking branch 'origin/patch' 2026-08-19 13:01:08 -04:00
Ryan Kurtz 1e641d0c6e Merge remote-tracking branch
'origin/GP-7052_ghidorahrex_PR-6553_Sleigh-InSPECtor_x86_pcrel_addr32'
into patch (Closes #6553)
2026-08-19 12:56:22 -04:00
Ryan Kurtz a47562f359 Merge remote-tracking branch 'origin/patch' 2026-08-12 08:58:18 -04:00