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: How to implement efficiently builtins for dual-result instructions ?



To invoke this instruction from the source level, a compiler builtin
is provided.
Since C syntax doesn't provide functions with two results, this builtin refers
to them via pointers:__super_ld32( int* x, int *y, int *a)

I did something similar in a private port by folding the builtin to


  long long tmp = __super_ld32_dimode (a);
  *x = (int) tmp;
  *y = (int) (tmp >> 32);

Then you create the builtin as returning a DImode, but the lower-subreg pass will be able to split the DImode pseudo into non-consecutive hard registers.

Paolo


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