2004-04-13 David Schleef <ds@schleef.org>
+ * gst/Makefile.am:
+ * gst/gstcpu.c: (gst_cpuid_i386): Convert asm source into inline
+ assembly.
+ * gst/gstcpuid_i386.s: remove
+
+2004-04-13 David Schleef <ds@schleef.org>
+
* docs/gst/tmpl/gstaggregator.sgml: Random checkin because gtk-doc
seems to think it needs to be done.
* docs/gst/tmpl/gstfakesink.sgml:
-Subproject commit dfbe01076ca09686d37a2816a7c884c5adedb7af
+Subproject commit c4fb9e5b7bc69f9420a0f008230e3028fdc2b097
noinst_LTLIBRARIES = libcothreads.la
endif
-if HAVE_CPU_I386
-GSTARCH_SRCS = gstcpuid_i386.s
-else
-GSTARCH_SRCS =
-endif
-
#GST_INSTRUMENT_FLAGS = -finstrument-functions -DGST_ENABLE_FUNC_INSTRUMENTATION
if GST_DISABLE_LOADSAVE
built_source_make = $(GST_ENUMTYPES_SRC) gstmarshal.c
EXTRA_libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
- gstcpuid_i386.s gstmarshal.list gstxml.c gstparse.c gsttrace.c
+ gstmarshal.list gstxml.c gstparse.c gsttrace.c
libgstreamer_@GST_MAJORMINOR@_la_SOURCES = \
gst.c \
#ifdef HAVE_CPU_I386
#define _gst_cpu_initialize_arch _gst_cpu_initialize_i386
-void gst_cpuid_i386 (int, unsigned long *, unsigned long *, unsigned long *,
- unsigned long *);
gboolean _gst_cpu_initialize_i386 (gulong * flags, GString * featurelist);
#else
#define _gst_cpu_initialize_arch _gst_cpu_initialize_none
}
#ifdef HAVE_CPU_I386
+static void
+gst_cpuid_i386 (int x, unsigned long *eax, unsigned long *ebx,
+ unsigned long *ecx, unsigned long *edx)
+{
+ unsigned long regs[4];
+
+asm (" cpuid\n" " movl %%eax, %0\n" " movl %%ebx, %1\n" " movl %%ecx, %2\n" " movl %%edx, %3\n":"=o" (regs[0]),
+ "=o" (regs[1]),
+ "=o" (regs[2]), "=o" (regs[3])
+: "a" (x)
+: "ebx", "ecx", "edx");
+
+ *eax = regs[0];
+ *ebx = regs[1];
+ *ecx = regs[2];
+ *edx = regs[3];
+}
+
gboolean
_gst_cpu_initialize_i386 (gulong * flags, GString * featurelist)
{
+++ /dev/null
- .text
-.globl gst_cpuid_i386
- .type gst_cpuid_i386,@function
-gst_cpuid_i386:
- pushl %ebp
- movl %esp,%ebp
- pushl %edi
- pushl %ebx
- pushl %ecx
- pushl %edx
- movl 8(%ebp),%eax
- cpuid
- movl 12(%ebp),%edi
- test %edi,%edi
- jz L1
- movl %eax,(%edi)
-L1: movl 16(%ebp),%edi
- test %edi,%edi
- jz L2
- movl %ebx,(%edi)
-L2: movl 20(%ebp),%edi
- test %edi,%edi
- jz L3
- movl %ecx,(%edi)
-L3: movl 24(%ebp),%edi
- test %edi,%edi
- jz L4
- movl %edx,(%edi)
-L4: popl %edx
- popl %ecx
- popl %ebx
- popl %edi
- movl %ebp,%esp
- popl %ebp
- ret
-