This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MS/CW-style inline assembly for GCC


On Mon, 2004-05-03 at 20:35, Stan Shebs wrote:

> Can you be more specific about the difficulties?
>
What are the semantics wrt data flow across asm chunks?

foo()
{
   int x;

   x = 10;
   __asm__ {
     ....
   }
   return x + 1;
}

How does the asm block inform the IL of modifications and/or uses of
local/global variables?  How do the optimizers know whether 'return 11'
is valid?  You either tell them no transformations are valid, any
transformation is valid or provide a structured way of accessing data
flow information.

By the same token, how do you provide control flow information to the
optimizers?  GCC will want to build an SSA form on the tree level
representation very soon.  You have to provide very precise and detailed
data and control flow information for __asm__ blocks.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]