Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 23 Feb 2020 07:53:09 +1100 (AEDT)
From: Damian McGuckin <>
Subject: Re: Considering x86-64 fenv.s to C

On Sat, 22 Feb 2020, Rich Felker wrote:

> First comment: I couldn't find (maybe I missed?) what you intend fore
> the contents of fenv-generic.c and fenv-trivial.c to be, but I don't
> see what you want them for. fenv.c should just use the macros/inlines
> the fenv_arch.h defines, naturally collapsing to empty functions when
> they do nothing (for softfloat archs).

I will repost the current state later this week.  Moving house this week 
so it might take a bit longer!
> In general, the idiom of #include "../foo.c" for $(ARCH)/foo.c only
> works when the names are the same, so that the arch file is replacing
> the one in the parent dir, and there are special cases (subarch
> variants) where you want the arch dir to just do the same thing as the
> generic file in the parent dir does, or where it's doing approximately
> the same thing but with some macros defined to change what it does.
> The way you seem to be trying to do it, src/fenv/fenv-generic.c,
> src/fenv/fenv-trivial.c, and src/fenv/$(ARCH)/fenv.c would all be
> getting built.

Understand. I will think about what I am trying to do. Open to advice.

> A couple minor style things I also spotted right away: If you want an
> unsigned 0 constant, 0U is very much preferred to ((unsigned)0), and
> not putting the type there at all is preferable unless there's a good
> reason you need it (like to make other things in expressions get
> coerced to unsigned). Also verbose type names like "unsigned int" in
> place of just "unsigned" are not preferred. If they appear in some
> existing places in the source, it's by mistake/oversight.


> I'll follow up with more interesting technical review soon.

Thanks - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.