On Sat, 2011-01-01 at 18:04 +0800, haimag ren wrote:
> Why are these instrctions(SBIC, SBIS, SBI, CBI) not implemented ?

GCC emits them only when you do tests or bitwise operations with I/O
locations directly. If, like the USB firmware, you do all I/O operations
with inline assembly (which doesn't make the code a mess, you can write
a macro) using only load/stores from/to the register file (using the IN
and OUT instructions) you can get away without those instructions. It
makes some I/O slightly slower (I can live with that) and breaks
compatibility with some AVR software (which wouldn't run anyway on
Milkymist since the softusb core does not implement the normal AVR I/O
peripherals).

See softusb-input/io.h and the functions using the rio8/wio8 macros in
softusb-input/main.c.

> GCC will not used them to access(SREG, STACK)?

The equivalent operations on SREG are done using different instructions
which are implemented (BRBS etc.), and GCC does not use
SBIC/SBIS/SBI/CBI to manipulate the stack pointer.

S.


_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkym...@freenode
Twitter: www.twitter.com/milkymistvj
Ideas? http://milkymist.uservoice.com

Reply via email to