summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-04-04 19:31:56 -0400
committerOri Bernstein <ori@eigenstate.org>2013-04-04 19:31:56 -0400
commit4e145a71d2753ca1c6f464375f220a145b9f1019 (patch)
treeb740c917dd22b1fa2ec190cd95df06b7a93798da
parentc4b6a1c57ece9e02c05f046f4dd472f6d8c6ec6b (diff)
downloadmc-4e145a71d2753ca1c6f464375f220a145b9f1019.tar.gz
Make sure we don't clobber cstring()'s ret val.
Because that would be bad.
-rw-r--r--libstd/util.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/libstd/util.s b/libstd/util.s
index 718430b..f56ea42 100644
--- a/libstd/util.s
+++ b/libstd/util.s
@@ -18,6 +18,7 @@ std$cstring:
movq %rsp,%rax /* ret val */
movq 16(%rsp),%rcx /* len */
+ subq $16,%rsp /* compensate for args */
subq %rcx,%rsp /* get stack */
subq $1,%rsp /* nul */
andq $(~15),%rsp /* align */