File:  [DVB] / dietlibc / i386 / write12.S
Revision 1.3: download - view: text, annotated - select for diffs
Mon Feb 25 16:00:50 2002 UTC (22 years, 3 months ago) by olaf
Branches: MAIN
CVS tags: finnland_test_200301, branch_rc14_fieldtest_finnland, branch_rc13_fieldtest_finnland, branch_rc12_fieldtest_finnland, branch_rc10_fieldtest_finnland, RELEASE_finnland_200301_1, RC12_FIELDTEST_FINNLAND, RC10_FIELDTEST_FINNLAND, HEAD
Assembler and PIC code the source of all evel in the dynamic-section....
Added a helper for x86 and modified the assembler sources (now the
libdietc.so is NON textrel again....). S390 fixed a typo.
Fixed diet so dynamic binaries uses the "correct" dynamic-linker...

#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

LinuxTV legacy CVS <linuxtv.org/cvs>