llvm
llvm copied to clipboard
Videocore Backend for llvm
It is currently impossible to assemble arithmetic/logic instructions with immediate operands larger than 31.
``` phire@nirrit:~/projects/llvm/build$ echo "st r0, (r3+sp)" | bin/llvm-mc -arch=videocore -show-encoding .text llvm-mc: /home/phire/projects/llvm/llvm32/lib/Target/Videocore/MCTargetDesc/VideocoreMCCodeEmitter.cpp:134: unsigned int {anonymous}::VideocoreMCCodeEmitter::getMachineOpValue(const llvm::MCInst&, const llvm::MCOperand&, llvm::SmallVectorImpl&) const: Assertion `Kind == MCExpr::SymbolRef' failed. 0 llvm-mc 0x000000000060c21d 1...
Operands don't show scalar register offsets and will potentially show the wrong orientation.
It might be possible to remove duplication in the instruction formats and multiclasses by using multiple inheritance.
Need to add checking for valid registers when adding a memoperand.