CodecRegistry stuff
| 4001 | |
| 4002 | // CodecRegistry stuff |
| 4003 | CodecRegistry::CodecRegistry(VMConfig& vm, SeedRng& rng) { |
| 4004 | auto add = [&](std::unique_ptr<Codec> c) { |
| 4005 | const std::string fam{c->family()}; |
| 4006 | by_family_[fam] = c.get(); |
| 4007 | owners_.push_back(std::move(c)); |
| 4008 | }; |
| 4009 | |
| 4010 | add(std::make_unique<ImmCodec>()); |
| 4011 | add(std::make_unique<MovCodec>()); |
| 4012 | add(std::make_unique<LoadCodec>()); |
| 4013 | add(std::make_unique<StoreCodec>()); |
| 4014 | add(std::make_unique<LeaCodec>()); |
| 4015 | add(std::make_unique<ReadSegCodec>()); |
| 4016 | add(std::make_unique<AddCodec>()); |
| 4017 | add(std::make_unique<SubCodec>()); |
| 4018 | add(std::make_unique<AndCodec>()); |
| 4019 | add(std::make_unique<OrCodec>()); |
| 4020 | add(std::make_unique<XorCodec>()); |
| 4021 | add(std::make_unique<NotCodec>()); |
| 4022 | add(std::make_unique<NegCodec>()); |
| 4023 | add(std::make_unique<IncCodec>()); |
| 4024 | add(std::make_unique<DecCodec>()); |
| 4025 | add(std::make_unique<ShlCodec>()); |
| 4026 | add(std::make_unique<ShrCodec>()); |
| 4027 | add(std::make_unique<SarCodec>()); |
| 4028 | add(std::make_unique<RolCodec>()); |
| 4029 | add(std::make_unique<RorCodec>()); |
| 4030 | add(std::make_unique<CmpCodec>()); |
| 4031 | add(std::make_unique<TestCodec>()); |
| 4032 | add(std::make_unique<BrCodec>()); |
| 4033 | add(std::make_unique<BrCcCodec>()); |
| 4034 | add(std::make_unique<CallVmCodec>()); |
| 4035 | add(std::make_unique<RetVmCodec>()); |
| 4036 | add(std::make_unique<CallNativeCodec>()); |
| 4037 | add(std::make_unique<JmpNativeCodec>()); |
| 4038 | add(std::make_unique<PushCodec>()); |
| 4039 | add(std::make_unique<PopCodec>()); |
| 4040 | add(std::make_unique<XchgCodec>()); |
| 4041 | add(std::make_unique<ZextCodec>()); |
| 4042 | add(std::make_unique<SextCodec>()); |
| 4043 | add(std::make_unique<SetccCodec>()); |
| 4044 | add(std::make_unique<BswapCodec>()); |
| 4045 | add(std::make_unique<NopCodec>()); |
| 4046 | add(std::make_unique<ExitCodec>()); |
| 4047 | add(std::make_unique<LoopDecCodec>()); |
| 4048 | add(std::make_unique<CdqeCodec>()); |
| 4049 | add(std::make_unique<LodsbCodec>()); |
| 4050 | add(std::make_unique<StosbCodec>()); |
| 4051 | add(std::make_unique<MovsbCodec>()); |
| 4052 | add(std::make_unique<CmpsbCodec>()); |
| 4053 | add(std::make_unique<ScasbCodec>()); |
| 4054 | add(std::make_unique<DfCodec>()); |
| 4055 | add(std::make_unique<ImulCodec>()); |
| 4056 | add(std::make_unique<BrIndCodec>()); |
| 4057 | add(std::make_unique<RetNativeCodec>()); |
| 4058 | |
| 4059 | // pick opcode bytes via random permutation over 0..255. |
| 4060 | std::vector<std::uint8_t> opcodes; |
nothing calls this directly
no test coverage detected