ISA extensions - ylab-nsu/cdm16-llvm-neo GitHub Wiki

The LLVM backend supports some optional extensions to the CDM-16 ISA:

[!NOTE] Ths cdm16m extension is still in development, so it is not currently available in any stable version of Cocas. To use this extension with --target=cdm-cocas, you will have to set up an experimental version of Cocas and make Clang use it.

You can specify the extensions to use with the -march= Clang option. The argument to this option must be the string cdm16 followed by the zero or more letters indicating the enabled extensions. The order of the letters does not matter.

Usage:

clang-cdm --target=cdm -march=cdm16em # ...
clang-cdm --target=cdm-cocas -march=cdm16em # ...

The enabled extensions can be detected in code using preprocessor definitions, e.g. __CDM_EXT_E__. See common definitions.