Commit Graph

70 Commits

Author SHA1 Message Date
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
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
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
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
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
Ryan Kurtz
7fa3389119 GP-2974: Fixing warnings 2023-05-01 07:23:48 -04:00
emteere
02248d2251 GP-3077 Added constant tracking through stack for stack parameters, fixed issues with values getting crossed moving in and out of memory, added prototype param type creation, added setting for restricting parameters to know pointers to handle harvard architectures and pointertypedefs 2023-05-01 01:57:56 -04:00
ghidra1
b9202411b9 GP-1379/3022 FloatFormat and BigFloat refactor in support of string
parsing and 80-bit float format.  Change float datatype naming to use
number of bits instead of bytes.
2023-04-26 16:55:48 -04:00
Ryan Kurtz
3db2aff597 Merge remote-tracking branch
'origin/GP-2880_ghidorahrex_m68k_bcd_operand_fix--SQUASHED'
(Closes #4183, Closes #4189)
2023-04-25 06:44:51 -04:00
ghidorahrex
dd84e1a6e6 GP-2880: Fix issue with 68000 bcd instructions reversing operands 2023-04-24 13:11:05 -04:00
Edward J. Schwartz
9c7de2e69e Add coldfire halt instruction 2023-04-05 14:37:04 -04:00
Edward J. Schwartz
aa1e594519 Fix tas instruction for coldfire
Does not apply to modes 0 or 1
2023-04-05 14:14:15 -04:00
Ryan Kurtz
9cf60faef0 Merge remote-tracking branch
'origin/GP-3155_caheckman_PR-2810_Pokechu22_countleadingzeros'
(Closes #2810)
2023-03-24 14:29:30 -04:00
caheckman
945d91fc93 GP-3155 Regenerating parsers, documentation. LZCOUNT tests. 2023-03-24 13:06:45 -04:00
Ryan Kurtz
82ba4831b6 Merge remote-tracking branch
'origin/GP-3187_ghidorahrex_PR-5093_rbran_m68k_export_0_fix'
(Closes #5093, Closes #5094)
2023-03-16 12:11:31 -04:00
Ryan Kurtz
738e662e82 Merge remote-tracking branch
'origin/GP-2013_ghidorahrex_PR-4217_agatti_68000-shifts' (Closes #4217)
2023-03-14 09:57:26 -04:00
Rubens Brandão
30fc469235
Sleigh 68000 CPUs exports a length 0 value
A value with length 0 should be impossible, but also, all constructors from a table should export a value with the same length.
2023-03-13 10:42:57 -03:00
ghidorahrex
c4cf19ebfc GP-2013 Fixed additional issues with shifts and rotates 2023-03-03 17:14:41 +00:00
Pokechu22
14880b53c4 Create and use LZCOUNT Pcode op 2023-03-02 18:30:04 -08:00
ghidorahrex
1848c1a6f4 GP-2197: Fixed cspec metatype pentry ordering. 2022-12-05 15:29:40 +00:00
ghidorahrex
0e1e607317 GP-2197: Corrected COLDFIRE scalefactor consistency 2022-12-05 15:29:39 +00:00
ghidorahrex
f5b6973ea8 GP-2197 code review fixes 2022-12-05 15:29:38 +00:00
ghidorahrex
362bb9dfa3 GP-2197: Added additional EMACS instructions to coldfire 2022-12-05 15:29:37 +00:00
emteere
947bf43cb5 GP-2197 Adding initial EMAC instructions and .cspec changes for
D0,A0,D1,A1
2022-12-05 15:25:31 +00:00
emteere
ca5a6204c3 GP-2391 added evaluation of return address, allow thunking addresses to externals. Added new arem thunk pattern. 2022-10-11 18:25:09 -04:00
Ryan Kurtz
4ed60c8790 Merge remote-tracking branch 'origin/GP-2195_ghidorahrex_PR-4270_agatti_68000-coldfire-bitops' 2022-10-05 09:44:04 -04:00
Ryan Kurtz
79947c37f6 Merge remote-tracking branch
'origin/GP-2014_ghidorahrex_PR-4223_agatti_68000-pack-unpk'
(Closes #4223)
2022-09-16 13:31:35 -04:00
ghidorahrex
66c727bb38 GP-2014: review comments 2022-07-22 19:31:09 +00:00
Alessandro Gatti
01c24684a0 Switch back to pcode implementation. 2022-07-05 23:30:18 +02:00
Alessandro Gatti
b44355f367 Use pcodeops for bitrev and byterev. 2022-06-08 20:36:33 +02:00
ghidorahrex
f1be7a7e4e Modified coldfire TPF instructions to jumps 2022-06-07 13:37:26 +00:00
Alessandro Gatti
4ebeee777f Implement ColdFire's BITREV, BYTEREV and FF1. 2022-05-22 06:33:29 +02:00
Alessandro Gatti
43698e4a3a Correct operands order.
As per discussion on #4189, Tx[bw] and Ty[bw] need to be swapped.
2022-05-04 07:53:47 +02:00
Alessandro Gatti
63e615e793 Implement 68000 PACK and UNPK opcodes. 2022-05-03 04:19:03 +02:00
Alessandro Gatti
1c6b0140bc Update ASL/ASR/LSL/LSR/ROL/ROR/ROXL/ROXR behavior. 2022-05-02 04:12:49 +02:00
Jeff Muizelaar
f736bdc43f m68k: Fix fopmode for fmod
See fc7a6fc602/m68kdasm.c (L1772)
and 2e185fb65e/target/m68k/translate.c (L5255)
2022-04-05 11:28:20 -04:00
ghidra1
a6f7392736 Merge remote-tracking branch
'origin/GP-1644_ghidorahrex_m68000_addx_fix--SQUASHED' (Closes #3818)
2022-01-10 21:07:33 -05:00
ghidorahrex
51d84f8bc0 GP-1644: fixed semantics of 68000 addx flags 2022-01-07 12:54:24 -05:00
Alessandro Gatti
b6942c875c Implement CHK, CHK2, and CMP2 for 68k. 2021-11-09 22:25:23 +01:00
Ryan Kurtz
3a0ae8ee39 GP-849: Gradle 7 support 2021-05-12 13:45:16 -04:00
ghidra1
d377d90e14 Merge remote-tracking branch 'origin/patch'
Conflicts:
	Ghidra/Features/GraphServices/certification.manifest
2021-03-17 19:38:50 -04:00
ghidra1
162f203395 Updated certification headers 2021-03-17 18:22:50 -04:00
ghidra1
399dd9484f Merge remote-tracking branch
'origin/GP-758_ghidorahrex_PR-2651_miek_68000_byte_SP' (Closes #1709,
Closes #2651)
2021-03-10 12:58:12 -05:00
Mike Walters
4904a0e7b5 68000: fix disassembly of fmove with dynamic k-factor 2021-02-13 02:20:52 +00:00
Mike Walters
ad1c5d7819 68000: fix SP postincrement/predecrement with byte operands
When the address register is the stack pointer and the operand size is
byte, the address is incremented/decremented by two to keep the stack
pointer aligned to a word boundary.
[M68000 Family Programmer’s Reference Manual; 2.2.4 & 2.2.5]

fixes #1709
2021-01-15 19:24:45 +00:00
ghidra1
5890b88f56 Certification update 2020-12-30 09:44:29 -05:00
ghidra1
1c70e034b3 Merge branch 'GP-556_ghidra1_PR-1610_bstreiff_DWARF_m68k_SVR4' 2020-12-30 09:39:24 -05:00
Brandon Streiff
5d57628b7f 68000: add m68k/SVR4 DWARF register mappings 2020-03-08 11:18:12 -05:00