Skip to content

Commit

Permalink
COAL: Removed assert(sizeof(double))!
Browse files Browse the repository at this point in the history
Can't believe this was left in for so long, while FindLiteral() was changed back to the original, the assert for the SegaDC version was left in! Fixed by defining Dreamcast and removing that assert on PC in CreateVM().
  • Loading branch information
Corbachu committed May 1, 2018
1 parent 509adfc commit f34d202
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions coal/c_compile.cc
Expand Up @@ -754,11 +754,17 @@ def_t * real_vm_c::FindLiteral()
}
else if (comp.literal_type == &type_vector)
{
if (G_FLOAT(cn->ofs) == comp.literal_value[0] &&
G_FLOAT(cn->ofs+1) == comp.literal_value[1] &&
G_FLOAT(cn->ofs+2) == comp.literal_value[2])
///G_FLOAT(cn->ofs+sizeof(double)) == comp.literal_value[1] &&
///G_FLOAT(cn->ofs+sizeof(double)*2) == comp.literal_value[2])
#ifndef DREAMCAST
if (G_FLOAT(cn->ofs) == comp.literal_value[0] &&
G_FLOAT(cn->ofs + 1) == comp.literal_value[1] &&
G_FLOAT(cn->ofs + 2) == comp.literal_value[2])

#else
if (G_FLOAT(cn->ofs) == comp.literal_value[0] &&
G_FLOAT(cn->ofs + sizeof(double)) == comp.literal_value[1] &&
G_FLOAT(cn->ofs + sizeof(double) * 2) == comp.literal_value[2])
#endif

{
return cn;
}
Expand Down Expand Up @@ -1898,7 +1904,10 @@ void real_vm_c::SetAsmDump(bool enable)

vm_c * CreateVM()
{

#if DREAMCAST
assert(sizeof(double) == 8);
#endif

return new real_vm_c;
}
Expand Down

0 comments on commit f34d202

Please sign in to comment.