xref: /aosp_15_r20/external/llvm/lib/Target/MSP430/README.txt (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker//===---------------------------------------------------------------------===//
2*9880d681SAndroid Build Coastguard Worker// MSP430 backend.
3*9880d681SAndroid Build Coastguard Worker//===---------------------------------------------------------------------===//
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard WorkerDISCLAIMER: This backend should be considered as highly experimental. I never
6*9880d681SAndroid Build Coastguard Workerseen nor worked with this MCU, all information was gathered from datasheet
7*9880d681SAndroid Build Coastguard Workeronly. The original intention of making this backend was to write documentation
8*9880d681SAndroid Build Coastguard Workerof form "How to write backend for dummies" :) Thes notes hopefully will be
9*9880d681SAndroid Build Coastguard Workeravailable pretty soon.
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard WorkerSome things are incomplete / not implemented yet (this list surely is not
12*9880d681SAndroid Build Coastguard Workercomplete as well):
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker1. Verify, how stuff is handling implicit zext with 8 bit operands (this might
15*9880d681SAndroid Build Coastguard Workerbe modelled currently in improper way - should we need to mark the superreg as
16*9880d681SAndroid Build Coastguard Workerdef for every 8 bit instruction?).
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker2. Libcalls: multiplication, division, remainder. Note, that calling convention
19*9880d681SAndroid Build Coastguard Workerfor libcalls is incomptible with calling convention of libcalls of msp430-gcc
20*9880d681SAndroid Build Coastguard Worker(these cannot be used though due to license restriction).
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker3. Implement multiplication / division by constant (dag combiner hook?).
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker4. Implement non-constant shifts.
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker5. Implement varargs stuff.
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker6. Verify and fix (if needed) how's stuff playing with i32 / i64.
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker7. Implement floating point stuff (softfp?)
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Worker8. Implement instruction encoding for (possible) direct code emission in the
33*9880d681SAndroid Build Coastguard Workerfuture.
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Worker9. Since almost all instructions set flags - implement brcond / select in better
36*9880d681SAndroid Build Coastguard Workerway (currently they emit explicit comparison).
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Worker10. Handle imm in comparisons in better way (see comment in MSP430InstrInfo.td)
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Worker11. Implement hooks for better memory op folding, etc.
41*9880d681SAndroid Build Coastguard Worker
42