fixed compiling issues...

merge-requests/11/head
_xeroxz 4 years ago
parent 0699518ae9
commit 2d3b22a7ac

@ -16,9 +16,9 @@ namespace vm::lifters
return { vtil::register_virtual, ( size_t )context_offset / 8, size * 8, ( context_offset % 8 ) * 8 }; return { vtil::register_virtual, ( size_t )context_offset / 8, size * 8, ( context_offset % 8 ) * 8 };
} }
extern lifter_t lregq, lregdw; extern vm::lifters::lifter_t lregq, lregdw;
extern lifter_t addq, adddw, addw; extern vm::lifters::lifter_t addq, adddw, addw;
extern lifter_t sregq, sregdw, sregw; extern vm::lifters::lifter_t sregq, sregdw, sregw;
inline std::map< vm::handler::mnemonic_t, lifter_callback_t > all = { inline std::map< vm::handler::mnemonic_t, lifter_callback_t > all = {
// lreg lifters... // lreg lifters...

@ -2,7 +2,7 @@
namespace vm::lifters namespace vm::lifters
{ {
lifter_t addq = { vm::lifters::lifter_t addq = {
// vsp[0] = vsp[1] + vsp[0]; // vsp[0] = vsp[1] + vsp[0];
vm::handler::ADDQ, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::ADDQ, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
auto [ t0, t1 ] = blk->tmp( 64, 64 ); auto [ t0, t1 ] = blk->tmp( 64, 64 );
@ -13,7 +13,7 @@ namespace vm::lifters
blk->pushf(); blk->pushf();
} }; } };
lifter_t adddw = { vm::lifters::lifter_t adddw = {
// vsp[0] = vsp[1] + vsp[0]; // vsp[0] = vsp[1] + vsp[0];
vm::handler::ADDDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::ADDDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
auto [ t0, t1 ] = blk->tmp( 32, 32 ); auto [ t0, t1 ] = blk->tmp( 32, 32 );
@ -24,7 +24,7 @@ namespace vm::lifters
blk->pushf(); blk->pushf();
} }; } };
lifter_t addw = { vm::lifters::lifter_t addw = {
// vsp[0] = vsp[1] + vsp[0]; // vsp[0] = vsp[1] + vsp[0];
vm::handler::ADDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::ADDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
auto [ t0, t1 ] = blk->tmp( 16, 16 ); auto [ t0, t1 ] = blk->tmp( 16, 16 );

@ -2,13 +2,13 @@
namespace vm::lifters namespace vm::lifters
{ {
lifter_t lregq = { vm::lifters::lifter_t lregq = {
// push vregX // push vregX
vm::handler::LREGQ, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::LREGQ, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
blk->push( make_virtual_register( vinstr->operand.imm.u, 8 ) ); blk->push( make_virtual_register( vinstr->operand.imm.u, 8 ) );
} }; } };
lifter_t lregdw = { vm::lifters::lifter_t lregdw = {
// push vregX // push vregX
vm::handler::LREGDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::LREGDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
blk->push( make_virtual_register( vinstr->operand.imm.u, 4 ) ); blk->push( make_virtual_register( vinstr->operand.imm.u, 4 ) );

@ -2,19 +2,19 @@
namespace vm::lifters namespace vm::lifters
{ {
lifter_t sregq = { vm::lifters::lifter_t sregq = {
// pop vregX // pop vregX
vm::handler::SREGQ, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::SREGQ, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
blk->pop( make_virtual_register( vinstr->operand.imm.u, 8 ) ); blk->pop( make_virtual_register( vinstr->operand.imm.u, 8 ) );
} }; } };
lifter_t sregdw = { vm::lifters::lifter_t sregdw = {
// pop vregX // pop vregX
vm::handler::SREGDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::SREGDW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
blk->pop( make_virtual_register( vinstr->operand.imm.u, 4 ) ); blk->pop( make_virtual_register( vinstr->operand.imm.u, 4 ) );
} }; } };
lifter_t sregw = { vm::lifters::lifter_t sregw = {
// pop vregX // pop vregX
vm::handler::SREGW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) { vm::handler::SREGW, []( vtil::basic_block *blk, vm::instrs::virt_instr_t *vinstr ) {
blk->pop( make_virtual_register( vinstr->operand.imm.u, 2 ) ); blk->pop( make_virtual_register( vinstr->operand.imm.u, 2 ) );

@ -64,6 +64,7 @@
<LanguageStandard>stdcpplatest</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<ObjectFileName>$(IntDir)%(RelativeDir)</ObjectFileName>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -87,6 +88,7 @@
<LanguageStandard>stdcpplatest</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<ObjectFileName>$(IntDir)%(RelativeDir)</ObjectFileName>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -166,7 +168,8 @@
<ClCompile Include="src\vmhandler.cpp" /> <ClCompile Include="src\vmhandler.cpp" />
<ClCompile Include="src\vminstrs.cpp" /> <ClCompile Include="src\vminstrs.cpp" />
<ClCompile Include="src\vmlifters\add.cpp" /> <ClCompile Include="src\vmlifters\add.cpp" />
<ClCompile Include="src\vmlifters\lregq.cpp" /> <ClCompile Include="src\vmlifters\lreg.cpp" />
<ClCompile Include="src\vmlifters\sreg.cpp" />
<ClCompile Include="src\vmprofiles\add.cpp" /> <ClCompile Include="src\vmprofiles\add.cpp" />
<ClCompile Include="src\vmprofiles\call.cpp" /> <ClCompile Include="src\vmprofiles\call.cpp" />
<ClCompile Include="src\vmprofiles\div.cpp" /> <ClCompile Include="src\vmprofiles\div.cpp" />

@ -261,7 +261,10 @@
<ClCompile Include="src\vmlifters\add.cpp"> <ClCompile Include="src\vmlifters\add.cpp">
<Filter>Source Files\vmlifters</Filter> <Filter>Source Files\vmlifters</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\vmlifters\lregq.cpp"> <ClCompile Include="src\vmlifters\lreg.cpp">
<Filter>Source Files\vmlifters</Filter>
</ClCompile>
<ClCompile Include="src\vmlifters\sreg.cpp">
<Filter>Source Files\vmlifters</Filter> <Filter>Source Files\vmlifters</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>

Loading…
Cancel
Save