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]

Re: Stack regs constraints change proposal


> On Mon, Nov 01, 1999 at 11:58:15AM +0100, Jan Hubicka wrote:
> > > 	(parallel[
> > >              (asm_operands/v ("") ("") 0[
> > >                      (reg:DF 24)
> > >                      (reg:DF 25)
> > >                  ]
> > >                  [
> > >                      (asm_input:DF ("t"))
> > >                      (asm_input:DF ("u"))
> > >                  ]  ("/home3/hubicka/t.c") 4)
> > >              (clobber (reg:QI 18 fpsr))
> > >              (clobber (reg:QI 17 flags))
> > >              (clobber (reg:DF 24))
> > >              (clobber (reg:DF 25))
> > >          ] )
> 
> > But whats about the case you write something like:
> > asm(""::"t,u"(x),"u,t"(y):"st(0)","st(1)");
> > it is perfectly valid according tot he docs (and can be usefull)
> 
> That would have the same rtl representation as above.
OK. This is probably possible. Only we have to refuse some strange
asm statements that uses same clobber sometimes for popping and sometimes
for clobbering.
Like
asm(""::"t,t"(x),"u,f"(y):"st(0)","st(1)");

BTW can please someone take a look why reload is accepting the incorrect
insns?
I was trying to track this down but have no success and there is probably
something wrong happending there
(you may force reload to generate incorrect code).

> 
> > My primary goal is to make constraints usefull enought to make them
> > useable inside i386.md.
> 
> I don't see that my proposal above isn't usable inside i386.md.
> The bit that the md file needs that asm's can't represent is the
> (lack of) an available popping alternative.
Another problem is that the rules requires all output registers to
appear at the top of stack.
This is not very usable for insn patterns, because we need to model
correctly binarry operations that can output to both operands.
We would also probably hit the problem with forced reloads to specific
classes "t" and "u". This can confuse reload and pesimize the code.
Don't know how to avoid these.
> 
> > Problem is that the current checking function in reg-stack make
> > heavy use of recog infrastructure. Are there some helper functions
> > usefull for parsing constraint strings in stmt.c?
> 
> expand_asm_operands in stmt.c has some stuff; how much you can use
> I don't know.  Ignore most of the recog/regclass stuff in the current
> code -- handle "t" and "u" specially.
OK
This makes my life bit easier. when I can hardcode "f" "t" and "u" :)

Honza
> 
> 
> r~

-- 
                       OK. Lets make a signature file.
+-------------------------------------------------------------------------+
|        Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz         |
|         Czech free software foundation: http://www.freesoft.cz          |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
|  homepage: http://www.paru.cas.cz/~hubicka/, games koules, Xonix, fast  |
|  fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc.  | 
+-------------------------------------------------------------------------+


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