diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-06-04 18:44:09 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-06-04 18:44:09 +0000 |
commit | 4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b (patch) | |
tree | acd4001a266a8713495af7f1b2102b61e67113b0 /mdk-stage1/dietlibc/i386/write12.S | |
parent | 71b111ec6c4671667a19c6fbe0023d33422535d7 (diff) | |
download | drakx-4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b.tar drakx-4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b.tar.gz drakx-4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b.tar.bz2 drakx-4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b.tar.xz drakx-4cd6a4a5d7e49d54d53dcf4a6f3393d50bd88e8b.zip |
Import dietlibc 0.22 + other fixes for AMD64
Diffstat (limited to 'mdk-stage1/dietlibc/i386/write12.S')
-rw-r--r-- | mdk-stage1/dietlibc/i386/write12.S | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/i386/write12.S b/mdk-stage1/dietlibc/i386/write12.S new file mode 100644 index 000000000..a40f63a86 --- /dev/null +++ b/mdk-stage1/dietlibc/i386/write12.S @@ -0,0 +1,37 @@ +#include "PIC.h" + +.text + +.global __write1 +.type __write1,@function + +.global __write2 +.type __write2,@function + + # regparm=1, daher Stringadresse in %eax +__write2: + clc # CY = 0 + .byte 0xB2 # zusammen mit nächstem Byte: mov dl,0xF9 +__write1: + stc # CY = 1 + sbbl %ecx,%ecx # __write2: ecx=0, __write1: ecx=-1 + incl %ecx + incl %ecx # __write2: ecx=2, __write1: ecx=1 + xorl %edx,%edx + decl %edx +.Lnext: incl %edx + cmpb %ch,(%edx,%eax) # ch=0, da bei beiden Filedescriptoren Bits 15:8 0 sind + jnz .Lnext # Stringlänge in edx, ohne eax zerstört zu haben + PIC_SAVE # non-PIC: empty line + PIC_INIT # non-PIC: empty line + pushl %edx + pushl %eax + pushl %ecx +#ifdef __DYN_LIB + call write@PLT +#else + call write # alles ruf uf dn Stack und ab damit +#endif + addl $12,%esp # und das leidvolle Putzen + PIC_RESTORE # non-PIC: empty line + ret |