fpc/tests/webtbs/tw2998.pp
Jonas Maebe b546eeff6c * sse operands have to aligned to 16 instead of 8 byte boundaries
* fixed alignment directive in the code

git-svn-id: trunk@9457 -
2007-12-15 15:14:20 +00:00

26 lines
425 B
ObjectPascal

{ %cpu=i386 }
{ %OPT=-OaVARMIN=16 -Cg- }
{ Source provided for Free Pascal Bug Report 2998 }
{ Submitted by "bartek" on 2004-03-02 }
{ e-mail: bbartek@gmx.net }
{$asmmode intel}
program SSE_test;
uses
mmx;
type
vector4 = array[0..3] of single;
{$codealign varmax 16}
var
a,b,c :vector4;
begin
if is_sse_cpu then
asm
movups xmm0, [a]
addps xmm0,[b]
movups [c], xmm0
end;
end.