ARMv7 code generation from the C compiler
Guide target £3,800
Most of the applications used on RISC OS are themselves written in C, and the trend is generally away from writing things entirely in assembler towards higher level languages. Currently it is difficult to take full advantage of the modern features of ARM processors from C code. Adding this feature will make it easier to address this issue.
While technical in nature – you may not be a programmer yourself – this bounty aims to deliver a useful performance benefit to most programs used by everyone on a daily basis.
Details
There are two aspects to the code generation in the C compiler: taking general purpose C source code and translating it to use newer optimal ARM instructions where possible, and the inline assembler to make use of specialist digital signal processing (DSP) instructions which couldn’t otherwise be inferred from writing in the C language.
At present:
- The C compiler implements an inline assembler. This is limited to ARMv5 support and would need all of the new instructions adding – around 75 in total.
- It compiles C code and inline assembler to an intermediate instruction set (known as “jopcodes”), and the ARM backend can generate ARMv5 (and a few ARMv6 instructions) from these jopcodes.
Therefore, to extend the compiler, it is necessary as a minimum to also extend the jopcode instruction set. New peephole optimisations can then be defined to transform standard sequences into the new jopcodes. However, it is accepted that many of the new ARMv6 and v7 instructions cannot naturally be generated from C code, for example because they make use of DSP flags, which is when authors would reach for the inline assembler.
The debugging partner to the C compiler, DDT, will similarly need extending to be able to single step the new instructions for at least those that can now be emitted by the compiler when starting from C code.
Source code to the compiler and DDT is closed source so any development of this will need to be performed under a non-disclosure agreement between ROOL and the developer (we can supply this).
Donations | 52 |
---|---|
Total | £3,915.00 |
State | Completed |
Help |
More information about the bounty scheme Bounty scheme discussion forum |