[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] __PC__ or _PC_ ???

From: Theodore A. Roth
Subject: [avr-gcc-list] __PC__ or _PC_ ???
Date: Wed, 21 Aug 2002 09:51:17 -0700 (PDT)


I'm trying to remove this line I added to the inline asm document:

FIXME: troth: is it __PC__ or _PC_?

I haven't found any reference to this symbol anywhere except for the
inline asm doc (by Harald Kipp). Harald's original document called it
_PC_, but that's a bit inconsistent with the of symbols (e.g. __SREG__,
__tmp_reg__, etc). So what should it be, _PC_ or __PC__?

I've also been thinking about this and am beginning to question wether it
should even be documented. My experience has been that the developer
really has no way to directly access the PC (program counter) on the AVR.
Of course, you _could_ do something like POP it off the stack after a
CALL/RCALL insn, then PUSH it back and RET (details left as an exercise
for the reader ;). This is not a direct access of the PC register though.

Can someone give me a concrete example of using the _PC_ symbol which
justifies it's existence in the docs? How does gcc/gas handle this symbol?


Ted Roth

avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]