Handle 8-byte value-check failures using a special fast-case fn (like

0,1,4 sized) rather than the generic one.  Remove size 2 since that
never seems to get used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3545
This commit is contained in:
Julian Seward 2005-04-23 22:38:38 +00:00
parent 59505fcb00
commit c0967c9762
3 changed files with 13 additions and 6 deletions

View File

@ -55,8 +55,8 @@ extern Bool MC_(clo_avoid_strlen_errors);
/* Functions defined in mc_main.c */
extern VGA_REGPARM(1) void MC_(helperc_complain_undef) ( HWord );
extern void MC_(helperc_value_check8_fail) ( void );
extern void MC_(helperc_value_check4_fail) ( void );
extern void MC_(helperc_value_check2_fail) ( void );
extern void MC_(helperc_value_check1_fail) ( void );
extern void MC_(helperc_value_check0_fail) ( void );

View File

@ -1493,16 +1493,16 @@ void MC_(helperc_value_check1_fail) ( void )
MC_(record_value_error) ( VG_(get_running_tid)(), 1 );
}
//zz void MC_(helperc_value_check2_fail) ( void )
//zz {
//zz MC_(record_value_error) ( VG_(get_running_tid)(), 2 );
//zz }
void MC_(helperc_value_check4_fail) ( void )
{
MC_(record_value_error) ( VG_(get_running_tid)(), 4 );
}
void MC_(helperc_value_check8_fail) ( void )
{
MC_(record_value_error) ( VG_(get_running_tid)(), 8 );
}
VGA_REGPARM(1) void MC_(helperc_complain_undef) ( HWord sz )
{
MC_(record_value_error) ( VG_(get_running_tid)(), (Int)sz );

View File

@ -702,6 +702,13 @@ static void complainIfUndefined ( MCEnv* mce, IRAtom* atom )
mkIRExprVec_0()
);
break;
case 8:
di = unsafeIRDirty_0_N( 0/*regparms*/,
"MC_(helperc_value_check8_fail)",
&MC_(helperc_value_check8_fail),
mkIRExprVec_0()
);
break;
default:
di = unsafeIRDirty_0_N( 1/*regparms*/,
"MC_(helperc_complain_undef)",