diff options
| author | Galen Williamson <galen@vector35.com> | 2025-06-29 11:23:58 -0400 |
|---|---|---|
| committer | Galen Williamson <galen@vector35.com> | 2025-06-29 18:28:48 -0400 |
| commit | e8206bc27e1633c7e4c99907f43bf67d2f200cd5 (patch) | |
| tree | 2315bec284e9bb692a0eb8986578fe18e2289d23 /platform/linux | |
| parent | 91f1eccb6c41a7ef60fd66387ffae075f88141a4 (diff) | |
[powerpc] Full merge of PowerPC disassembler PRs, including:
* Remove dependency on capstone for PowerPC disassembly #6292
* Add support for PowerPC VLE instruction set #6740
* Add support for paired-single instructions #6821
* Various post-merge fixes and tweaks to disassembly and lifting
* Removal of dependence on capstone for assembler's scoring mechanism (capstone currently disabled, but not removed from codebase yet)
Diffstat (limited to 'platform/linux')
| -rw-r--r-- | platform/linux/platform_linux.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/platform/linux/platform_linux.cpp b/platform/linux/platform_linux.cpp index 20a258d6..51434323 100644 --- a/platform/linux/platform_linux.cpp +++ b/platform/linux/platform_linux.cpp @@ -416,21 +416,33 @@ extern "C" } Ref<Architecture> ppc = Architecture::GetByName("ppc"); - Ref<Architecture> ppcle = Architecture::GetByName("ppc_le"); - if (ppc && ppcle) + Ref<Architecture> ppcvle = Architecture::GetByName("ppcvle"); + Ref<Architecture> ppcLE = Architecture::GetByName("ppc_le"); + // TODO: VLEPEM says that VLE always uses big-endian instruction + // encoding, but doesn't say anything about data + // endianness, so in theory little-endian PPC should be + // possible? + if (ppc && ppcvle && ppcLE) { - Ref<Platform> platform; - Ref<Platform> platformle; + Ref<Platform> ppcPlatform; + Ref<Platform> ppcvlePlatform; + Ref<Platform> ppcLEPlatform; + + ppcPlatform = new LinuxPpc32Platform(ppc, "linux-ppc32"); + ppcvlePlatform = new LinuxPpc32Platform(ppcvle, "linux-ppcvle32"); + ppcLEPlatform = new LinuxPpc32Platform(ppcLE, "linux-ppc32_le"); + + Platform::Register("linux", ppcPlatform); + Platform::Register("linux", ppcvlePlatform); + Platform::Register("linux", ppcLEPlatform); - platform = new LinuxPpc32Platform(ppc, "linux-ppc32"); - platformle = new LinuxPpc32Platform(ppcle, "linux-ppc32_le"); - Platform::Register("linux", platform); - Platform::Register("linux", platformle); // Linux binaries sometimes have an OS identifier of zero, even though 3 is the correct one - BinaryViewType::RegisterPlatform("ELF", 0, platform); - BinaryViewType::RegisterPlatform("ELF", 3, platform); - BinaryViewType::RegisterPlatform("ELF", 0, platformle); - BinaryViewType::RegisterPlatform("ELF", 3, platformle); + BinaryViewType::RegisterPlatform("ELF", 0,ppcPlatform); + BinaryViewType::RegisterPlatform("ELF", 3,ppcPlatform); + BinaryViewType::RegisterPlatform("ELF", 0,ppcvlePlatform); + BinaryViewType::RegisterPlatform("ELF", 3,ppcvlePlatform); + BinaryViewType::RegisterPlatform("ELF", 0,ppcLEPlatform); + BinaryViewType::RegisterPlatform("ELF", 3,ppcLEPlatform); } Ref<Architecture> ppc64 = Architecture::GetByName("ppc64"); |
