This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should asm("" : : : "memory") order accesses to the GOT?
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: Should asm("" : : : "memory") order accesses to the GOT?
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 17 Jun 1999 23:24:36 -0600
- cc: egcs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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