Peter Maydell <peter.mayd...@linaro.org> writes:
> On Mon, 14 Jan 2019 at 22:48, Alex Bennée <alex.ben...@linaro.org> wrote: >> >> >> Richard Henderson <r...@twiddle.net> writes: >> > But perhaps >> > >> > unsigned __int128 n = (unsigned __int128)n1 << 64 | n0; >> > *r = n % d; >> > return n / d; >> > >> > will allow the compiler to do what the assembly does for some 64-bit >> > hosts. >> >> I wonder how much cost is incurred by the jumping to the (libgcc?) div >> helper? Anyone got an s390x about so we can benchmark the two >> approaches? > > The project has an s390x system available; however it's usually > running merge build tests so not so useful for benchmarking. > (I can set up accounts on it but that requires me to faff about > figuring out how to create new accounts :-)) I'm happy to leave this up to those who care about s390x host performance (Thomas, Cornelia?). I'm just keen to avoid the divide helper getting too #ifdefy. I'll include a CONFIG_INT128 patch in my next patch queue review once I've double checked and tested under linux-user ;-) -- Alex Bennée