From 46b2a4007b79f70befb73ca91923ddfa279be7be Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 16 Apr 2015 00:22:50 -0400 Subject: [PATCH] improve the assembly documentation --- src/init.s | 14 +++++++++----- src/swap.s | 5 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/init.s b/src/init.s index 4dff02f..3258165 100644 --- a/src/init.s +++ b/src/init.s @@ -1,11 +1,15 @@ // Copyright (c) 2015, edef // See LICENSE file that comes with this distribution. -/// initialise a new context -/// arguments: rdi: stack pointer, -/// rsi: function pointer, -/// rdx, data pointer -/// rcx, stack limit +//! initialise a new context +//! arguments: +//! * rdi: stack pointer +//! * rsi: function pointer +//! * rdx: data pointer +//! * rcx: stack limit +//! +//! return values: +//! * rdi: new stack pointer // switch to the fresh stack xchg %rsp, %rdi diff --git a/src/swap.s b/src/swap.s index e7ae3ac..b775d2b 100644 --- a/src/swap.s +++ b/src/swap.s @@ -1,8 +1,9 @@ // Copyright (c) 2015, edef // See LICENSE file that comes with this distribution. -/// switch to a new context -/// arguments: rdi: stack pointer pointer +//! switch to a new context +//! arguments: +//! * rdi: stack pointer pointer // make sure we leave the red zone alone sub $$128, %rsp