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: Inline assembly syntax



On Friday, May 7, 2004, at 04:47 PM, Ian Lance Taylor wrote: [...]
So, putting these together, the ideal assembler syntax would have
characteristics like these:

What about having a really good set of intrinsic functions. For example, Apple ships with a header called ppc_intrinsics.h that has single-instruction inline functions for all the common instructions (with presumably correct constraints).


* Straightforward mapping from C variables to assembler operands.

Intrinsics handle this.


* Avoid string constants and associated backslash syntax.

And this.


* Compiler would automatically determine side effects of known
  instructions.

And this by virtue of the compiler writers implementing the instruction wrappers.


* Support specifying additional side effects.

And this (excepting specific memory clobbers).


* Scheduling barriers could be inserted.

Add __builtin_noschedule() or something like that?


* Clobbering of precise memory locations could be discerned and
  described.

As I understand it, this would be needed with any scheme.


You could also add a __attribute__ for function arguments that requires the argument to be a constant to handle the addi probably (actually, doesn't the Altivec support use something like this already?)

-tim



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