summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-10-17 23:00:59 +0200
committerChristoph Bumiller <[email protected]>2011-10-21 23:00:38 +0200
commit2ec5c8feb331af29548e98b0e78e810bbbc7009e (patch)
tree6f45abe94175456477a9dcd2e1da01b88a8fe691 /src
parent30cb66cd745fc793a2349f1d17046c50cd51c558 (diff)
nvc0/ir: GP emit address must end up in $r0
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
index 94cc5111119..4b448c6900f 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
@@ -289,6 +289,10 @@ NVC0LoweringPass::visit(Function *fn)
// TODO: when we generate actual functions pass this value along somehow
bld.setPosition(BasicBlock::get(fn->cfg.getRoot()), false);
gpEmitAddress = bld.loadImm(NULL, 0)->asLValue();
+ if (fn->cfgExit) {
+ bld.setPosition(BasicBlock::get(fn->cfgExit)->getExit(), false);
+ bld.mkMovToReg(0, gpEmitAddress);
+ }
}
return true;
}