Re: Modifying the values of Gimple Instruction Operands

2013-09-07 Thread tturhan
Thank you very much Richard,

Very good starter for me but I am actually having the hardest time with
variables, pointers etc...

I know this may be a lot to ask but,
If you could help me with this I will very much appreciate it.

Thanks again very much!
I will be sure to include your name in my paper :)

> On Tue, Sep 3, 2013 at 7:59 PM,   wrote:
>> Sorry forgot to mention, my name is Tuncer.
>> Again any help would be much appreciated.
>> I know these maybe simple for some of you if you could lend me a hand, you
>> will be doing a great deal of help.
>> Changed the subject for better understanding,
>> Thanks again guys :)
> Something like
>oldop = gimple_assign_rhs1 (stmt);
>gsi = gsi_for_stmt (stmt);
>newop = force_gimple_operand_gsi (&gsi, fold_build2 (BIT_IOR_EXPR,
> TREE_TYPE (oldop), oldop, build_int_cst (TREE_TYPE (oldop), 1<<3)),
true, NULL_TREE, true, GSI_CONTINUE_LINKING);
>gimple_assign_set_rhs1 (stmt, newop);
>update_stmt (stmt);
>>> Hi,
>>> I am a student at Bilkent Uni. in Turkey and using GCC as a tool for
my
>>> M.S. Thesis which is about Software Fault Tolerance.
>>> I am stuck, in terms of implementing bit flips in the operands of a
gimple
>>> statement.
>>> I need to inject bit flips to all kinds of operands, constant
integers,
>>> floats, variables, pointers etc...
>>> It is simpler for constants, but I am having a hard time to get the value
>>> of pointers and other variables.
>>> My objective is to simply change the value of a tree operand, by
injecting
>>> a new instruction that changes the value or directly change the
operand
>>> to
>>> a bit flipped value.
>>> For constant integers I did something like this:
>>> int valueBefore = TREE_INT_CST_LOW(operands[i]);
>>> int valueAfter = (valueBefore ^ (1u << 2));

>>>   tree number =
>>> build_int_cst (integer_type_node, valueAfter);
>>> I would love it if you can help me and
>>> may even implement a tool for GCC for error injection purposes. Any
help would be much appreciated!
>>> Thank you very much!






gcc-4.7-20130907 is now available

2013-09-07 Thread gccadmin
Snapshot gcc-4.7-20130907 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/4.7-20130907/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 4.7 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch 
revision 202356

You'll find:

 gcc-4.7-20130907.tar.bz2 Complete GCC

  MD5=6a3eb2da047944854c495c5951630042
  SHA1=979869cfe6703124ccb2528df49a5786d41cb28a

Diffs from 4.7-20130831 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-4.7
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.