[RFC][02/19] Target FP: Simplify floatformat_from_type

Ulrich Weigand uweigand@de.ibm.com
Mon Sep 18 19:01:00 GMT 2017


Simon Marchi wrote:

> Since this is where we do the division by 
> TARGET_CHAR_BIT, and therefore assume (implicitly) that bit is a 
> multiple of TARGET_CHAR_BIT, I think this is where the assert should be 
> added.  To avoid adding them everywhere, we could make 
> arch_type/init_type take a size in bits, and do the division and assert 
> there.

I agree, this seems the best solution.  And it makes more sense for all
the type-creation interfaces to use size in bits instead of the
mixture we have now.  I'll come up with a patch to do that.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com



More information about the Gdb-patches mailing list