Texas Instruments' TMS34010 and its successor, the TMS34020 are 32-bit CISC microprocessors which contain a specialised on-board RISC machine for performing graphics operations. TI call them "Graphics System Processors".Development tools for the TMS340x0
An interesting feature of the GSP architecture is that it is bit-addressable. That is, a 32 bit address refers to a particular bit in memory. This give the GSP a 512 mbyte address space. Apart from a few oddball opcodes which implicitly access eight bits, all memory access instructions also reference one of the GSP's two field size registers. The contents af a five-bit FSR specifies the number of bits which are to be accessed by this instruction.
As the 34010 has a 16-bit external bus, a 32-bit read could require as many as three memory reads. A single-cycle on-board barrel shifter is used to align all these operations.
The compilers assume that FS0 is always set to 5 and that FS1 is set to 4. These are used for 32-bit and 16-bit accesses, respectively.
In practice, I found that these features weren't very useful.
char *ptr;whereas for the GSP the expression would be:
int i;
(int)(ptr + i) == ((int)ptr + i);
(int)(ptr + i) == ((int)ptr + i * 8);
If you are porting a modern GCC to an architecture which has a peculiar
basic unit size then download the above tarball and grep for the strings
"AKPM", "34010" and "GSP". These will identify the places where I
changed the compiler. Identify the corresponding locations within
your current compiler and apply the appropriate changes.
This compiler also has a new keyword: interrupt:
void interrupt my_isr(void)
{
do_things();
}
The interrupt keyword causes the function to save all machine state,
so a machine vector can point straight at it. The implementation
is horrid - don't go there.
It also happens to include a 34010 realtime kernel and an almost-complete video game.
Unfortunately I have permanently misplaced the actual compiler driver
(the program which execs the preprocessor, compiler, linker, etc).
This should be pretty easy to replace with some gcc spec writing, a shell
script or simply some makefile wizardry.
Andrew Morton, 14 October 2000