Bug 271042

Summary: VSX configure check fails when it should not
Product: [Developer tools] valgrind Reporter: Maynard Johnson <maynardj>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.7 SVN   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch to fix this bug

Description Maynard Johnson 2011-04-15 17:39:10 UTC
Created attachment 59013 [details]
Patch to fix this bug

Now that the initial (stage 1) POWER7 support patch has been accepted (see bug # 267630), I checked out the code from svn and tried to build it on a POWER7 system.  The config test for VSX failed with the following error:

	configure:7307: gcc -c -mvsx conftest.c >&5
	conftest.c: In function 'main':
	conftest.c:38:3: error: invalid 'asm': operand number missing after %-letter
	conftest.c:38:3: error: invalid 'asm': operand number missing after %-letter
	conftest.c:38:3: error: invalid 'asm': operand number missing after %-letter

The line in configure.in that it's complaining about is:
	__asm__ __volatile__("xsmaddadp %vs32, %vs32, %vs33" ::: "memory","cc");

The "%" should not be included, and we'd also need to add " -Wa,-regnames" to the compile line.  I'll attach a patch with this change, but alternatively, the line could simply be replaced with:

	__asm__ __volatile__("xsmaddadp 32, 32, 33" ::: "memory","cc");
Comment 1 Julian Seward 2011-04-15 23:09:31 UTC
>     __asm__ __volatile__("xsmaddadp 32, 32, 33" ::: "memory","cc");

I committed this as r11699.  Yell if it still doesn't work.