Updated Athena

This commit is contained in:
Jack Andersen 2015-10-15 17:08:01 -10:00
parent edf368b1b1
commit d5cc16b79a
3 changed files with 6 additions and 2 deletions

2
hecl/extern/Athena vendored

@ -1 +1 @@
Subproject commit 25de226e65934377daac37364b53c92a510841ca
Subproject commit ffca1f18974293e9c59ebd01546c9910a22e3679

View File

@ -222,6 +222,9 @@ struct GX : IBackend
/* Convenience Links */
TEVStage* m_prev = nullptr;
TEVStage* m_next = nullptr;
/* Remember this for debugging */
SourceLocation m_loc;
};
unsigned m_tevCount = 0;
TEVStage m_tevs[16];

View File

@ -58,6 +58,7 @@ GX::TEVStage& GX::addTEVStage(Diagnostics& diag, const SourceLocation& loc)
if (m_tevCount >= 16)
diag.reportBackendErr(loc, "GX TEV stage overflow");
GX::TEVStage& newTEV = m_tevs[m_tevCount];
newTEV.m_loc = loc;
if (m_tevCount)
{
newTEV.m_prev = &m_tevs[m_tevCount-1];
@ -669,7 +670,7 @@ void GX::reset(const IR& ir, Diagnostics& diag)
TEVStage& stage = m_tevs[i];
if (stage.m_regOut == TEVLAZY)
{
int picked = pickCLazy(diag, SourceLocation());
int picked = pickCLazy(diag, stage.m_loc);
stage.m_regOut = TevRegID(TEVREG0 + picked);
for (int j=i+1 ; j<m_tevCount ; ++j)
{