🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #495

Help needed (very specific -- stack push recognition)

#495
From: Michael Gersten
Date: Thu, 15 Oct 1992 16:55
30 lines
1344 bytes
I'm having trouble with recognizing a stack push instruction.

Here's the first pattern in my md file:
(define_insn ""
        [ (set (mem:HI (pre_dec:HI (reg:HI 15)))
                (match_operand:HI 0 "general_operand" "r")
        )]
        ""
        "       PSHM    %0,%0"
)

And here's a couple of insn's that don't match it:

(insn 26 30 27 (set (mem:HI (pre_dec:HI (reg:HI 15)))
       (reg:HI 34)) -1 (nil)
   (insn_list:REG_LIBCALL 32 (nil)))

(insn 157 24 25 (set (mem:HI (pre_dec:HI (reg:HI 15)))
       (reg:HI 7)) 4 {movhi} (nil)
   (nil))

Q: What gives? movhi cannot handle pre_dec: the only thing that  
supports it is pushing/popping the stack. Putting some test  
statements in insn-recog.c shows that it's not even being  
considered.
--
		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: <m0mfYTb-0005OXC@stb.info.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.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!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!stb.INfo.COM!michael
From: michael@stb.INfo.COM (Michael Gersten)
Subject: Help needed (very specific -- stack push recognition)
Message-ID: <m0mfYTb-0005OXC@stb.info.com>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 15 Oct 1992 16:55:00 GMT
Lines: 30