Hi Keith,

Thanks for the explanation - however I'm afraid compilers don't have a concept
of implicit vs explicit use of operations or registers.

> I'm trying to find all cases where that happens for data types other
> than SIMD/FP. Do you know of other places where the compiler implicitly
> uses SIMD registers for integer data?

There are too many cases to enumerate... Compilers try hard to use all
available registers and instructions - that's what they are supposed to do!

> In Zephyr, interrupt handlers are allowed to perform FP/SIMD
> operations. Which means we cannot use -mgeneral-regs-only. When they do
> use the FPU, interrupts are disabled at the first FP instruction which
> increases latency for nested interrupts.

Is that done automatically or do you need to write an explicit 
disable_interrupts()
before you use FP/SIMD operations?

> They need control over when FP instructions will be generated. With
> previous GCC versions FP instructions were only generated by the
> compiler when FP datatypes were involved. That's what I'm trying to get
> back to.

You have control already: -mgeneral-regs-only or +nosimd will disable large 
parts
of the backend. However any registers or backend patterns that are enabled will
still be used automatically. Even if say only FP registers are enabled (and no 
FP
operations at all), the register allocator may use them as spill registers.

Cheers,
Wilco


Reply via email to