Message ID | 20190808164117.23348-2-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | softfloat header cleanups | expand |
On 8/8/19 9:41 AM, Alex Bennée wrote: > This simple pasting helper can be used by those who don't need the > entire softfloat api. Move it to the smaller types header. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > include/fpu/softfloat-types.h | 2 ++ > include/fpu/softfloat.h | 2 -- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h > index 2aae6a89b19..7e88152dfc4 100644 > --- a/include/fpu/softfloat-types.h > +++ b/include/fpu/softfloat-types.h > @@ -80,6 +80,8 @@ this code that are retained. > #ifndef SOFTFLOAT_TYPES_H > #define SOFTFLOAT_TYPES_H > > +#define LIT64( a ) a##LL Better would be to replace all uses with {,U}INT64_C from <stdint.h>. But if you prefer this smaller patch for now, Acked-by: Richard Henderson <richard.henderson@linaro.org> r~
On Thu, 8 Aug 2019 at 17:41, Alex Bennée <alex.bennee@linaro.org> wrote: > > This simple pasting helper can be used by those who don't need the > entire softfloat api. Move it to the smaller types header. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > include/fpu/softfloat-types.h | 2 ++ > include/fpu/softfloat.h | 2 -- > 2 files changed, 2 insertions(+), 2 deletions(-) I think we should be trying to get rid of uses of this macro, not making it easier to use in more places... thanks -- PMM
Peter Maydell <peter.maydell@linaro.org> writes: > On Thu, 8 Aug 2019 at 17:41, Alex Bennée <alex.bennee@linaro.org> wrote: >> >> This simple pasting helper can be used by those who don't need the >> entire softfloat api. Move it to the smaller types header. >> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> >> --- >> include/fpu/softfloat-types.h | 2 ++ >> include/fpu/softfloat.h | 2 -- >> 2 files changed, 2 insertions(+), 2 deletions(-) > > I think we should be trying to get rid of uses of this > macro, not making it easier to use in more places... True - that is a more invasive (but mechanical) patch. -- Alex Bennée
diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 2aae6a89b19..7e88152dfc4 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -80,6 +80,8 @@ this code that are retained. #ifndef SOFTFLOAT_TYPES_H #define SOFTFLOAT_TYPES_H +#define LIT64( a ) a##LL + /* This 'flag' type must be able to hold at least 0 and 1. It should * probably be replaced with 'bool' but the uses would need to be audited * to check that they weren't accidentally relying on it being a larger type. diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 3ff3fa52245..d9333eb65b8 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -82,8 +82,6 @@ this code that are retained. #ifndef SOFTFLOAT_H #define SOFTFLOAT_H -#define LIT64( a ) a##LL - /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point ordering relations *----------------------------------------------------------------------------*/
This simple pasting helper can be used by those who don't need the entire softfloat api. Move it to the smaller types header. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- include/fpu/softfloat-types.h | 2 ++ include/fpu/softfloat.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1