blob: 4783dd5d24eb22fd150b5a09bfacdfd59978233b [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===- README.txt - Notes for improving CellSPU-specific code gen ---------===//
2
Scott Michelf9105d32007-12-03 23:09:49 +00003This code was contributed by a team from the Computer Systems Research
4Department in The Aerospace Corporation:
5
6- Scott Michel (head bottle washer and much of the non-floating point
7 instructions)
8- Mark Thomas (floating point instructions)
9- Michael AuYeung (intrinsics)
10- Chandler Carruth (LLVM expertise)
Scott Michel8c67fa42009-01-21 04:58:48 +000011- Nehal Desai (debugging, i32 operations, RoadRunner SPU expertise)
Scott Michelf9105d32007-12-03 23:09:49 +000012
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR
16OTHERWISE. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE FOR DAMAGES
17OF ANY KIND OR NATURE WHETHER BASED IN CONTRACT, TORT, OR OTHERWISE ARISING
18OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE INCLUDING, WITHOUT
19LIMITATION, DAMAGES RESULTING FROM LOST OR CONTAMINATED DATA, LOST PROFITS OR
20REVENUE, COMPUTER MALFUNCTION, OR FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL,
21OR PUNITIVE DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR
Misha Brukmanfc189152008-12-29 20:08:23 +000022SUCH DAMAGES ARE FORESEEABLE.
Scott Michelf9105d32007-12-03 23:09:49 +000023
24---------------------------------------------------------------------------
Scott Michel3c8a4b22007-12-05 02:01:41 +000025--WARNING--:
Scott Michelf9105d32007-12-03 23:09:49 +000026--WARNING--: The CellSPU work is work-in-progress and "alpha" quality code.
Scott Michel3c8a4b22007-12-05 02:01:41 +000027--WARNING--:
28
29If you are brave enough to try this code or help to hack on it, be sure
30to add 'spu' to configure's --enable-targets option, e.g.:
31
Scott Michel5a6f17b2008-01-30 02:55:46 +000032 ./configure <your_configure_flags_here> \
33 --enable-targets=x86,x86_64,powerpc,spu
Scott Michel3c8a4b22007-12-05 02:01:41 +000034
Scott Michelf9105d32007-12-03 23:09:49 +000035---------------------------------------------------------------------------
36
Dan Gohmanf17a25c2007-07-18 16:29:46 +000037TODO:
Scott Michela5e75382009-01-06 03:51:14 +000038* Create a machine pass for performing dual-pipeline scheduling specifically
Scott Michel8c67fa42009-01-21 04:58:48 +000039 for CellSPU, and insert branch prediction instructions as needed.
Scott Michelf9105d32007-12-03 23:09:49 +000040
Scott Michela5e75382009-01-06 03:51:14 +000041* i32 instructions:
42
43 * i32 division (work-in-progress)
44
45* i64 support (see i64operations.c test harness):
46
47 * shifts and comparison operators: done
48 * sign and zero extension: done
49 * addition: done
50 * subtraction: needed
Scott Michel8c67fa42009-01-21 04:58:48 +000051 * multiplication: done
Scott Michela5e75382009-01-06 03:51:14 +000052
53* i128 support:
54
Scott Michel8c67fa42009-01-21 04:58:48 +000055 * zero extension, any extension: done
Scott Michela5e75382009-01-06 03:51:14 +000056 * sign extension: needed
57 * arithmetic operators (add, sub, mul, div): needed
Scott Michel8c67fa42009-01-21 04:58:48 +000058 * logical operations (and, or, shl, srl, sra, xor, nor, nand): needed
Scott Michelf9105d32007-12-03 23:09:49 +000059
Scott Michel8c67fa42009-01-21 04:58:48 +000060 * or: done
Scott Michelf9105d32007-12-03 23:09:49 +000061
Scott Michel8c67fa42009-01-21 04:58:48 +000062* f64 support
63
64 * Comparison operators:
65 SETOEQ unimplemented
66 SETOGT unimplemented
67 SETOGE unimplemented
68 SETOLT unimplemented
69 SETOLE unimplemented
70 SETONE unimplemented
71 SETO done (lowered)
72 SETUO done (lowered)
73 SETUEQ unimplemented
74 SETUGT unimplemented
75 SETUGE unimplemented
76 SETULT unimplemented
77 SETULE unimplemented
78 SETUNE unimplemented
79
80* LLVM vector suport
81
82 * VSETCC needs to be implemented. It's pretty straightforward to code, but
83 needs implementation.
Scott Michelf9105d32007-12-03 23:09:49 +000084
85* Intrinsics
86
Scott Michel8c67fa42009-01-21 04:58:48 +000087 * spu.h instrinsics added but not tested. Need to have an operational
88 llvm-spu-gcc in order to write a unit test harness.
Dan Gohmanf17a25c2007-07-18 16:29:46 +000089
90===-------------------------------------------------------------------------===