loadgp in config/mips/mips.md
Jeffrey A Law
law@cygnus.com
Mon Nov 10 13:47:00 GMT 1997
------- 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
More information about the Gcc
mailing list