🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #505

Help needed: define_expand needs to call next_cc0_user()

#505
From: Michael Gersten
Date: Fri, 16 Oct 1992 23:24
25 lines
1561 bytes
In order to handle a machine where the rtl for a comparison needs to  
vary depending on an unsigned or signed comparison, I need to use a  
define_expand. But inside a define_expand, there is no 'insn' to refer to  
the current insn, and so no way to say 'next_cc0_user(insn)'. Nor can  
this be done in the jumps, as you can't say 'prep_cc0_setter(insn).

Why does the rtl need to change? Because I only have a signed  
compare, and I need to fake an unsigned compare by doing an xor with  
1<<15 or 1<<31. Turns out I can't just do this to my operands (silly, silly,  
silly), so I need to copy them into a new register, xor it there, and then  
compare those.

This is only done for unsigned compares; for signed compares the code  
is just a compare. I've tried doing it just as a regular define_insn, but it  
turns out that the C code in that isn't called until assembly generation  
time, when it's too late to get a new register for use. 


Ideas?

		Michael
--
		Michael Gersten		michael@stb.info.com
HELLO! I'm a signature virus! Join in the fun and copy me into yours!
ex:.-1,. w $HOME/.signature
Technical Details
Message-ID: <m0mg121-0005OXC@stb.info.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!stb.INfo.COM!michael

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!stb.INfo.COM!michael
From: michael@stb.INfo.COM (Michael Gersten)
Subject: Help needed: define_expand needs to call next_cc0_user()
Message-ID: <m0mg121-0005OXC@stb.info.com>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 16 Oct 1992 23:24:00 GMT
Lines: 25