home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / gnu / gcc / help / 2340 < prev    next >
Encoding:
Text File  |  1992-10-16  |  1.5 KB  |  37 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!stb.INfo.COM!michael
  3. From: michael@stb.INfo.COM (Michael Gersten)
  4. Subject: Help needed: define_expand needs to call next_cc0_user()
  5. Message-ID: <m0mg121-0005OXC@stb.info.com>
  6. Sender: daemon@cis.ohio-state.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 16 Oct 1992 23:24:00 GMT
  10. Lines: 25
  11.  
  12. In order to handle a machine where the rtl for a comparison needs to  
  13. vary depending on an unsigned or signed comparison, I need to use a  
  14. define_expand. But inside a define_expand, there is no 'insn' to refer to  
  15. the current insn, and so no way to say 'next_cc0_user(insn)'. Nor can  
  16. this be done in the jumps, as you can't say 'prep_cc0_setter(insn).
  17.  
  18. Why does the rtl need to change? Because I only have a signed  
  19. compare, and I need to fake an unsigned compare by doing an xor with  
  20. 1<<15 or 1<<31. Turns out I can't just do this to my operands (silly, silly,  
  21. silly), so I need to copy them into a new register, xor it there, and then  
  22. compare those.
  23.  
  24. This is only done for unsigned compares; for signed compares the code  
  25. is just a compare. I've tried doing it just as a regular define_insn, but it  
  26. turns out that the C code in that isn't called until assembly generation  
  27. time, when it's too late to get a new register for use. 
  28.  
  29.  
  30. Ideas?
  31.  
  32.         Michael
  33. --
  34.         Michael Gersten        michael@stb.info.com
  35. HELLO! I'm a signature virus! Join in the fun and copy me into yours!
  36. ex:.-1,. w $HOME/.signature
  37.