This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
loadgp in config/mips/mips.md
- To: egcs at cygnus dot com
- Subject: loadgp in config/mips/mips.md
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 10 Nov 1997 10:09:50 -0800
- Reply-To: law at cygnus dot com
------- Forwarded Message
From: Paul Henning <phenning@cs.uiowa.edu>
Message-Id: <199711092141.PAA18185@server.cs.uiowa.edu>
To: egcs@cygnus.com
CC: Chris.Yeoh@adelaide.maptek.com.au, wilson@cygnus.com
Subject: loadgp in config/mips/mips.md
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
xxxsystem: egcs-971105 for mips-sgi-irix6.*
I was curious about the definition of the "loadgp" instruction in
xxxconfig/mips/mips.md:
- - ----
;; Instructions to load the global pointer register.
;; This is volatile to make sure that the scheduler won't move any symbol_ref
;; uses in front of it. All symbol_refs implicitly use the gp reg.
(define_insn "loadgp"
[(set (reg:DI 28)
(unspec_volatile [(match_operand:DI 0 "address_operand" "")] 2))
(clobber (reg:DI 1))]
""
"%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel
(%a0)))\\n\\tdaddu\\t$gp,$1,$25%]"
[(set_attr "type" "move")
(set_attr "mode" "DI")
(set_attr "length" "3")])
- - ----
The %gp_rel and %neg relocations this puts out work fine with SGI's as,
but really confuse gas-970915. Is this definition broken for putting
out these symbols or is gas broken for not recognizing them?
Cheers,
Paul
- ------- End of Forwarded Message
------- End of Forwarded Message