Created attachment 42345 [details] Change movzxw to movzwl in read_rgba_span_x86.S While building Mesa with the trunk version of clang, using its integrated assembler, it complains about the 'movzxw' mnemonic in src/mesa/x86/read_rgba_span_x86.S: clang -c -I../../include -I../../src/mesa -I../../src/mesa/main -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 x86/read_rgba_span_x86.S -o x86/read_rgba_span_x86.o /tmp/cc-iXYqNz.s:528:2: error: invalid instruction mnemonic 'movzxw' movzxw (%eax), %ecx ^ This mnemonic is accepted by GNU as, but disassembling the relevant part of a .o file produced by it, gives: 436: 66 0f b7 08 movzww (%eax),%cx This is a really weird opcode, apparently moving a word to a word, without zero extending anything. An Intel disassembler gives: 00000466: 66 0F B7 08 movzx cx,word ptr [eax] Since the source code in question says: /* At this point there can be at most 1 pixel left to process. * Process it if needed. */ and it is about 16-bit RBG565 pixels, it seems most likely a move from a word to a dword with zero extension was intended, e.g.: ... /* At this point there can be at most 1 pixel left to process. * Process it if needed. */ testl $0x01, %ecx je .L01 movzwl (%eax), %ecx /* opcodes: 0f b7 08 */ movd %ecx, %mm4 pshufw $0x00, %mm4, %mm0 ... which in Intel syntax would be: "movzx ecx,word ptr [eax]".
I believe Ian's the original author of that code. Reassigning.
I'm committing this one too since it sounds like the same story as 33388. Commit 811ee32a9ef177bec46c82692eeac8bc7297753c
bug/show.html.tmpl processed on Mar 20, 2017 at 09:48:40. (provided by the Example extension).