This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Smpeg MMX asm compilation (problem)
- From: "Matthew Bentley" <moc dot pophot at hotpop dot com>
- To: <binutils at sourceware dot org>
- Date: Sun, 20 Aug 2006 12:30:55 +1200
- Subject: Smpeg MMX asm compilation (problem)
Hi Guys,
I'm working on SMPEG, putting a bunch of optimizations into the
code- can't get any of the assembler code to compile tho'-
I'm building under msys, mingw. Please look at the following code and let me
know what I'm doing wrong:
http://cvs.icculus.org/*checkout*/cvs/smpeg/video/mmxflags_asm.S?rev=1.6
"#if defined(i386) && defined(USE_MMX)
.text
.align 4
.globl cpu_flags
.type cpu_flags,@function
cpu_flags:
pushfl
popl %eax
movl %eax,%ecx
xorl $0x040000,%eax
pushl %eax
popfl
pushfl
popl %eax
xorl %ecx,%eax
jz cpu_flags.L1 # Processor is 386
pushl %ecx
popfl
movl %ecx,%eax
xorl $0x200000,%eax
pushl %eax
popfl
pushfl
popl %eax
xorl %ecx,%eax
je cpu_flags.L1
pushl %ebx
movl $1,%eax
cpuid
movl %edx,%eax
popl %ebx
cpu_flags.L1:
ret
.Lfe1:
.size cpu_flags,.Lfe1-cpu_flags
#endif /* i386 && USE_MMX */
#ifdef __ELF__
.section .note.GNU-stack,"",%progbits
#endif
"
Here's the error I get back:
video/mmxflags_asm.S: Assembler messages:
video/mmxflags_asm.S:7: Warning: .type pseudo-op used outside of .def/.endef
ign
ored.
video/mmxflags_asm.S:7: Error: junk at end of line, first unrecognized
character
is `c'
video/mmxflags_asm.S:49: Warning: .size pseudo-op used outside of
.def/.endef ig
nored.
video/mmxflags_asm.S:49: Error: junk at end of line, first unrecognized
characte
r is `c'
make: *** [mmxflags_asm.lo] Error 1"
Now I'm pretty new to make etc- but I've hunted the internet up and down,
and the msot informative page I could find was this:
http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml :and it doesn't
tell me how to fix the errors in the more recent code, only the old stuff
(which, by the way, won't compile either):
any help you could give would be much appreciated-
Cheers,
M@