diff options
author | H. Peter Anvin <hpa@zytor.com> | 2013-03-05 19:31:52 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2013-03-05 19:31:52 -0800 |
commit | 88a77633e643602cdf631fb432d5e5fffbb6a48c (patch) | |
tree | 3a4cdec4b671d40efdf748c8fb10049437c5378b /printmsg.asm | |
parent | 331a16cba36fafd32babbbd543398f3575d52a91 (diff) | |
download | virtio9p-88a77633e643602cdf631fb432d5e5fffbb6a48c.tar.gz virtio9p-88a77633e643602cdf631fb432d5e5fffbb6a48c.tar.xz virtio9p-88a77633e643602cdf631fb432d5e5fffbb6a48c.zip |
Use procedure start/end macros
Use procedure start/end macros instead of opencoding all the
directives.
Diffstat (limited to 'printmsg.asm')
-rw-r--r-- | printmsg.asm | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/printmsg.asm b/printmsg.asm index 4293877..f936856 100644 --- a/printmsg.asm +++ b/printmsg.asm @@ -36,20 +36,18 @@ * Print a message (pointer on the stack) on standard error, prefixed by * "v9fs: " * ------------------------------------------------------------------------- */ - .globl puterr -puterr: +GPROC(puterr) printmsg "v9fs: " /* Fall through */ - .size puterr,.-puterr - .type puterr,@function +END(puterr) /* ------------------------------------------------------------------------- * * puts * * Print a message (pointer on the stack) on standard error. * ------------------------------------------------------------------------- */ - .globl puts -puts: + +GPROC(puts) pushaw movw %sp,%bp movw 18(%bp),%di @@ -73,17 +71,15 @@ puts: 2: popaw retw $2 - - .size puts,.-puts - .type puts,@function +END(puts) /* ------------------------------------------------------------------------- * * printnum * * Print an unsigned 32-bit integer on the stack * ------------------------------------------------------------------------- */ - .globl printnum -printnum: + +GPROC(printnum) pushl %eax pushl %edx pushl %ecx @@ -113,17 +109,15 @@ printnum: popl %edx popl %eax retw $4 - - .size printnum,.-printnum - .type printnum,@function +END(printnum) /* ------------------------------------------------------------------------- * * printhex4 * * Print an hexadecimal 4-digit number from the stack * ------------------------------------------------------------------------- */ - .globl printhex4 -printhex4: + +GPROC(printhex4) pushw %ax pushw %cx pushw %dx @@ -154,17 +148,15 @@ printhex4: popw %cx popw %ax retw $2 - - .size printhex4,.-printhex4 - .type printhex4,@function +END(printhex4) /* ------------------------------------------------------------------------- * * printhex8 * * Print an hexadecimal 8-digit number from the stack * ------------------------------------------------------------------------- */ - .globl printhex8 -printhex8: + +GPROC(printhex8) pushw %bp movw %sp,%bp pushw 6(%bp) @@ -173,19 +165,15 @@ printhex8: call printhex4 popw %bp retw $4 - - .size printhex8,.-printhex8 - .type printhex8,@function +END(printhex8) /* ------------------------------------------------------------------------- * * crlf * * Print a newline * ------------------------------------------------------------------------- */ - .globl crlf -crlf: + +GPROC(crlf) printmsg "\r\n" retw - - .size crlf,.-crlf - .type crlf,@function +END(crlf) |