avr

Testing

To test the avr code, the simavr project is used.

https://github.com/buserror/simavr

Module

The is the avr backend.

See also:

https://gcc.gnu.org/wiki/avr-gcc

http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_instruction_list.html

class ppci.arch.avr.AvrArch(options=None)

Avr architecture description.

between_blocks(frame)

Generate any instructions here if needed between two blocks

determine_arg_locations(arg_types)

Given a set of argument types, determine location for argument

determine_rv_location(ret_type)

Determine the location of a return value of a function given the type of return value

gen_call(frame, label, args, rv)

Generate instructions for a function call.

gen_epilogue(frame)

Return epilogue sequence for a frame. Adjust frame pointer and add constant pool

gen_function_enter(args)

Copy arguments into local temporaries and mark registers live

gen_prologue(frame)

Generate the prologue instruction sequence.

get_runtime()

Create an object with an optional runtime.

litpool(frame)

Generate instruction for the current literals

move(dst, src)

Generate a move from src to dst

class ppci.arch.avr.AvrRegister(name, num=None, aliases=(), aka=())

An 8-bit avr register

classmethod from_num(num)

Retrieve the singleton instance of the given register number.

class ppci.arch.avr.AvrWordRegister(name, num=None, aliases=(), aka=())

Register covering two 8 bit registers

classmethod from_num(num)

Retrieve the singleton instance of the given register number.