Add stackpointer copy and increment function.