Commit graph

71 commits

Author SHA1 Message Date
ghidra1
0d641458ce Merge remote-tracking branch 'origin/patch' 2020-02-05 14:04:07 -05:00
ghidorahrex
4c31ac66ce GT-3489 Updated x86.idx with latest AMD and Intel instruction set
manuals
2020-02-05 13:38:11 -05:00
ghidorahrex
292d802ab6 Merge remote-tracking branch 'origin/GT-3413_ghidorahrex_x86_32_rdrand' 2020-01-27 07:18:29 -05:00
ghidorahrex
07e9853b97 Merge remote-tracking branch
'origin/GT-3425_ghidorahrex_PR-1378_saruman9_fix_push_pop_seg'

Fixes #1378
2020-01-17 12:30:06 -05:00
Ryan Kurtz
2c0d41b554 Merge remote-tracking branch 'origin/GT-3423_ghidorahrex_PR-1370_mumbel_x86_bt' 2019-12-23 10:27:56 -05:00
Ryan Kurtz
03c0872244 Merge remote-tracking branch 'origin/GT-3421_ghidorahrex_PR-872_andyhhp_x86-int' 2019-12-23 08:35:30 -05:00
saruman9
430baa01c6
Fix PUSH and POP instruction for segment registers in x86
Create macros for push/pop instructions, which operates of segment registers. Add behaviour for
push/pop instructions, which operates of `FS` and `GS` segment registers in 64-bit mode.

For details see p. 1037 (`POP`) and p. 1163 (`PUSH`) of Intel's manual or open `Instruction Info...`
in the Ghidra.

