* disable sse/mmx fastmode code in case of valgrind usage

git-svn-id: trunk@5342 -
This commit is contained in:
florian 2006-11-12 16:54:44 +00:00
parent 951eddfd85
commit 90787bb436
2 changed files with 15 additions and 0 deletions

View File

@ -407,6 +407,11 @@ implementation
new_section(current_asmdata.asmlists[al_globals],sec_data,'__heapsize',sizeof(aint));
current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('__heapsize',AT_DATA,sizeof(aint)));
current_asmdata.asmlists[al_globals].concat(Tai_const.Create_aint(heapsize));
{ Initial heapsize }
maybe_new_object_file(current_asmdata.asmlists[al_globals]);
new_section(current_asmdata.asmlists[al_globals],sec_data,'__fpc_valgrind',sizeof(boolean));
current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('__fpc_valgrind',AT_DATA,sizeof(boolean)));
current_asmdata.asmlists[al_globals].concat(Tai_const.create_8bit(byte(cs_gdb_valgrind in current_settings.globalswitches)));
end;

View File

@ -830,9 +830,19 @@ end;
{$endif INTERNALMOVEFILLCHAR}
{$asmmode att}
{$ifdef FPC_HAS_VALGRINDBOOL}
var
valgrind_used : boolean;external name '__fpc_valgrind';
{$endif FPC_HAS_VALGRINDBOOL}
procedure setup_fastmove;{$ifdef SYSTEMINLINE}inline;{$endif}
begin
{$ifdef FPC_HAS_VALGRINDBOOL}
{ workaround valgrind bug }
if valgrind_used then
exit;
{$endif FPC_HAS_VALGRINDBOOL}
if has_sse_support then
begin
fastmoveproc_forward:=@Forwards_SSE_3;