On Fri, Oct 10, 2014 at 9:43 AM, Evgeny Stupachenko <evstu...@gmail.com> wrote:
> i386 specific part of the patch:
>
> 2014-10-08  Ilya Enkovich  <ilya.enkov...@intel.com>
>             Vladimir Makarov  <vmaka...@redhat.com>
>         * gcc/config/i386/i386.c (ix86_use_pseudo_pic_reg): New.
>         (ix86_init_pic_reg): New.
>         (ix86_select_alt_pic_regnum): Add check on pseudo register.
>         (ix86_save_reg): Likewise.
>         (ix86_expand_prologue): Remove irrelevant code.
>         (ix86_output_function_epilogue): Add check on pseudo register.
>         (set_pic_reg_ever_alive): New.
>         (legitimize_pic_address): Replace df_set_regs_ever_live with new
>         set_pic_reg_ever_alive.
>         (legitimize_tls_address): Likewise.
>         (ix86_pic_register_p): New check.
>         (ix86_delegitimize_address): Add check on pseudo register.
>         (ix86_expand_call): Insert move from pseudo PIC register to ABI
>         defined REAL_PIC_OFFSET_TABLE_REGNUM.
>         (TARGET_INIT_PIC_REG): New.
>         (TARGET_USE_PSEUDO_PIC_REG): New.
>         (PIC_OFFSET_TABLE_REGNUM): New check.

Couple of nits below.

+/* Set regs_ever_live for PIC base address register
+   to true if required.  */
+static void
+set_pic_reg_ever_alive ()

Please rename this function to set_pic_reg_ever_live.

-#define PIC_OFFSET_TABLE_REGNUM \
-  ((TARGET_64BIT && (ix86_cmodel == CM_SMALL_PIC \
-                     || TARGET_PECOFF)) \
-   || !flag_pic ? INVALID_REGNUM \
-   : reload_completed ? REGNO (pic_offset_table_rtx) \
+#define PIC_OFFSET_TABLE_REGNUM \
+  ((TARGET_64BIT && (ix86_cmodel == CM_SMALL_PIC \
+                     || TARGET_PECOFF)) \
+   || !flag_pic ? INVALID_REGNUM \
+   : pic_offset_table_rtx ? INVALID_REGNUM \
    : REAL_PIC_OFFSET_TABLE_REGNUM)

No negative conditions, please. Also, please follow established
multi-level condition format, please see e.g. HARD_REGNO_NREGS
definition in i386.h.

OK for mainline after infrastructure patch is approved.

Thanks,
Uros.

Reply via email to