Ian Lance Taylor - Re: [PATCH]: PR inline-asm/28686 missing check for asm_clobbered at -O0 (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

"Seongbae Park" seongbae.park@gmail.com writes:

+/* Compute ELIMINABLE_REGSET and NO_GLOBAL_ALLOC_REGS,

I think this comment could be clearer. It should first say what the function does. Then it can say how the function is normally called. For example, something like this, assuming this is accurate:

Look through the list of eliminable registers.  Add registers
clobbered by asm statements to LIVE_REGS.  Set ELIM_SET to the set of
registers which may be eliminated.  Set NO_GLOBAL_SET to the set of
registers which may not be used across blocks.

ASM_CLOBBERED is the set of registers clobbered by some asm statement.

This will normally be called with LIVE_REGS as the global variable
regs_ever_live, ELIM_SET as the file static variable
eliminable_regset, and NO_GLOBAL_SET as the file static variable
NO_GLOBAL_ALLOC_REGS.

+static void +compute_regsets (char asm_clobbered[FIRST_PSEUDO_REGISTER],

You need to pass HARD_REG_SET*, not HARD_REG_SET. On a target with 32 or fewer hard registers, HARD_REG_SET is not an array.

OK with those changes.

Thanks.

Ian


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