Hello,

for a custom architecture I am working on, I would like to entirely disable
the usage of hardware floating point instructions in favor of library
methods on demand.

I need advice on what is the best strategy to do this. My idea is to:

- create  a new flag (let's say -m[no-]float-insn or something like that

- use the value of the flag in the condition of every define_insn in the
machine description to inhibit their usage if the flag is active


My questions:

- Is this a good strategy? Or would you suggest a better solution?

- If I switch all floating point instructions off, will GCC automatically
use their software counterpart, from the builtins or libraries, by finding
them via their instruction patterns?

- I noticed that some opcodes of our architecture can be found in the
assembler, but they are not available in the GCC backend. How can I inhibit
the usage of those instructions? Shall I explicitly add to the machine
description and then disable them with their condition?


Thank you for your suggestions.

I am new in this (difficult) business and I am trying to learn.


Kind regards

Enrico Bragante

Reply via email to