From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Franz Sirl Cc: egcs@egcs.cygnus.com Subject: Re: Should asm("" : : : "memory") order accesses to the GOT? Date: Thu, 17 Jun 1999 22:30:00 -0000 Message-id: <12663.929683476@upchuck.cygnus.com> References: <99061723185900.00938@ns1102.munich.netsurf.de> X-SW-Source: 1999-06/msg00634.html In message < 99061723185900.00938@ns1102.munich.netsurf.de >you write: > Am Don, 17 Jun 1999 schrieb Jeffrey A Law: > Hmm, sounds like a big task. It's certainly nontrivial. That's probably why it's been a todo item since about 1992. > So there's currently no way to order accesses to the GOT in gcc, > independent of platform. Not really.. A lot of platforms have unspecs to try and avoid some of these problems. For example you could have the code which computes the address of a symbolic have a (unspec (mem ... )) or something like that. > BTW, Geoff suggested to replace all unspec 8 with something like this: > (define_expand "movsi_got" > [(set (match_operand:SI 0 "register_operand" "") > (mem (plus (unspec [(match_operand:SI 1 "got_operand" "")] 8) > (match_dup 2))))] Yea, with a little work on GO_IF_LEGITIMATE_ADDRESS this kind of scheme would probably work. jeff From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Franz Sirl Cc: egcs@egcs.cygnus.com Subject: Re: Should asm("" : : : "memory") order accesses to the GOT? Date: Wed, 30 Jun 1999 15:43:00 -0000 Message-ID: <12663.929683476@upchuck.cygnus.com> References: <99061723185900.00938@ns1102.munich.netsurf.de> X-SW-Source: 1999-06n/msg00634.html Message-ID: <19990630154300.599GKqUoXvlFKdgzsGqQhdLInmKBu64VM-BFZWfA9ts@z> In message < 99061723185900.00938@ns1102.munich.netsurf.de >you write: > Am Don, 17 Jun 1999 schrieb Jeffrey A Law: > Hmm, sounds like a big task. It's certainly nontrivial. That's probably why it's been a todo item since about 1992. > So there's currently no way to order accesses to the GOT in gcc, > independent of platform. Not really.. A lot of platforms have unspecs to try and avoid some of these problems. For example you could have the code which computes the address of a symbolic have a (unspec (mem ... )) or something like that. > BTW, Geoff suggested to replace all unspec 8 with something like this: > (define_expand "movsi_got" > [(set (match_operand:SI 0 "register_operand" "") > (mem (plus (unspec [(match_operand:SI 1 "got_operand" "")] 8) > (match_dup 2))))] Yea, with a little work on GO_IF_LEGITIMATE_ADDRESS this kind of scheme would probably work. jeff