This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] more enhancements to df on the mainline.


Richard Sandiford wrote:
Kenneth Zadeck <zadeck@naturalbridge.com> writes:
+
+/* With -mabicalls (which is the default on GNU/Linux),
+ PIC_FUNCTION_ADDR_REGNUM is live on function entry and is to
+ initialize $28, which is PIC_OFFSET_TABLE_REGNUM. */
+
+void
+mips_set_live_on_entry (void *regsv)
+{
+ bitmap regs = (bitmap) regsv;
+ bitmap_set_bit (regs, PIC_FUNCTION_ADDR_REGNUM);
+}

Minor quibble, but I'd prefer it if the function name matched the macro (s/mips_set/mips_extra/). Also, the comment about -mabicalls being the default on GNU/Linux is superfluous. A comment along the lines of:

    /* Implement TARGET_EXTRA_LIVE_ON_ENTRY.  TARGET_ABICALLS makes
       PIC_FUNCTION_ADDR_REGNUM live on entry to a function.  */

would be fine.

More importantly, why are you adding the register unconditionally?
The register _isn't_ live on entry if !TARGET_ABICALLS.

Laziness, and lack of understanding on my part. It will be fixed.

kenny
Richard


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