Commit Graph

65 Commits

Author SHA1 Message Date
dev747368
8b924f718e GP-2435 fix exception in QueryOptionService if secondary isn't an intstr 2022-08-08 21:36:10 +00:00
ghidra1
0590f9336e Merge remote-tracking branch 'origin/patch' 2022-07-26 18:20:51 -04:00
ghidra1
6614ea5c2e GP-0 minor fixes for build 2022-07-26 13:56:39 -04:00
Ryan Kurtz
03b42fc6e4 Merge remote-tracking branch 'origin/patch' 2022-07-26 00:34:13 -04:00
ghidra1
062551ae9a GP-2366 handle MIPS emulation when ISA_VARIANT not enabled 2022-07-25 16:25:30 -04:00
ghidra1
5908e79022 GP-2334 improve support for extended ELF section indexing when number of
sections exceed SHN_LORESERVE (0xff00).
2022-07-20 13:18:37 -04:00
ghidra1
47f76c78d6 Merge remote-tracking branch 'origin/patch' 2022-04-20 12:53:14 -04:00
ghidorahrex
a7e2162d2b GP-1879 corrected MIPS rdhwr instruction registers 2022-04-20 12:48:09 -04:00
ghidra1
2bced1cd43 GP-1036 EXTERNAL Block Offset-Reference refactor 2022-04-15 13:19:40 -04:00
ghidra1
577328f230 GP-1907: Updated ELF related loader to eliminate use of
ContinuesInterceptor
2022-04-15 01:53:30 -04:00
Ryan Kurtz
473115a73c Merge remote-tracking branch 'origin/patch' 2022-03-21 11:41:21 -04:00
emteere
656148eec5 GP-1834_emteere fixing mips type 5,6 relocation calculation by sign
extending LO16 REL addend. Minor MultiInstruction reference creation
issue on instructions using same register for input and output
2022-03-18 22:09:05 +00:00
ghidra1
9076b2429c GP-1571 ELF: create fake relocation table entry for non-relocation memory modifications (needed for ELF export) 2021-12-13 14:52:24 -05:00
Ryan Kurtz
569cbc61fc Merge remote-tracking branch 'origin/patch' 2021-10-20 12:02:29 -04:00
Ryan Kurtz
33aee0ff63 Merge remote-tracking branch
'origin/GP-1290_ghidorahrex_PR-3405_kotcrab_fix-mips-ins' (Closes #3405)
2021-10-14 08:34:33 -04:00
ghidorahrex
6037ba86d3 Corrected MIPS tlbr pcodeop 2021-10-04 10:29:24 -04:00
ghidra1
3a23b73886 Merge remote-tracking branch 'origin/patch' 2021-09-28 11:50:05 -04:00
ghidorahrex
37f858aafd Fixed issue with MIPS64 DINS and related instructions. 2021-09-27 09:37:43 -04:00
kotcrab
3ad11a8a36 Fix decompilation of MIPS ins instruction
Simplify ext instruction
2021-09-24 19:06:11 +02:00
ghidorahrex
7321e2a09a Fixed MIPS bitpattern endian mixup 2021-09-17 12:03:14 -04:00
Ryan Kurtz
cf3b859015 Merge remote-tracking branch
'origin/GP-1129_ghidorahrex_PR-3212_niooss-ledger_fix-mips32el-double-constant'
(Closes #3212)
2021-08-17 14:05:10 -04:00
ghidra1
ecf196fbea Merge remote-tracking branch 'origin/patch' 2021-08-02 17:37:15 -04:00
ghidra1
0a24532bf7 GP-1110 Refactor ElfDefaultGotPltMarkup.processDynamicPLTGOT implementation, Correct duplicate ELF relocation table processing, and other minor ELF cleanup 2021-08-02 15:58:37 -04:00
ghidorahrex
b3002b78fa Corrected MIPSLE processor tests to run correct suite. 2021-07-13 11:12:56 -04:00
Nicolas Iooss
8194ee34ec fix(mips32el): fix positions of float registers in Little-Endian MIPS32 CPU
When loading double constants using two lwc1 instructions ("Load Word in
Coprocessor 1"), the words are swapped on Little-Endian MIPS machines.

More precisely, when compiling the following function with
mipsel-linux-gnu-gcc -O3 -mfp32 -march=mips1

    double add_0x100000000(double num) {
        return num + 4294967296.0;
    }

The produced assembly (seen with objdump) is:

    00000000 <add_0x100000000>:
       0:    3c1c0000     lui   gp,0x0
       4:    279c0000     addiu gp,gp,0
       8:    0399e021     addu  gp,gp,t9
       c:    8f820000     lw    v0,0(gp)
      10:    00000000     nop
      14:    c4400000     lwc1  $f0,0(v0)     ; load the first 32-bit word
      18:    00000000     nop
      1c:    c4410004     lwc1  $f1,4(v0)     ; load the second 32-bit word
      20:    03e00008     jr    ra
      24:    46206000     add.d $f0,$f12,$f0  ; perform the addition

(the rodata section contains "00000000 0000f041" to encode the constant).

When opening the produced file with Ghidra 10.0, the assembly code is
fine but the decompiler outputs:

    double add_0x100000000(double param_1)
    {
      return param_1 + 5.465589744795806e-315;
    }

5.465589744795806e-315 comes from the decoding of "0000f041 00000000"
instead of "00000000 0000f041": the words were swapped.

Fix this by swapping f0 and f1, f2 and f3... when using a Little-Endian
MIPS machine with 32-bit floating-point registers.
2021-07-12 21:06:44 +02:00
ghidra1
10fa9bcca4 Merge remote-tracking branch 'origin/GP-938_ghidorahrex_PR-3022_veritas501_fix_jic' 2021-06-23 17:54:11 -04:00
ghidra1
e89a8dcde3 GP-1029 Detect and mark unsupported EXTERNAL data relocation and correct MIPS compound relocation processing bug. 2021-06-09 18:26:05 -04:00
Ryan Kurtz
3a0ae8ee39 GP-849: Gradle 7 support 2021-05-12 13:45:16 -04:00
veritas501
89ecfcc236 fix(mips32r6): Optimize inst jic 2021-05-12 15:02:15 +08:00
veritas501
e606a9a18f fix(mips32r6): jic is not call but jump
See https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00086-2B-MIPS32BIS-AFP-6.06.pdf,
page 205 (page 215 in file).
jic is not like jialc, which set ra by `GPR[31] <- PC + 4`, it's just a jump.
So, if meet jic reg,xxx , identify it as a jump.
If meet jic ra,xxx , identify it as a return.
2021-05-11 13:13:07 +08:00
caheckman
872cd724cb Split out BE and LE cspec for MIPS 2021-03-24 13:23:04 -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
9f56e3169b GP-662 added ELF support for process-specific symbol resolution 2021-02-04 15:44:19 -05:00
ghidra1
32ae57e312 Merge remote-tracking branch
'origin/GP-33_emteere_PR-1766_mumbel_mips-rfe' into patch
2021-01-25 15:45:45 -05:00
emteere
d7a1085619 GP-33_emteere Updated comment, read Status reg only once 2021-01-25 15:21:47 -05:00
astrelsky
afc647a28f Prevent silent AddressOutOfBoundsException in MipsAddressAnalyzer 2020-11-05 14:13:35 -05:00
ghidra1
6107f29a95 GP-302 corrected issue affected ELF PLTGOT bounds determination.
Corrected various pointer and data related issues
2020-10-23 18:57:11 -04:00
ghidra1
b83f327e47 Added direct references to MemoryBlock.EXTERNAL_BLOCK_NAME instead of
hard-coded string
2020-10-08 14:04:20 -04:00
ghidra1
9af174f9fe Merge remote-tracking branch 'origin/caheckman_BaseSpaceID' 2020-07-01 16:14:23 -04:00
caheckman
93c8171ffa Refactor getBaseSpaceID -> getSpaceID 2020-05-22 18:57:12 -04:00
mumbel
734c945f6d MIPS missing rfe instruction 2020-04-13 15:30:21 -05:00
Random
4bed300b33 Fix a bug when parsing the elf SHT_MIPS_OPTIONS section 2020-04-13 19:09:32 +02:00
ghidorahrex
02319781b6 GT-3466 Fixed export of local variables as constants 2020-02-07 12:07:26 -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
emteere
5c1dcc6a1c emteere_MipsMultiThreadFix fix for potential multi threaded access to
local class variable.
2019-12-17 16:22:31 -05:00
ghidra1
b7a3dff215 Merge remote-tracking branch 'origin/GT-3328_ghidra1_SleighArgs' into patch 2019-11-26 12:32:17 -05:00
ghidra1
4fc507f711 GT-3349 Corrected ELF relocation fixups for R_MIPS_REL32,
R_X86_64_RELATIVE and R_X86_64_RELATIVE64
2019-11-22 16:49:24 -05:00
ghidra1
1b1240a41b GT-3328 corrected sleighArgs.txt use with module dependency paths 2019-11-19 15:11:30 -05:00