[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v3 08/15] tests/fp: add fp-bench
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PULL v3 08/15] tests/fp: add fp-bench |
Date: |
Tue, 18 Dec 2018 14:38:15 +0000 |
User-agent: |
mu4e 1.1.0; emacs 26.1.90 |
Emilio G. Cota <address@hidden> writes:
> On Mon, Dec 17, 2018 at 10:56:43 +0000, Alex Bennée wrote:
>> From: "Emilio G. Cota" <address@hidden>
>> +static void update_random_ops(int n_ops, enum precision prec)
>> +{
>> + int i;
>> +
>> + for (i = 0; i < n_ops; i++) {
>> + uint64_t r = random_ops[i];
>> +
>> + if (prec == PREC_SINGLE || PREC_FLOAT32) {
>> + do {
>> + r = xorshift64star(r);
>> + } while (!float32_is_normal(r));
>> + } else if (prec == PREC_DOUBLE || PREC_FLOAT64) {
>
> I just noticed that there's a bug here (I was seeing non-normals
> where I didn't expect any):
>
> for (i = 0; i < n_ops; i++) {
> uint64_t r = random_ops[i];
>
> - if (prec == PREC_SINGLE || PREC_FLOAT32) {
> + if (prec == PREC_SINGLE || prec == PREC_FLOAT32) {
> do {
> r = xorshift64star(r);
> } while (!float32_is_normal(r));
> - } else if (prec == PREC_DOUBLE || PREC_FLOAT64) {
> + } else if (prec == PREC_DOUBLE || prec == PREC_FLOAT64) {
> do {
> r = xorshift64star(r);
> } while (!float64_is_normal(r));
>
> Let me know if you want me to send a proper patch (this is non-critical
> so it's OK to fix after merging) or you'd rather fix it up directly.
I spoke too soon - it got merged today. If you can send a proper patch
I'll add it to my queue.
--
Alex Bennée
- [Qemu-devel] [PULL v3 00/15] Hardfloat + softfloat maintainers update and gitdm, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 15/15] hardfloat: implement float32/64 comparison, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 12/15] hardfloat: implement float32/64 division, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 08/15] tests/fp: add fp-bench, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 09/15] fpu: introduce hardfloat, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 14/15] hardfloat: implement float32/64 square root, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 11/15] hardfloat: implement float32/64 multiplication, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 10/15] hardfloat: implement float32/64 addition and subtraction, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 07/15] softfloat: add float{32, 64}_is_zero_or_normal, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 06/15] softfloat: rename canonicalize to sf_canonicalize, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 01/15] contrib: add a basic gitdm config, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 05/15] target/tricore: use float32_is_denormal, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 04/15] softfloat: add float{32, 64}_is_{de, }normal, Alex Bennée, 2018/12/17
- [Qemu-devel] [PULL v3 02/15] MAINTAINERS: update status of FPU emulation, Alex Bennée, 2018/12/17