[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] register variable considered BAD
From: |
Jonathan Walther |
Subject: |
[RP] register variable considered BAD |
Date: |
Sun, 6 May 2001 15:25:51 -0700 (PDT) |
-----BEGIN PGP SIGNED MESSAGE-----
Was reading the Gnu CC manual again. It had this interesting
tidbit: When the address of a variable is taken, it will never
be assigned a register. EVER. Even if the register keyword
was used. I believe this is the case with the code in ratpoison
that does use register, and that would be why I noticed no
code difference in the generated object files when I compiled
with and without the register keyword. If you want to actually
use registers, don't give the compiler hints, use inline assembly.
Jonathan
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
iQCVAwUBOvXPcMK9HT/YfGeBAQFtgwP9GkKLC4BErxBtwU6jJR5PKY44rLr99851
hJmC0QsF4jcxH8nqYItLHYEqVlt18COYq+DUSq2iN7gkB5d0A8b8V+ljF1KSoOLE
eCMkVWULwlQWeZh1Iv0lcxMRIwAIT/Nh3FfZxfcB464XDYK4Rnnbkl0IbT2/HTWo
Wy5Noqhlj/o=
=XlB1
-----END PGP SIGNATURE-----