MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / CorePluginInit

Function CorePluginInit

arch/powerpc/arch_ppc.cpp:2549–2670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2547#endif
2548
2549 BINARYNINJAPLUGIN bool CorePluginInit()
2550 {
2551 MYLOG("ARCH POWERPC compiled at %s %s\n", __DATE__, __TIME__);
2552
2553 /* create, register arch in global list of available architectures */
2554 Architecture* ppc = new PowerpcArchitecture("ppc", BigEndian);
2555 Architecture::Register(ppc);
2556
2557 Architecture* ppc_qpx = new PowerpcArchitecture("ppc_qpx", BigEndian, 4, CS_MODE_QPX);
2558 Architecture::Register(ppc_qpx);
2559
2560 Architecture* ppc_spe = new PowerpcArchitecture("ppc_spe", BigEndian, 4, CS_MODE_SPE);
2561 Architecture::Register(ppc_spe);
2562
2563 Architecture* ppc_ps = new PowerpcArchitecture("ppc_ps", BigEndian, 4, CS_MODE_PS);
2564 Architecture::Register(ppc_ps);
2565
2566 Architecture* ppc64 = new PowerpcArchitecture("ppc64", BigEndian, 8);
2567 Architecture::Register(ppc64);
2568
2569 Architecture* ppc_le = new PowerpcArchitecture("ppc_le", LittleEndian);
2570 Architecture::Register(ppc_le);
2571
2572 Architecture* ppc64_le = new PowerpcArchitecture("ppc64_le", LittleEndian, 8);
2573 Architecture::Register(ppc64_le);
2574
2575 /* calling conventions */
2576 Ref<CallingConvention> conv;
2577 conv = new PpcSvr4CallingConvention(ppc);
2578 ppc->RegisterCallingConvention(conv);
2579 ppc->SetDefaultCallingConvention(conv);
2580 ppc_qpx->RegisterCallingConvention(conv);
2581 ppc_qpx->SetDefaultCallingConvention(conv);
2582 ppc_spe->RegisterCallingConvention(conv);
2583 ppc_spe->SetDefaultCallingConvention(conv);
2584 ppc_ps->RegisterCallingConvention(conv);
2585 ppc_ps->SetDefaultCallingConvention(conv);
2586 ppc64->RegisterCallingConvention(conv);
2587 ppc64->SetDefaultCallingConvention(conv);
2588 conv = new PpcLinuxSyscallCallingConvention(ppc);
2589 ppc->RegisterCallingConvention(conv);
2590 ppc_qpx->RegisterCallingConvention(conv);
2591 ppc_spe->RegisterCallingConvention(conv);
2592 ppc_ps->RegisterCallingConvention(conv);
2593 ppc64->RegisterCallingConvention(conv);
2594
2595 conv = new PpcSvr4CallingConvention(ppc_le);
2596 ppc_le->RegisterCallingConvention(conv);
2597 ppc_le->SetDefaultCallingConvention(conv);
2598 ppc64_le->RegisterCallingConvention(conv);
2599 ppc64_le->SetDefaultCallingConvention(conv);
2600 conv = new PpcLinuxSyscallCallingConvention(ppc_le);
2601 ppc_le->RegisterCallingConvention(conv);
2602 ppc64_le->RegisterCallingConvention(conv);
2603
2604 /* function recognizer */
2605 ppc->RegisterFunctionRecognizer(new PpcImportedFunctionRecognizer());
2606 ppc_qpx->RegisterFunctionRecognizer(new PpcImportedFunctionRecognizer());

Callers

nothing calls this directly

Calls 5

RegisterEnum · 0.50

Tested by

no test coverage detected