Commit graph

237 commits

Author SHA1 Message Date
Benjamin Levy
74fae2f644 Merge branch 'master' of
https://github.com/NationalSecurityAgency/ghidra into spell
2020-01-29 11:37:23 -05:00
ghidorahrex
498abf1a31 Merge remote-tracking branch 'origin/GT-3420_ghidorahrex_arm_thumb_rsb'
Fixes #1365
2020-01-27 07:20:35 -05:00
ghidorahrex
5ff5426ffc Merge remote-tracking branch 'origin/GT-3408_ghidorahrex_arm_thumb_it_al_condition' 2020-01-27 07:17:57 -05:00
Benjamin Levy
a5efecea84 Fix spelling errors 2020-01-26 22:39:18 -05:00
mumbel
dce6e9f6a8 Cleaning up warnings and errors, mostly looking for:
temporary is written but not read in constructor
2020-01-22 19:51:45 -06:00
ghidorahrex
f92528923d GT-3408: Corrected IT conditionals 2019-12-20 11:32:48 -05:00
ghidorahrex
7aa51fb572 GT-3420: Corrected RSB width modifier 2019-12-20 08:45:25 -05:00
ghidorahrex
d47317a9f8 GT-3408: Included support of 'al' for IT instructions, generalized
support for IT instructions and included the 'nv' condition although it
should never occur.
2019-12-18 14:41:05 -05:00
ghidra1
8fbdec4eca Merge remote-tracking branch 'origin/patch' 2019-12-18 11:02:47 -05:00
emteere
67d774fa42 GT-3374_emteere several bugs and inneficiencies causing analysis to fail
for programs with debug info
2019-12-16 16:52:15 -05:00
ghidorahrex
d30ba7c9b1 GT-3393 ARM parameter list spaces
Corrected ARM subconstructors for spacing around register paramter
lists.
2019-12-13 09:35:08 -05:00
Ryan Kurtz
30140d88c7 Merge remote-tracking branch 'origin/GT-3368_ghidorahrex_PR-1277_lioncash_mul' 2019-12-04 13:58:08 -05:00
Lioncash
9a5769979c ARM: Handle disassembly of VNMLA for F16/F32/F64
These Sleigh constructors were acting as constructors for VNMLS, however
the constructors actually describe the bit encoding for VNMLA, which can
result in incorrect disassembly meaning.

This corrects this so that VNMLA instructions are properly disassembled
and also don't show up as generic CDP instructions.
2019-11-24 05:25:15 -05:00
Lioncash
644f3c3449 ARM: Handle disassembly of conditional VNMLS for F32/F64
Similarly with VNMUL, VNMLS is also able to execute with a condition
code for single-precision and double-precision floating point variants.

Like with the previous change, we can also amend the Sleigh constructor
so that it decodes properly (the condition code for a predictable
instruction is 0xE, not 0xF).

This fixes VNMLS instructions disassembling as generic CDP instructions,
making disassembly clearer.
2019-11-24 03:01:22 -05:00
Lioncash
9670b81458 ARM: Handle disassembly of conditional VNMUL for F32/F64
The single-precision and double-precision variants of VNMUL support
condition codes on them in ARM mode. We can amend the Sleigh
constructors to reflect this.

We can also amend the half-precision variant to reflect that the
condition code should be 0xE in terms of value. The ARMv8 architecture
reference manual states (at F6.1.148) that if a half-precision
instruction is present and does not have a condition code of 1110, then
the behavior is considered CONSTRAINED UNPREDICTABLE.

This fixes VNMUL instructions disassembling as generic CDP instructions,
making the disassembly much clearer.
2019-11-24 03:00:48 -05:00
Lioncash
520f1c47d9 ARM: Correct Sleigh constructor for VCVT{R}<c>.S32.F32
Bits 23-27 are defined with a bit encoding of 0b11101, not 0b11011 (See
section F6.1.60 within the ARMv8 reference manual or section A8.8.306
within the ARMv7 reference manual).

