Arm machine specifics. The arm target has several options:

  • thumb: enable thumb mode, emits thumb code
class ppci.arch.arm.ArmArch(options=None)

Arm machine class.

class ppci.arch.arm.ArmArch(options=None)

Arm machine class.


Generate any instructions here if needed between two blocks


Given a set of argument types, determine location for argument ABI: pass arg1 in R1 pass arg2 in R2 pass arg3 in R3 pass arg4 in R4 return value in R0


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.


Return epilogue sequence for a frame.

Adjust frame pointer and add constant pool.

Also free up space on stack for:

  • Space for parameters passed to called functions.
  • Space for save registers
  • Space for local variables

Generate code to extract arguments from the proper locations

The default implementation tries to use registers and move instructions.

Parameters:args – an iterable of virtual registers in which the arguments must be placed.

Returns prologue instruction sequence.

Reserve stack for this calling frame for:

  • local variables
  • save registers
  • parameters to called functions

Implement compiler runtime functions


Generate instruction for the current literals

move(dst, src)

Generate a move from src to dst