Fix #1377.
2019-12-22 00:51:22 +03:00
mumbel
eafac1daa1 BT <r64>,<Reg64> used 32 bit instead of 64-bit modulo size 2019-12-20 14:58:10 -06:00
ghidorahrex
c2847fa9a4 GT-3413: Added rdrand/rdseed support to x86-32 2019-12-19 09:42:17 -05:00
Ryan Kurtz
2f1292b174 Merge remote-tracking branch 'origin/caheckman_x86parityflag' 2019-12-17 11:31:26 -05:00
Ryan Kurtz
8170874fe6 Merge remote-tracking branch 'origin/GT-3380_ghidorahrex_PR-1295_roblabla_ptest' 2019-12-09 13:38:21 -05:00
Raphaël Akladios
bbf050a26e
Update the mnemonic to SALC and disallow it in b64 2019-12-03 15:48:01 +01:00
Raphaël Akladios
304e3a56a3
x86: Add the "SETALC" instruction to SLEIGH specs
The SETALC / SALC instruction is officially undocumented by Intel, and is currently missing form Ghidra.
A constructor for this instruction is added to the SLEIGH specification files according to the descriptions in these links:
http://www.rcollins.org/secrets/opcodes/SALC.html
http://ref.x86asm.net/coder32.html#xD6
2019-12-02 04:52:22 +01:00
roblabla
6549d330f8 x86: Properly implement the PTEST instruction 2019-11-28 12:08:31 +00:00
caheckman
d322303f59 Basic parity flag implementation for x86 2019-11-27 13:39:30 -05:00
James
ac3361954f GT-3339 code review changes 2019-11-26 14:01:34 -05:00
James
09745ce672 GT-3339 added pcode for x64 vector ops 2019-11-21 15:47:12 -05:00
caheckman
53e4a67fa2 Bug fix in ADDPS 2019-11-19 11:38:53 -05:00
caheckman
57c081eeda psllq, psubq 2019-11-16 12:53:05 -05:00
caheckman
a1623af6a0 pmulw, pslld, psubd 2019-11-16 12:36:36 -05:00
caheckman
965afc8829 Replace specialized AVX constructors with bitrange operator 2019-11-16 11:47:25 -05:00
caheckman
64d15b3ea0 Use bitrange operator instead of special constructors when accessing
vector register lanes
2019-11-16 10:28:09 -05:00
ghidorahrex
2ab04ae86d GT-3256: x86 corrected disassembly of x87 escape opcodes 2019-11-13 08:07:37 -05:00
ghidorahrex
6b81682551 GT-3253: Corrected register definitions for the x86 rdrand instruction
(fixes #1169).
2019-11-01 09:50:52 -04:00
Ryan Kurtz
d632b57ddd Merge remote-tracking branch 'origin/GT-3168_emteere' into Ghidra_9.1 2019-09-19 15:10:04 -04:00
Ryan Kurtz
3e7d94862e Merge remote-tracking branch 'origin/GT-3039_ghidorahrex_x86_disassembly_error_on_movbe' into Ghidra_9.1 2019-09-19 12:14:29 -04:00
emteere
7a00eed58f GT-3168_emteere Adding missed FMA.sinc file 2019-09-19 09:35:48 -04:00
emteere
7f74da36e2 GT-3168_emteere Adding missing FMA, F16C, and misc AVX instructions 2019-09-19 09:06:05 -04:00
Ryan Kurtz
23d1e9ad22 Merge remote-tracking branch 'origin/GT-3090_16bit_analysis' 2019-09-06 13:24:34 -04:00
caheckman
11d7420af5 allow segmentop tag in cspec, update segmentop XML 2019-08-29 16:28:03 -04:00
caheckman
4c3289f09f Use InjectPayload for segment ops 2019-08-29 14:17:02 -04:00
Ryan Kurtz
62b60ccb34 Merge remote-tracking branch 'origin/GT-3113' 2019-08-28 08:08:21 -04:00
James
8302bef89a GT-3113 x86/64 linux syscalls 2019-08-27 17:06:20 -04:00
emteere
587ebd6c04 GT-3117 relax rmod for debug register move 2019-08-27 14:50:47 -04:00
caheckman
06de0d46a0 Merge branch 'GT-3090_NearPointerResolve' into GT-3090_16bit_analysis 2019-08-27 14:40:16 -04:00
caheckman
faf93508e6 More x86 changes to accomodate protected mode 2019-08-27 14:35:48 -04:00
caheckman
017537be35 protected mode bit 2019-08-27 14:35:46 -04:00
caheckman
3556745c32 start patterns for protected mode 2019-08-27 14:35:45 -04:00
caheckman
d9ad00e9ca Move segmentop tag into the pspec 2019-08-27 14:35:44 -04:00
caheckman
8240d3c8db Added x86:LE:16:Protected Mode 2019-08-27 14:35:43 -04:00
caheckman
7125cc4171 fixed bug detecting segmented addressing, new 16-bit start patterns 2019-08-27 14:27:19 -04:00
caheckman
afbceb2072 Set near/far prototype models during function purge analysis 2019-08-26 16:45:53 -04:00
caheckman
612c0d6f3e name to address space map
shortcut to address space map
more adjustments to shortcuts
allow null AddrSpace pointer in raw baselist
holes in the space indices
almost working
GT-2873 decompiler, other, and overlays
GT-2873 added OTHER space to java sleigh compiler, fixed decompiler
exception
isOtherSpace method
isOtherSpace java, addressing code review comments
GT-2873 added null check in decompiler reset
GT-2873 code review changes
Read and write space_other tag in SLA files
Version number for .sla file
GT-2873 fixups after merge
GT-2873 renamed Sparc registers: OTHER->OTHERWIN, WINWSTATE->WSTATE
GT-2873 added option in AddressInput to control OTHER space visibility
GT-2873 OTHER space now global
GT-2873 fixing comments refering to decompiler code in BasicCompilerSpec
2019-08-22 12:30:18 -04:00
Ryan Kurtz
0e5d55d74d Merge remote-tracking branch 'origin/GT-3095_ghidorahrex_PR-871_andyhhp_x86_sahf_lahf_64bit' 2019-08-20 14:29:40 -04:00
Ryan Kurtz
ee61c15a46 Merge remote-tracking branch 'origin/GT-3092_ghidorahrex_PR-834_mumbel_x86.offset' 2019-08-20 14:16:46 -04:00
Andrew Cooper
239106a356 x86: Restore the use of SAHF/LAHF in 64bit mode
The SAHF/LAHF instructions date from the 32bit x86 days, and where initially
marked as obsolete in the AMD 64bit spec.  All processors have the requisite
logic, as they are backwards compatible in 32bit mode.

The original 64bit CPUs from Intel and AMD would raise #UD for these
instructions, per the AMD64 spec.

However, they were were sufficiently critical for software emulators that the
instructions were "reintroduced" into the AMD64 spec, with a new CPUID bit
indicating that the they were now usable in 64bit mode.

In practice, every 64bit capable processor since 2005 has supported them.

Fixes #837
2019-08-17 20:34:55 +01:00
emteere
522662477e GT-2955 (closes #881): Certifying
Pulled-from: mumbel <22204578+mumbel@users.noreply.github.com>
2019-08-14 18:28:21 -04:00
mumbel
88f127566c Sign-extended imm32 for 64-bit mode
Several x86_64 instructions were not sign extending the imm32 to
64-bits for the 64-bit mode instruction:  ADD, AND, CMD, and SUB,
while: ADC, MOV, and TEST were correct
2019-08-06 17:40:53 -05:00
Andrew Cooper
97b4528388 x86: Improvements to breakpoint disassembly
* `CC` and `CD 03` are different instructions, but previously disassembled to
   `INT 3` and `INT 0x3` respectively.

   The proper mnemonic for the former is `INT3` (no space), while the latter
   is a byte sequence only seen in tests and when trying to exploit emulator
   bugs.  Switch `CC` to use its documented mnemonic, which makes it easier to
   distinguish.

 * `INT1`, also commonly known as `ICEBP` (In Circuit Emulator Break-Point)
   has existed since the 486 processor, and was finally documented by Intel
   following the fallout from CVE-2018-8897.  Model it after `INT3`.

 * It is unclear why there is a specialisation for `:INT n29`, because vector
   29 is `#VC` in newer AMD CPUs, and can't be invoked using the `INT $29`
   instruction anyway.

   The byte sequence `CC 1D` always gets disassembled using `:INT imm8`, which
   suggests that SLEIGH has noticed the redundancy and folded the decode
   rules.  Drop the specialisation.

Fixes #514
2019-08-03 19:13:53 +01:00
ghidorahrex
071f98e18b Added support for operand-size override (0x66) prefix on :movbe
instructions.
2019-07-30 08:30:37 -04:00