[MPlayer-dev-eng] symbol mangling prob on win32
Felix Buenemann
atmosfear at users.sourceforge.net
Thu Jan 17 00:40:39 CET 2002
Hi,
I just found out, that on win32 there's a prob with the symbol mangling of
variables used inside inline asm, here's an example with (one way) to fix:
#include <stdio.h>
#include <inttypes.h>
static const uint64_t bFF __attribute__((aligned(8))) =
0xFFFFFFFFFFFFFFFFULL;
#ifndef __CYGWIN__
#define _bFF "bFF"
#else
#define _bFF "_bFF"
#endif
int main(void) {
asm volatile("movq "_bFF", %%mm0;":::"memory");
printf("bFF: %lld\n", bFF);
return 0;
}
What do you think, is the best way to handle the problem (var in inline asm
on win32 must be _var, but outside inline asm stays var)?
IMHO redefining symbolnames with objcopy is not possible here, as it would
probably only reverse the problem, when both var and var inside asm are used
in same object file, at least it didn't work when I tested it.
Maybe we could directly insert varvalues into code, I think it's all const
values, but I'm not sure alignment is correct then.
--
Best Regards,
Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________
More information about the MPlayer-dev-eng
mailing list