Ian Romanick wrote:
Mike Mestnik wrote:
--- Ian Romanick <[EMAIL PROTECTED]> wrote:

Assembly dispatch stubs are only generated for x86 and SPARC. It looks like the #if test in dispatch.c is wrong, so that stubs don't even get used on SPARC. In any case, Jakub's patch did modify the x86 assembly, not the C version. I wasn't really clear about that before. My proposal is to modify the C version, the x86 assembly version, and the SPARC assembly version. I've worked up a patch to gl_x86_asm.py that I can post on Monday.

Just to get every one on the same page. The SPARC assembly version is
only for solaris. It dose not, and can not, even build on linux! Last
time I checked DRI would not build on SPARC/Linux, crashing on the Solaris
ASM code.

Does the code in src/mesa/glapi/glapi.c (generate_entrypoint specifically) cause the crash or just the code in src/mesa/sparc/glapi_sparc.S? My guess is that Linux uses 32-bit user-mode, but the asm code in glapi_sparc.S defaults to 64-bit on v9. Perhaps we could come up with a better define, such as USE_SPARC_32BIT_USER to determine which stubs to build.

I just committed a version of the entrypoint generator script based on the new XML Python code. I played around with the output of that on a SPARC based "SunOS 5.9" (from uname) box. It looks like when 64-bit binaries are generated (i.e., -m64 is used), __arch64__ is defined. If 32-bit binaries are generated it is not defined. This was true with GCC 2.95.2, 3.0, and 3.3. It turned out that __sparc_v9__ was *never* defined, even if -mcpu=v9 was supplied.


None of the SPARC systems that I have access to have Sun's compiler installed, so I don't know if that also defined __arch64__ when building 64-bit binaries.

If SPARC Linux also gets the __arch64__ treatment, I'd suggest that we use that determine which version of the stub to use instead of a combination of __sparc_v9__ and __linux__.




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to