RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

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

All bounties

Search whole site

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Actions

  • All bounties
Site design © RISC OS Open Limited 2018 except where indicated
The Canvass icons are adapted from material at defaulticon.com

Valid XHTML 1.0  |  Valid CSS

Powered by Canvass
This site runs on Rails

Hosted by Arachsys