This makes conversions from floating-point registers to signed values
disassemble/decompile more properly and not as generic CDP instructions,
making decompilation a little more informative.
2019-11-24 02:23:06 -05:00
Ryan Kurtz
e3b8a782ba Merge remote-tracking branch 'origin/GT-3239_ryanmkurtz_PR-916_redfast00_privilaged_typo_fix' 2019-10-16 08:28:39 -04:00
ghidra1
349ef0fad2 GT-3149 Corrected bitfield packing for ARM/AARCH64 for Windows PE.
Imposed default Thumb context setting for PE and MSCoff ARM32 imports
with addition of v8T ARM variant.  Corrected ARM pattern alignment
issues.  Corrected DBViewer long value rendering.
2019-09-13 14:06:56 -04:00
ghizard
0ba928a33f GT-2880 changes pre-certification 2019-09-05 18:35:33 -04:00
ghizard
525f0057c8 GT-2880 Adding more unaffected/killed 2019-09-05 18:27:18 -04:00
ghizard
651971c493 GT-2880 More changes to ARM processor files 2019-09-05 18:27:17 -04:00
ghizard
6628bd3069 GT-2880 Initial 32-bit support 2019-09-05 18:27:16 -04:00
redfast00
12d25906a5
Fix typo 2019-08-17 12:58:36 +02:00
Ryan Kurtz
bb8f35f94d Merge remote-tracking branch 'origin/GT-3027_ghidorahrex_PR_philpem_ARM_TEQP_instruction' 2019-07-23 08:28:55 -04:00
Ryan Kurtz
eba358f1d2 Merge remote-tracking branch 'origin/GT-3018_ghidorahrex_PR-800_mumbel_ARM_vmov_thumb_instruction' 2019-07-19 12:19:49 -04:00
mumbel
5521906393 vmov instruction was using wrong varaible to allow for THUMB
and ARM resulting in the wrong register being attached/selected.

The U bit was also flipped `unsigned = (U == '1');`
unsigned now has bit set and signed is unset
2019-07-17 17:28:53 -05:00
ghidra1
a7345527c9 BitFields - added preliminary support for composite bitfields 2019-07-17 11:55:29 -04:00
ghidra1
dd15435371 Added P-Code Test framework to facilitate semantic verification through
emulation
2019-06-25 09:37:15 -04:00
Philip Pemberton
a4c4b5f7c7 Add noddy definition of the TEQ<cc>P instruction.
Note that this doesn't take into account the subtleties of what TEQP
does -- for more information on this, see
https://www.heyrick.co.uk/armwiki/The_Status_register#Legacy_processors_.2826_bit.29

It will, however, stop Ghidra from completely freaking out when it sees
this instruction in old RISC OS 26bit-PC code.

TODO, make this behave (in SLEIGH) like a PSR update (MSR CPSR, ...) but
note that the PSR bit order is different to the 26bit ARM PSR so fudging
will be needed.
2019-06-04 14:20:31 +01:00
Ryan Kurtz
b8f042da80 GT-2343: New DYLD shared cache loader. 2019-06-04 08:47:51 -04:00
ghidra1
7403e884a8 Merge remote-tracking branch 'origin/GT-2744_GhidorahRex_PR-362_ARM_THUMB' 2019-05-09 17:38:41 -04:00
ghidravore
f1e50fb079 Major refactoring of the gradle build system. 2019-04-23 15:20:26 -04:00
Dan
03258283d2 GT-2744 (closes #362): ARM and THUMB corrections.
Pulled-from: mumbel <mumbel@localhost.localdomain>
2019-04-10 12:19:15 -04:00
mumbel
5028d3015d ARM and THUMB corrections
ADD (SP plus register, T32) was incorrectly op11=0x1e (1 1 1 1 0),
but is supposed to be 0x1d (1 1 1 0 1)

ARM's CLREX matches THUMB's BL<c> <label>.  Added AMODE check to
CLREX
2019-04-05 22:07:30 -05:00
emteere
8cf5b0f2c6 GT-2722 updates for CMP.W and LSL instruction decodes 2019-04-02 10:45:18 -04:00
ghidra1
7179c6de81 GT-2667 added support for generating sleigh build.xml files 2019-03-29 17:24:31 -04:00
Dan
79d8f164f8 Candidate release of source code. 2019-03-26 13:46:51 -04:00