Brian Budge | 1 Jan 2010 01:14
Picon

Re: Correct way to make a 16-byte aligned double* for SSE vectorization?

I see, so you want the function to be compiled as though the pointers
are guaranteed to point to 16-byte-aligned addresses.  This is an
interesting question.  I'll be following this too :)

  Brian

On Thu, Dec 31, 2009 at 12:27 PM, Benjamin Redelings I
<benjamin_redelings <at> ncsu.edu> wrote:
> On 12/31/2009 08:41 AM, Brian Budge wrote:
>>
>> The reason it won't work is that you're saying the pointer itself
>> needs to be 16 (or 8) byte aligned.  You need the address that the
>> pointer points to to be aligned.
>>
>> On the stack:
>>
>> __attribute__ ((aligned(16)) real myArray[32];
>>
>> On the heap (*nix):
>> real *myArray;
>> posix_memalign((void**)&myArray, 16, 32 * sizeof(real));
>>
>> or for more portability you could use the SSE intrinsic mm_malloc.
>>
>> To know why the one version you posted works, we'd need to see the
>> calling code of f.   In general, it shouldn't work if malloc or new
>> are used to allocate the memory passed in, but it might be that the
>> memory is allocated on the stack?
>>
>>   Brian
(Continue reading)

Jason Carson | 1 Jan 2010 07:36
Picon

Native or Core2

Hello,

I've searched the archives, Google and the Gentoo forums but I can't find
an answer to this question. The Gentoo wiki mentions the core i7 but no
mention of the core i5.

I am putting together a system using a Core i5 CPU with Gentoo Linux. Does
GCC support Core i5 CPU using -march=native or should I use -march=core2.

Thanks

Jason Carson | 1 Jan 2010 07:39
Picon

Re: Native or Core2

> Hello,
>
> I've searched the archives, Google and the Gentoo forums but I can't find
> an answer to this question. The Gentoo wiki mentions the core i7 but no
> mention of the core i5.
>
> I am putting together a system using a Core i5 CPU with Gentoo Linux. Does
> GCC support Core i5 CPU using -march=native or should I use -march=core2.
>
> Thanks
>
>
I guess I should mention that Gentoo currently uses GCC 4.3.4

david frost | 1 Jan 2010 13:36
Picon
Favicon

building gcc-4.4.2 toolchain host linux x86_64 target arm

hello,

Im trying to build myself an arm toolchain that will run on my standard 
linux box (the x86_64 machine).  Im not quite there yet.  Here are my 
thoughts and process, se if you can spot the problem.

First i need to build binutils that will un on my machine, but link for 
the arm, i used
../binutils-2.20/configure --target=arm-elf --prefix=/usr/devel/arm-kit/ 
--disable-nls --disable-werror

(i ran this comand from in my binutils-build directory).

That ran fine, and now i have my linker and other bits to create my arm 
executables on my x86_64 machine.

next was gcc, this was a little tricky, i used gcc-4.4.2, i finally got 
it working with a bit of jigery pokery, with this command:

AS_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-as 
AR_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-ar 
LD_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-ld 
NM_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-nm 
OBJDUMP_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-objdump 
RANLIB_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-ranlib 
STRIP_FOR_TARGET=/usr/devel/arm-kit/bin/arm-elf-strip 
../gcc-4.4.2/configure     --target=arm-elf --prefix=/usr/devel/arm-kit/ 
--disable-multilib --disable-decimal-float --disable-threads 
--disable-libmudflap --disable-libssp --disable-libgomp  
--enable-languages=c
(Continue reading)

Oman Nadeem | 1 Jan 2010 15:43
Picon
Favicon

C++ exception handling problem with GNU PPC‏


Hello, 

I am having a problem with exception handling for C++ on GNU PPC Tools (MPC8xx platform). 

When I call "throw" from "try" block in my test application to raise an exception the control goes in the
following way and traps into "abort" on returning NULL from _Unwind_Find_FDE function. 

 __cxa_throw
 __Unwind_RaiseException
 uw_init_context_1
 uw_frame_state_for
 Unwind_Find_FDE ("seen_objects" and "unseen_objects" are NULL so return NULL)

 
Am I missing any switch or initialization related to c++/exception handling?  Any help will be highly
appreciated. 

Regards

Oman 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

Tim Prince | 1 Jan 2010 16:26
Picon
Favicon

Re: Native or Core2

Jason Carson wrote:
>> Hello,
>>
>> I've searched the archives, Google and the Gentoo forums but I can't find
>> an answer to this question. The Gentoo wiki mentions the core i7 but no
>> mention of the core i5.
>>
>> I am putting together a system using a Core i5 CPU with Gentoo Linux. Does
>> GCC support Core i5 CPU using -march=native or should I use -march=core2.
>>

> I guess I should mention that Gentoo currently uses GCC 4.3.4
> 
If you like -march=native for Core I7, it should work the same on Core I5.
I've used only x86_64 on Core I7, generally setting -mtune=barcelona 
-funroll-loops --param -unroll-times=4 -msse4
If your gcc isn't new enough to support those options, obviously Core I5 
wasn't available when it was written up.

Andrew Haley | 1 Jan 2010 17:28
Picon
Favicon

Re: C++ exception handling problem with GNU PPC‏

On 01/01/2010 02:43 PM, Oman Nadeem wrote:

> I am having a problem with exception handling for C++ on GNU PPC
> Tools (MPC8xx platform).
>  
> When I call "throw" from "try" block in my test application to raise
> an exception the control goes in the following way and traps into
> "abort" on returning NULL from _Unwind_Find_FDE function.
>  
>  __cxa_throw
>  __Unwind_RaiseException
>  uw_init_context_1
>  uw_frame_state_for
>  Unwind_Find_FDE ("seen_objects" and "unseen_objects" are NULL so return NULL)
>  
>  
> Am I missing any switch or initialization related to c++/exception
> handling?

No, this is one of the things that should "just work".  As long as
you're compling with g++, the right libraries and compile options will
be selected by default.  It may be that you have an incompatible set
of libraries installed, or that your compiler is broken.

Andrew.

Fredrik Svahn | 1 Jan 2010 20:24
Picon

Perfomance regression on AMD with gcc 4.4

Hi,

When compiling a program with computed goto:s with gcc 4.4.2 it runs
significantly slower (up to a factor 10) than when it is compiled with
e.g. gcc 4.1/4.3 with -O2/-O3 optimization flags. A small dummy test
program without header file dependencies is attached.

I am compiling with a commandline like "gcc -O3 test.c -o
testp.4.4.2", and run the generated executable without arguments, like
"./testp.4.4.2". Generating cpu specific instructions, e.g.
"-march=athlon64" seems to make no difference. I have also tried with
"-fno-gcse" (as recommended in the docs) to no avail. Same results
with targets x86_64 and i686 on Novell SLES and Arch Linux.

Interestingly enough I do not see this problem on any Intel processor
I have tried, but I have seen the slowdown on all AMD processors I
have tried (e.g. Dual-Core AMD Opteron Processor 2216 and AMD Turion
64 X2 Mobile Technology TL-60). In fact, the exact same two binaries
resulting from compilation with gcc 4.4.2 and gcc 4.3 for i686 which
show a significant performance difference on an AMD will not show any
significant difference on an Intel Core 2 Duo T7500.

Some observations:

1. On AMD there is a huge difference in the number of mispredicted
branches between the program compiled with gcc-4.4.2 and the program
compiled with earlier compilers. See for instance the following output
from oprofile:

Counted RETIRED_INDIRECT_BRANCHES_MISPREDICTED events (Retired
(Continue reading)

Patrick Horgan | 2 Jan 2010 07:10
Picon
Favicon

I'm on why typeid isn't recognized

Building with these arguments:

g++ -fPIC -g -O0 -Wall -std=c++0x

I get this error:

/include/element.hh:101:26: error: ISO C++ forbids declaration of 
‘typeof’ with no type
.../include/element.hh:101:28: error: expected ‘;’ before ‘differenceType’

Here's line 101:

typedef typeof(T() - T()) differenceType;

I've tried to create a small program to reproduce it but can't make it 
fail! I build my example with the same arguments as the big one.

template<typename T>
struct foo
{
typedef typeof(T()-T()) difference_type;
};

int main()
{
foo<int> f;
}

tlcoons | 3 Jan 2010 03:43

Getting GCC for i386 PC Fedora Linux

Hello:
I am having trouble getting the binaries for Intel i386 PC running Fedora Linux.
I found the differential source files for version 4.4.2.
I can't find the complete gcc source code or the binaries.
Thanks for your help.
Sincerely,
Terry L. Coons


Gmane