Am 02.07.2011 um 11:04 schrieb Blue Swirl:

On Sat, Jul 2, 2011 at 12:06 AM, malc <av1...@comtv.ru> wrote:
On Sat, 2 Jul 2011, Blue Swirl wrote:

On Tue, Jun 28, 2011 at 1:51 AM, malc <av1...@comtv.ru> wrote:
On Sun, 26 Jun 2011, Blue Swirl wrote:

Use TCG_REG_CALL_STACK instead of TCG_REG_R1 etc. for consistency.


This i'd rather avoid.

Why? In addition to the consistency among targets, a magic constant is
replaced with a symbol which improves the documenting abilities and
readability of the code.

Makes it harder to read for me personally.

What about other people reading the code? With TCG_REG_CALL_STACK it's
pretty clear what is the purpose of the register, with '1' it is
assumed that the reader happens to know it. I don't think the exact
value is so interesting, or is register 1 somehow different from
others?

I second malc's notion. This is ppc-specific code, and GPR1 (r1) is the designated stack pointer, that has nothing to do with TCG. Using some generic TCG define hides from the reader which reg is being used, potentially leading to nonsensical moves from r1 to TCG_... or vice versa.

If we do want a define, I would suggest something ppc-specific like r1 or sp.

Andreas

Reply via email to