public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "howarth at bromo dot med.uc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/63793] -mcmodel=medium in gfortran on x86_64 emits references that are RIP relative (instead of using the GOT)
Date: Fri, 14 Nov 2014 02:10:00 -0000	[thread overview]
Message-ID: <bug-63793-4-i5ygOhrYAb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63793-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63793

--- Comment #18 from howarth at bromo dot med.uc.edu ---
Another interesting section of code in gcc/config/i386/i386.c

  else
    {
      /* For TARGET_64BIT and MS_ABI, force pic on, in order to enable the
         use of rip-relative addressing.  This eliminates fixups that
         would otherwise be needed if this object is to be placed in a
         DLL, and is essentially just as efficient as direct addressing.  */
      if (TARGET_64BIT_P (opts->x_ix86_isa_flags)
          && (TARGET_RDOS || TARGET_PECOFF))
        opts->x_ix86_cmodel = CM_MEDIUM_PIC, opts->x_flag_pic = 1;
      else if (TARGET_64BIT_P (opts->x_ix86_isa_flags))
        opts->x_ix86_cmodel = opts->x_flag_pic ? CM_SMALL_PIC : CM_SMALL;
      else
        opts->x_ix86_cmodel = CM_32;
    }


      parent reply	other threads:[~2014-11-14  2:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 14:17 [Bug middle-end/63793] New: " howarth at bromo dot med.uc.edu
2014-11-09 14:29 ` [Bug middle-end/63793] " howarth at bromo dot med.uc.edu
2014-11-09 14:32 ` howarth at bromo dot med.uc.edu
2014-11-09 15:20 ` howarth at bromo dot med.uc.edu
2014-11-13 15:51 ` howarth at bromo dot med.uc.edu
2014-11-13 16:51 ` howarth at bromo dot med.uc.edu
2014-11-13 18:03 ` howarth at bromo dot med.uc.edu
2014-11-13 18:10 ` howarth at bromo dot med.uc.edu
2014-11-13 21:00 ` howarth at bromo dot med.uc.edu
2014-11-13 21:04 ` howarth at bromo dot med.uc.edu
2014-11-14  0:24 ` howarth at bromo dot med.uc.edu
2014-11-14  0:33 ` iains at gcc dot gnu.org
2014-11-14  0:38 ` howarth at bromo dot med.uc.edu
2014-11-14  0:55 ` howarth at bromo dot med.uc.edu
2014-11-14  0:59 ` howarth at bromo dot med.uc.edu
2014-11-14  1:05 ` howarth at bromo dot med.uc.edu
2014-11-14  2:10 ` howarth at bromo dot med.uc.edu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-63793-4-i5ygOhrYAb@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).