Re: [PATCH] Fix do_div() for all architectures
Richard Henderson (rth@twiddle.net)
Thu, 10 Jul 2003 15:04:04 -0700
On Thu, Jul 10, 2003 at 09:31:45PM +0200, Bernardo Innocenti wrote:
> Just to open some interesting speculation, do you think we'd
> get better code by just getting rid of __attribute__((pure))
> or by changing __do_div64() to do something like this?
>
> typedef struct { uint64_t quot, uint32_t rem } __quotrem64;
> __quotrem64 __do_div64(uint64_t div, uint32_t base) __attribute__((const));
No. Most targets require structures be returned in memory.
If people really care beyond the generic, they'll write
special assembly for it.
r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/