This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Smpeg MMX asm compilation (problem)

Soul Studios wrote:
Thanks all-
how do you call macros in GNU as?- I've tried copying examples from the net but gas complains about the syntax.
Or do I need to be running the file through GCC instead to use the #define's?

Macros and defines are different things. I may have lead you to believe they are the same. Macros are handled by gas, but the #defines need to be ran through by a preprocessor. Since the file you are porting already has some #defines in it, the build system that project is using must be already taking care of that. But yes, the easiest way is to call the gcc driver on it. If the file extension is ".S" (uppercase), it knows it has to call the preprocessor, and then call the assembler.

A few more questions:
from mmxflags_asm.S:
What is .Lfe1?
Is it a register, a function call?

A local label. If I remember correctly, i386 mingw/cygwin uses "L" as local label prefix, while elf usually uses ".L" prefix. I suggest using a define for this too:

#ifdef __ELF__
# define LSYM(S) . ## S
# define LSYM(S) S

Pedro Alves

Is there a table somewhere for all the different "@" types and their respective int's (ie @object, @function, etc)?

And I'm now looking at*checkout*/cvs/smpeg/video/mmxidct_asm.S?rev=1.7
which's even more complicated. How do I go about converting something like this?

I am absolutely astounded at the lack of documentation on this stuff, on the web- usually when I'm researching something I can google it in about 15 minutes, even when it's relatively obscure-
but pages on differences between COFF/PE & ELF syntax are naught, and COFF pages seem scarce- any useful URL's you have would be... useful?
Thanks again,

Simplified example, from code found in some places in gnu sources:

#ifdef __ELF__
# define TYPE(x) .type x,@function
# define SIZE(x) .size x, . - x
# define TYPE(x) .def x; .scl 2; .type 32; .endef
# define SIZE(x)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]