Bug 33433 - .type directives in glapi_x86.S miss required @ character
Summary: .type directives in glapi_x86.S miss required @ character
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) All
: medium normal
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2011-01-24 14:13 UTC by Dimitry Andric
Modified: 2011-01-25 08:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Add @ char before type specifier (1.08 KB, application/octet-stream)
2011-01-24 14:13 UTC, Dimitry Andric

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric 2011-01-24 14:13:58 UTC
Created attachment 42410 [details]
Add @ char before type specifier

While building Mesa with the trunk version of clang, using its
integrated assembler, it complains about the .type directives in

clang -c -I. -I../../../include -I../../../include/GL/internal -I../../../src/mesa -I../../../src/mesa/glapi -I/usr/local/include -I/usr/local/include/drm   -I/usr/local/include   -D_THREAD_SAFE -I/usr/local/include   -I/usr/local/include -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER -DDEFAULT_DRIVER_DIR=\"/usr/local/lib/dri\"  ../../../src/mesa/x86/glapi_x86.S -o ../../../src/mesa/x86/glapi_x86.o
/tmp/cc-vj1ww7.s:30:50: error: expected '@' or '%' before type
 .balign 16; .globl glNewList ; .type glNewList, function; glNewList: movl _glapi_Dispatch,%eax ; testl %eax,%eax ; je 1f ; jmp *4 * 0(%eax) ; 1: call _x86_get_dispatch ; jmp *4 * 0(%eax)

These .type directives are expanded from the GLOBL_FN macro in the same

#define GLOBL_FN(x) GLOBL x ; .type x, function

However, the actual type specifier following the comma should normally
be preceded by an '@' character.  For reference, see the binutils
documentation about the .type directive here:


Most of the other .S files in Mesa also use an '@' character, so I would
like to propose to do the same here, for portability between assemblers.
Since this particular .S file seems to be generated from gl_x86_asm.py,
I have also updated that script to match.
Comment 1 Brian Paul 2011-01-25 08:25:05 UTC
Thanks.  I'm committing your patch (commit 37bffe8d128bd00343169188c9af4852bbd4783e)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.