New file - declaration of the table () function via _syscall3 (); due to a

1998-06-14  Martin Baulig  <martin@home-of-linux.org>

	* kernel.s: New file - declaration of the table () function
	via _syscall3 (); due to a bug in egcs, we cannot put this
	into a C file.
This commit is contained in:
Martin Baulig
1998-06-14 12:19:18 +00:00
committed by Martin Baulig
parent 23cccaf87f
commit 8f43551d68
3 changed files with 55 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
1998-06-14 Martin Baulig <martin@home-of-linux.org>
* kernel.s: New file - declaration of the table () function
via _syscall3 (); due to a bug in egcs, we cannot put this
into a C file.
1998-06-13 Martin Baulig <martin@home-of-linux.org>
The code in this directory fetches all information

View File

@@ -8,10 +8,16 @@ CFLAGS = -Wall -W @CFLAGS@
lib_LTLIBRARIES = libgtop_sysdeps.la
libgtop_sysdeps_la_SOURCES = init.c open.c close.c cpu.c mem.c swap.c \
libgtop_sysdeps_la_SOURCES = init.c open.c close.c kernel.s cpu.c mem.c swap.c \
uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c
include_HEADERS = glibtop_server.h
kernel.o kernel.lo: kernel.s
rm -f kernel.o kernel.lo
$(AS) -o kernel.o kernel.s
cp kernel.o kernel.lo

42
sysdeps/kernel/kernel.s Normal file
View File

@@ -0,0 +1,42 @@
.file "test.c"
.version "01.01"
/ GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release).
/ options passed: -O2 -Wall -W
/ options enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
/ -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole
/ -fforce-mem -ffunction-cse -finline -fkeep-static-consts -fcaller-saves
/ -fpcc-struct-return -frerun-cse-after-loop -frerun-loop-opt
/ -fschedule-insns2 -fcommon -fverbose-asm -fgnu-linker -fregmove
/ -falias-check -fargument-alias -m80387 -mhard-float -mno-soft-float
/ -mieee-fp -mfp-ret-in-387 -mschedule-prologue -mcpu=pentiumpro
/ -march=pentium
gcc2_compiled.:
.text
.align 4
.globl table
.type table,@function
table:
pushl %ebp
movl %esp,%ebp
movl $168,%eax
pushl %ebx
movl 8(%ebp),%ebx
movl 12(%ebp),%ecx
movl 16(%ebp),%edx
#APP
int $0x80
#NO_APP
testl %eax,%eax
jge .L3
negl %eax
movl %eax,errno
movl $-1,%eax
.L3:
movl -4(%ebp),%ebx
movl %ebp,%esp
popl %ebp
ret
.Lfe1:
.size table,.Lfe1-table
.ident "GCC: (GNU) egcs-2.90.29 980515 (egcs-1.0.3 release)"