This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

loadgp in config/mips/mips.md



------- 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]