[Theora-dev] [PATCH] promised MMX patches rc1

Ralph Giles giles at xiph.org
Sun Apr 10 23:10:13 PDT 2005


Ruik,

Forgive my ignorance, but I was trying to get your patches (or rather, 
current svn of theora-exp) to compile on a x86_64 (recent Xeon) machine, 
but gas dies on the inline assembly. Any idea what's going on here? I 
haven't paid attention to x86 assembly in a long, long time. :)

gcc -I../include `sdl-config --cflags` -D_REENTRANT -O3 -fforce-addr 
-fomit-frame-pointer -DOC_X86ASM -c -o objs/x86/mmxstate.o 
../lib/x86/mmxstate.c
/tmp/ccGX8KWl.s: Assembler messages:
/tmp/ccGX8KWl.s:47: Error: `(%rdx,%r8d)' is not a valid base/index expression
/tmp/ccGX8KWl.s:48: Error: `(%rdx,%r8d,2)' is not a valid base/index expression
/tmp/ccGX8KWl.s:49: Error: `(%rdx,%esi)' is not a valid base/index expression
/tmp/ccGX8KWl.s:51: Error: `(%rax,%r11d)' is not a valid base/index expression
/tmp/ccGX8KWl.s:52: Error: `(%rdx,%r8d,4)' is not a valid base/index expression
/tmp/ccGX8KWl.s:53: Error: `(%rax,%r11d,2)' is not a valid base/index expression
/tmp/ccGX8KWl.s:54: Error: `(%rax,%edi)' is not a valid base/index expression
/tmp/ccGX8KWl.s:55: Error: `(%rax,%r11d,4)' is not a valid base/index expression
/tmp/ccGX8KWl.s:57: Error: `(%rdx,%r8d)' is not a valid base/index expression
/tmp/ccGX8KWl.s:58: Error: `(%rdx,%r8d,2)' is not a valid base/index expression
/tmp/ccGX8KWl.s:59: Error: `(%rdx,%esi)' is not a valid base/index expression
/tmp/ccGX8KWl.s:61: Error: `(%rax,%r11d)' is not a valid base/index expression
/tmp/ccGX8KWl.s:62: Error: `(%rax,%r11d,2)' is not a valid base/index expression
/tmp/ccGX8KWl.s:63: Error: `(%rax,%edi)' is not a valid base/index expression
make: *** [objs/x86/mmxstate.o] Error 1


I've attached the output of gcc -S as well, in case that helps.

 -r
-------------- next part --------------
	.file	"mmxstate.c"
	.text
	.p2align 4,,15
.globl oc_state_frag_copy_mmx
	.type	oc_state_frag_copy_mmx, @function
oc_state_frag_copy_mmx:
.LFB18:
	pushq	%rbp
.LCFI0:
	movq	%rdi, %r10
	movslq	%r8d,%rdi
	movslq	%r9d,%rbp
	pushq	%rbx
.LCFI1:
	movslq	%ecx,%rbx
	movslq	656(%r10,%rdi,4),%rcx
	movslq	656(%r10,%rbx,4),%rax
	leaq	(%rbp,%rbp,2), %r9
	salq	$3, %r9
	leaq	0(,%rcx,8), %rdi
	leaq	0(,%rax,8), %rbx
	leaq	(%rax,%rbx), %r11
	movslq	%edx,%rax
	leaq	(%r9,%r11,8), %rbp
	movl	680(%r10,%rbp), %r11d
	leaq	(%rcx,%rdi), %rbp
	leaq	(%r9,%rbp,8), %rcx
	leaq	(%rsi,%rax,4), %rbp
	cmpq	%rbp, %rsi
	movl	680(%r10,%rcx), %r8d
	movq	%rsi, %rcx
	jae	.L8
	movq	%rdi, %r9
	.p2align 4,,7
.L6:
	movslq	(%rcx),%rsi
	movq	208(%r10), %rdx
	leaq	0(,%rsi,8), %rdi
	subq	%rsi, %rdi
	leaq	8(%rdx,%rdi,8), %rsi
	movq	(%rsi,%rbx), %rax
	movq	(%rsi,%r9), %rdx
#APP
	  lea         (%r8d, %r8d, 2), %esi   
	  movq        (%rdx),        %mm0   
	  lea         (%r11d, %r11d, 2), %edi   
	  movq        (%rdx, %r8d),    %mm1   
	  movq        (%rdx, %r8d, 2), %mm2   
	  movq        (%rdx, %esi), %mm3   
	  movq        %mm0,       (%rax)    
	  movq        %mm1,       (%rax, %r11d)
	  lea         (%rdx,%r8d,4),   %rdx      
	  movq        %mm2,       (%rax, %r11d, 2)      
	  movq        %mm3,       (%rax, %edi)      
	  lea         (%rax,%r11d,4),   %rax      
	  movq        (%rdx),        %mm0   
	  movq        (%rdx, %r8d),    %mm1   
	  movq        (%rdx, %r8d, 2), %mm2   
	  movq        (%rdx, %esi), %mm3   
	  movq        %mm0,       (%rax)    
	  movq        %mm1,       (%rax, %r11d)
	  movq        %mm2,       (%rax, %r11d, 2)     
	  movq        %mm3,       (%rax, %edi)     
	
#NO_APP
	addq	$4, %rcx
	cmpq	%rbp, %rcx
	jb	.L6
.L8:
#APP
	emms
	
#NO_APP
	popq	%rbx
	popq	%rbp
	ret
.LFE18:
	.size	oc_state_frag_copy_mmx, .-oc_state_frag_copy_mmx
	.section	.eh_frame,"a", at progbits
.Lframe1:
	.long	.LECIE1-.LSCIE1
.LSCIE1:
	.long	0x0
	.byte	0x1
	.string	""
	.uleb128 0x1
	.sleb128 -8
	.byte	0x10
	.byte	0xc
	.uleb128 0x7
	.uleb128 0x8
	.byte	0x90
	.uleb128 0x1
	.align 8
.LECIE1:
.LSFDE1:
	.long	.LEFDE1-.LASFDE1
.LASFDE1:
	.long	.LASFDE1-.Lframe1
	.quad	.LFB18
	.quad	.LFE18-.LFB18
	.byte	0x4
	.long	.LCFI0-.LFB18
	.byte	0xe
	.uleb128 0x10
	.byte	0x86
	.uleb128 0x2
	.byte	0x4
	.long	.LCFI1-.LCFI0
	.byte	0xe
	.uleb128 0x18
	.byte	0x83
	.uleb128 0x3
	.align 8
.LEFDE1:
	.section	.note.GNU-stack,"", at progbits
	.ident	"GCC: (GNU) 3.3.4 (pre 3.3.5 20040809)"


More information about the Theora-dev mailing list