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

Function CorePluginInit

arch/mips/arch_mips.cpp:3261–3356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3259#endif
3260
3261 BINARYNINJAPLUGIN bool CorePluginInit()
3262 {
3263 InitMipsSettings();
3264
3265 Architecture* mipseb = new MipsArchitecture("mips32", BigEndian, 32, MIPS_32);
3266 Architecture* mipsel = new MipsArchitecture("mipsel32", LittleEndian, 32, MIPS_32);
3267 Architecture* mips3 = new MipsArchitecture("mips3", BigEndian, 32, MIPS_3);
3268 Architecture* mips3el = new MipsArchitecture("mipsel3", LittleEndian, 32, MIPS_3);
3269 Architecture* mips64el = new MipsArchitecture("mipsel64", LittleEndian, 64, MIPS_64);
3270 Architecture* mips64eb = new MipsArchitecture("mips64", BigEndian, 64, MIPS_64);
3271 Architecture* cnmips64eb = new MipsArchitecture("cavium-mips64", BigEndian, 64, MIPS_64, DECOMPOSE_FLAGS_CAVIUM);
3272
3273 Architecture::Register(mipseb);
3274 Architecture::Register(mipsel);
3275 Architecture::Register(mips3);
3276 Architecture::Register(mips3el);
3277 Architecture::Register(mips64el);
3278 Architecture::Register(mips64eb);
3279 Architecture::Register(cnmips64eb);
3280
3281 /* calling conventions */
3282 MipsO32CallingConvention* o32LE = new MipsO32CallingConvention(mipsel);
3283 MipsO32CallingConvention* o32BE = new MipsO32CallingConvention(mipseb);
3284 MipsN64CallingConvention* n64LE = new MipsN64CallingConvention(mips64el);
3285 MipsN64CallingConvention* n64BE = new MipsN64CallingConvention(mips64eb);
3286 MipsN64CallingConvention* n64BEc = new MipsN64CallingConvention(cnmips64eb);
3287
3288 mipseb->RegisterCallingConvention(o32BE);
3289 mipseb->SetDefaultCallingConvention(o32BE);
3290 mipsel->RegisterCallingConvention(o32LE);
3291 mipsel->SetDefaultCallingConvention(o32LE);
3292 mips3->RegisterCallingConvention(o32BE);
3293 mips3->SetDefaultCallingConvention(o32BE);
3294 mips3->RegisterCallingConvention(o32LE);
3295 mips3->SetDefaultCallingConvention(o32LE);
3296 mips64el->RegisterCallingConvention(n64LE);
3297 mips64el->SetDefaultCallingConvention(n64LE);
3298 mips64eb->RegisterCallingConvention(n64BE);
3299 mips64eb->SetDefaultCallingConvention(n64BE);
3300 cnmips64eb->RegisterCallingConvention(n64BEc);
3301 cnmips64eb->SetDefaultCallingConvention(n64BEc);
3302
3303 MipsLinuxSyscallCallingConvention* linuxSyscallLE = new MipsLinuxSyscallCallingConvention(mipsel);
3304 MipsLinuxSyscallCallingConvention* linuxSyscallBE = new MipsLinuxSyscallCallingConvention(mipseb);
3305 mipseb->RegisterCallingConvention(linuxSyscallBE);
3306 mipsel->RegisterCallingConvention(linuxSyscallLE);
3307 mips3->RegisterCallingConvention(linuxSyscallBE);
3308 mips3el->RegisterCallingConvention(linuxSyscallLE);
3309
3310 mipseb->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(mipseb));
3311 mipsel->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(mipsel));
3312 mips3->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(mips3));
3313 mips3el->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(mips3el));
3314 mips64el->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(mips64el));
3315 mips64eb->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(mips64eb));
3316 cnmips64eb->RegisterCallingConvention(new MipsLinuxRtlResolveCallingConvention(cnmips64eb));
3317
3318 /* function recognizers */

Callers

nothing calls this directly

Calls 7

InitMipsSettingsFunction · 0.85
RegisterEnum · 0.50

Tested by

no test coverage detected