Commit Graph

1191 Commits

Author SHA1 Message Date
Rubens Brandao
64551b3cca Fix AARCH64 fcadd_rotate export len 2023-07-20 14:00:45 +00:00
ghidorahrex
f0f65b9ab1 GP-3642: Regression fix for 6x09 compare macro 2023-07-17 13:34:28 +00:00
ghidra1
c3cc2630f2 Merge remote-tracking branch
'origin/GP-3606_ghidorahrex_6x09_flags_and_stack_fixes' into patch
(Closes #5508)
2023-07-10 19:43:40 -04:00
ghidra1
9b5f8599dc Merge remote-tracking branch
'origin/GP-3621_ghidorahrex_6x09_leftshift_flag_fix' into patch (Closes
#5523)
2023-07-10 19:37:52 -04:00
ghidorahrex
8cd3a31afa GP-3621: Fixed 6x09 left-shift instruction flags 2023-07-10 14:29:37 +00:00
Ryan Kurtz
9bc71eace0 Merge remote-tracking branch
'origin/GP-3599_emteere_OneByteFunctionsAndPPC' into patch
(Closes #5441)
2023-07-06 11:01:10 -04:00
Ryan Kurtz
1c786c0849 Merge remote-tracking branch 'origin/GP-3582_emteere_ARM_AddtlBranchRetWaffleFix--SQUASHED' into patch 2023-07-06 10:58:24 -04:00
ghidra1
75fb5bf79b Merge remote-tracking branch 'origin/GP-0_ghidra1_x86compat32fix' into patch 2023-07-06 09:09:01 -04:00
emteere
5b393764c6 GP-3582 Fix arm Branch/Return waffle if correct function boundaries not created and LR is detected as a constant 2023-07-05 14:18:55 -04:00
ghidra1
784208dad8 GP-3610 Corrected NPE and GOT allocation issue which could prevent
import of object modules GOT PCREL relocations
2023-07-05 13:35:31 -04:00
ghidra1
ccad2abbd8 GP-0 revised x86-64 ldef entry for compat32 variant and change opinion
entries to give preference to default variant
2023-07-05 10:58:20 -04:00
ghidorahrex
17c571a393 GP-3606: Fixed 6x09 sub/cmp flags and 2-byte stack push/pop ordering 2023-07-03 18:14:45 +00:00
Dan
aa67e04592 GP-0: Fix x86 importers / tests. 2023-07-03 10:39:25 -04:00
emteere
b7ede746d0 GP-3599 Fix for function bodies including one byte of non-disassembled
data.  PowerPC disassembly from computed branch.
2023-06-30 22:42:47 +00:00
Ryan Kurtz
5759352c43 Merge remote-tracking branch 'origin/GP-3583_Dan_fixWoW64--SQUASHED' into patch 2023-06-29 06:31:32 -04:00
Dan
0c39626b73 GP-3583: Fix race in module arch detection. Set longMode bit. Add compat32 ldef. 2023-06-28 13:56:09 -04:00
Ryan Kurtz
d481a845fb Merge remote-tracking branch
'origin/GP-3525_ghidorahrex_6x09_leaxy_fix--SQUASHED' into patch
(Closes #5414)
2023-06-28 07:31:13 -04:00
ghidorahrex
52d4aaf285 GP-3525: Fixed 6x09 leax/leay instructions updating zero flag 2023-06-27 14:03:14 -04:00
Ryan Kurtz
d5559a477c Merge remote-tracking branch
'origin/GP-3524_ghidorahrex_arm_thumb_vdup_fix' into patch
(Closes #5420)
2023-06-21 12:52:06 -04:00
emteere
3736ae076c GP-3532 Minor 68000 function start pattern 2023-06-13 23:06:18 +00:00
ghidra1
5970699db1 Merge remote-tracking branch
'origin/GP-2955_ghidorahrex_PR-4795_Phlosioneer_m68k-pea-fix' into patch
(Closes #4795)
2023-06-12 20:19:58 -04:00
ghidra1
d5db5b643a Merge remote-tracking branch
'origin/GP-2779_ghidorahrex_PR-4808_Phlosioneer_m68k-movem-pc-fix' into
patch (Closes #4807, Closes #4808)
2023-06-12 20:17:06 -04:00
ghidra1
de6ff8440d Merge remote-tracking branch 'origin/GP-3478_ghidorahrex_aarch64_neon_mla_fix' into patch 2023-06-12 20:11:31 -04:00
ghidra1
6269f69c76 Merge remote-tracking branch
'origin/GP-2963_Ghidorahrex_PR-4838_c64cryptoboy_fix-6502-tsx' into
patch (Closes #4838)
2023-06-12 20:05:39 -04:00
ghidra1
de1071846a Merge remote-tracking branch
'origin/GP-3009_ghidorahrex_PR-4825_fenugrec_8048_allfixes' into patch
(Closes #2423, Closes #4825)
2023-06-12 19:59:41 -04:00
emteere
164ed51304 GP-3532 Reverted 68000 register calling convention change, added new
68000_register cspec.  Added function start patterns
2023-06-12 20:58:20 +00:00
emteere
ca697fcaaf GP-3009 Setting of context for correct disassembly in either bank. Set
Ports to volatile so they aren't simplified away in the decompiler.
2023-06-08 18:50:04 +00:00
ghidorahrex
7a145a75e4 GP-3524: Fixed ARM Thumb vdup instruction to use correct registers 2023-06-07 19:07:48 +00:00
Ryan Kurtz
bf3e3923e8 Merge remote-tracking branch 'origin/GP-3480_PPCSmallDataAreaPointer' into patch 2023-06-01 06:12:52 -04:00
Ryan Kurtz
e3429a57db Merge remote-tracking branch
'origin/GP-3102_ghidorahrex_x86-64_popf_pushf--SQUASHED' into patch
(Closes #4980)
2023-05-31 11:20:14 -04:00
Phlosioneer
058fa90387 Issue 4807 Fix movem PC instruction bug on 68000
The `movem` instruction's `(d16, PC)` addressing mode has an instruction
word, a mask word, and then an extension word. The addressing mode
uses the value of PC incremented to the extension word, in this case
`instr_start + 4`. The sleigh code incorrectly uses `instr_start + 2`.
The issue is present for both `movem.w` and `movem.l` variants. This
PR fixes the `PC` offset to `+4`.

See 68000 reference manual page 2-13 for PC indirect addressing mode,
and 4-128 for MOVEM documentation.

Partially addresses #4807.
2023-05-31 14:31:37 +00:00
ghidorahrex
af40b28931 GP-3102: Fixed disasm of default 64-bit addrsize instructions 2023-05-31 10:13:41 -04:00
ghidorahrex
70a50dfcc2 GP-3478: Fixed registers in aarch64 neon mla instruction 2023-05-31 14:08:47 +00:00
David Youd
2d497a0d5c fix to TSX instruction 2023-05-31 13:14:48 +00:00
fenugrec
2b05e1f5f2 8048 : improve display of JBx opcode
instead of e.g. "JB0x5", they will render as "JB5".
2023-05-31 12:34:24 +00:00
fenugrec
bb08f67417 8048: fix JMPP @A extra dereference
JMPP was doing two indirections : one in PData and then one again in
AddrInd, where there should only be one.

MCS-48 docs :

> The contents of the Program Memory location addressed by the
Accumulator
is used as the new page offset of the Program Counter.

i.e.
(PC 0 – 7) <- ((A))

Previous implementation caused disasm / decompiler errors such as
"Low-level Error: Could not find op at target address"

refs:
https://github.com/NationalSecurityAgency/ghidra/discussions/4818
2023-05-31 12:34:23 +00:00
fenugrec
97b0984426 8048: support > 4kB address space
MCS-48 just barely supports 12 bits of program counter space (4kB), but
many real-world applications use software banking to expand this,
e.g. via IO pins driving extra address lines to the external ROM.

This patch allows up to 16-bit addresses. To use this feature, simply
select the special instruction (typically ORL Pp or ANL Pp) and set a
manual Fallthrough address to the correct bank.
2023-05-31 12:34:22 +00:00
fenugrec
3fbf16b056 8048: make DBF a context register
See GH #2423

The SEL MB0/MB1 opcodes set a DBF register but this had no effect, therefore JMP and CALL
destinations didn't take into account DBF.
This is essentially @esaulenka 's patch from
3756e1bcee

but separated from the DFB->DBF typo change, and sets the width of the new
context register to be 1 bit (doesn't need to be 2 bits)

This greatly improves analysis. The only downside is that to manually
override DBF on a single instruction, it needs to be cleared first, then
disassembled again after setting the desired DBF.
2023-05-31 12:34:21 +00:00
fenugrec
7c2b8ca27d 8048: typo in "DFB" register name , should be DBF
MCS-48 Assembly language manual #9800255D :
'
DBF designate memory bank flip-flop
'
2023-05-31 12:34:20 +00:00
fenugrec
5ea567f65b 8048: fix movp, movp3, jmpp
the correct syntax for [x,y] bitranges has y= # number of bits. These
three instructions affect the lower 8 bits of PC, not 7.

From MCS-48 docs:
'
MOVP A,@A
(PC: 0-7)<-(A)
(A)<-((PC))

Move data in program memory location addressed by A into A. Program
counter is restored.
'

There is similar wording for MOVP3 and JMPP.

Fixes #4810 on GH
2023-05-31 12:34:19 +00:00
Phlosioneer
b1c54e36e1 Fix pea SP instruction bug on 68000 processor
The `pea` instruction adjusts `SP`, but the address may be `SP`-based.
Ghidra was evaluating the effective address after adjusting `SP`, but
the address should be evaluated before `SP` is changed. For example,
`pea (SP)` should result in a pointer to the previous stack entry,
rather than a pointer to itself.
2023-05-30 16:49:29 +00:00
caheckman
ce520cc940 GP-3480 Mark PPC r13 as unaffected 2023-05-24 14:35:59 -04:00
ghidra1
584260ca81 GP-3472 Added __stdcall convention alias for 64-bit Windows cspecs 2023-05-23 15:34:35 -04:00
Ryan Kurtz
0cae3ab0f5 Merge remote-tracking branch
'origin/GP-3325_ghidorahrex_PR-4886_Ninja3047_fix-ppc-stmvsprw' into
patch (Closes #4886)
2023-05-18 11:02:54 -04:00
Ryan Kurtz
f8ebb729ef Merge remote-tracking branch
'origin/GP-3432_ghidorahrex_PR-4887_Ninja3047_ppc_vle_eieio' into patch
(Closes #4887)
2023-05-18 10:58:25 -04:00
ghidra1
4b7188c3e4 Merge remote-tracking branch
'origin/GP-3398_ghidorahrex_PR-1723_saruman9_fix_call_with_segment_reg'
into Ghidra_10.3 (Closes #1715, Closes #1723)
2023-05-08 14:54:47 -04:00
ghidra1
d8d5817d7e Merge remote-tracking branch
'origin/GP-3326_ghidorahrex_PR-5194_edmcman_coldfire_halt_decode' into
Ghidra_10.3 (Closes #5194)
2023-05-08 14:19:12 -04:00
ghidra1
ff8f0d7782 Merge remote-tracking branch
'origin/GP-3341_ghidorahrex_ppc_branch_link_fix' into Ghidra_10.3
(Closes #5218)
2023-05-08 14:16:50 -04:00
William Tan
9c694ebfd1
move around mbar/eieio 2023-05-05 11:13:03 -04:00
William Tan
eebdca2668
move mbar from a2 to ppc_embedded, remove duplicate eieio 2023-05-05 11:13:03 -04:00