Minor tweaks.

This commit is contained in:
Ben Vanik
2013-12-28 19:48:02 -08:00
parent f6f8be9080
commit 6b17ead43b
4 changed files with 32 additions and 8 deletions

View File

@@ -32,9 +32,9 @@ int InstrEmit_branch(
// The docs say always, though...
// Note that we do the update before we branch/call as we need it to
// be correct for returns.
Value* return_address = f.LoadConstant(cia + 4);
f.SetReturnAddress(return_address);
if (lk) {
Value* return_address = f.LoadConstant(cia + 4);
f.SetReturnAddress(return_address);
f.StoreLR(return_address);
}