//===-- README.txt - Notes for Blackfin Target ------------------*- org -*-===// * Condition codes ** DONE Problem with asymmetric SETCC operations The instruction CC = R0 < 2 is not symmetric - there is no R0 > 2 instruction. On the other hand, IF CC JUMP can take both CC and !CC as a condition. We cannot pattern-match (brcond (not cc), target), the DAG optimizer removes that kind of thing. This is handled by creating a pseudo-register NCC that aliases CC. Register classes JustCC and NotCC are used to control the inversion of CC. ** DONE CC as an i32 register The AnyCC register class pretends to hold i32 values. It can only represent the values 0 and 1, but we can copy to and from the D class. This hack makes it possible to represent the setcc instruction without having i1 as a legal type. In most cases, the CC register is set by a "CC = .." or BITTST instruction, and then used in a conditional branch or move. The code generator thinks it is moving 32 bits, but the value stays in CC. In other cases, the result of a comparison is actually used as am i32 number, and CC will be copied to a D register. * Stack frames ** TODO Use Push/Pop instructions We should use the push/pop instructions when saving callee-saved registers. The are smaller, and we may even use push multiple instructions. ** TODO requiresRegisterScavenging We need more intelligence in determining when the scavenger is needed. We should keep track of: - Spilling D16 registers - Spilling AnyCC registers * Assembler ** TODO Implement PrintGlobalVariable ** TODO Remove LOAD32sym It's a hack combining two instructions by concatenation. * Inline Assembly These are the GCC constraints from bfin/constraints.md: | Code | Register class | LLVM | |-------+-------------------------------------------+------| | a | P | C | | d | D | C | | z | Call clobbered P (P0, P1, P2) | X | | D | EvenD | X | | W | OddD | X | | e | Accu | C | | A | A0 | S | | B | A1 | S | | b | I | C | | v | B | C | | f | M | C | | c | Circular I, B, L | X | | C | JustCC | S | | t | LoopTop | X | | u | LoopBottom | X | | k | LoopCount | X | | x | GR | C | | y | RET*, ASTAT, SEQSTAT, USP | X | | w | ALL | C | | Z | The FD-PIC GOT pointer (P3) | S | | Y | The FD-PIC function pointer register (P1) | S | | q0-q7 | R0-R7 individually | | | qA | P0 | | |-------+-------------------------------------------+------| | Code | Constant | | |-------+-------------------------------------------+------| | J | 1<