summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/i386/ltostr.S
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2004-02-20 00:03:26 +0000
committerMystery Man <unknown@mandriva.org>2004-02-20 00:03:26 +0000
commit959a1722faec6b30510c788c49dcb4b7cb96d1e0 (patch)
tree8d25ea2b09098078292e7dcda489471a30b4e81a /mdk-stage1/dietlibc/i386/ltostr.S
parent0413d7133026a6cddf226027ebdfee6fa68890f7 (diff)
downloaddrakx-backup-do-not-use-959a1722faec6b30510c788c49dcb4b7cb96d1e0.tar
drakx-backup-do-not-use-959a1722faec6b30510c788c49dcb4b7cb96d1e0.tar.gz
drakx-backup-do-not-use-959a1722faec6b30510c788c49dcb4b7cb96d1e0.tar.bz2
drakx-backup-do-not-use-959a1722faec6b30510c788c49dcb4b7cb96d1e0.tar.xz
drakx-backup-do-not-use-959a1722faec6b30510c788c49dcb4b7cb96d1e0.zip
This commit was manufactured by cvs2svn to create tag 'V10_0_21mdk'.V10_0_21mdk
Diffstat (limited to 'mdk-stage1/dietlibc/i386/ltostr.S')
-rw-r--r--mdk-stage1/dietlibc/i386/ltostr.S62
1 files changed, 0 insertions, 62 deletions
diff --git a/mdk-stage1/dietlibc/i386/ltostr.S b/mdk-stage1/dietlibc/i386/ltostr.S
deleted file mode 100644
index ddf85a4f6..000000000
--- a/mdk-stage1/dietlibc/i386/ltostr.S
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- Copyright (C) 2002 Thomas M. Ogrisegg
-
- __ltostr.S -- convert an integer into a string
-
- %eax = dividend
- %ebx = divisor
- %ecx = size of output-buffer
- %edi = output-buffer
- %ebp = if uppercase is set, then %ebp is 'A'-10 else %ebp is 'a'-10
-
-*/
-
-.text
-.globl __ltostr
-__ltostr:
- pushl %esi
- pushl %edi # destination
- pushl %ebp
- pushl %ebx
- movl %esp, %eax
- movl 0x14(%eax), %edi
- movl 0x18(%eax), %ecx # size
- movl 0x20(%eax), %ebx # divisor
- movl 0x1c(%eax), %eax # dividend
- decl %ecx
- movl %ecx, %esi
- movl $('A'-0xa), %ebp
- xorl %edx, %edx # must be 0 -- used by idiv
- cmpl $0x0, 36(%esp) # check for uppercase
- jnz .Lnext
- addl $0x20, %ebp # set lowercase
-.Lnext:
- idiv %ebx, %eax
- cmpb $0x9, %dl
- jg .Lnext2
- addb $'0', %dl
- jmp .Lstos
-.Lnext2:
- addl %ebp, %edx
-.Lstos:
- movb %dl, (%edi, %ecx)
- xorl %edx, %edx
- decl %ecx
- jz .Lout
- orl %eax, %eax
- jnz .Lnext
-.Lout:
- cld
- movl %esi, %ebx
- leal 1(%edi, %ecx), %esi
- subl %ebx, %ecx
- negl %ecx
- movl %ecx, %eax
- repnz movsb
- movb $0x0, (%edi)
- popl %ebx
- popl %ebp
- popl %edi
- popl %esi
- ret
-.size __ltostr, . - __ltostr