[PATCH 0/2] target/i386: SSE floating-point fixes

Joseph Myers posted 2 patches 3 years, 10 months ago
Test FreeBSD passed
Test docker-quick@centos7 passed
Test checkpatch failed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/alpine.DEB.2.21.2006252355430.3832@digraph.polyomino.org.uk
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.h                         |   1 +
target/i386/fpu_helper.c                  |  35 +-
target/i386/gdbstub.c                     |   1 +
target/i386/helper.c                      |   1 +
target/i386/helper.h                      |   1 +
target/i386/ops_sse.h                     |  28 +-
target/i386/translate.c                   |   1 +
tests/tcg/i386/Makefile.target            |   4 +
tests/tcg/i386/test-i386-sse-exceptions.c | 813 ++++++++++++++++++++++
9 files changed, 872 insertions(+), 13 deletions(-)
create mode 100644 tests/tcg/i386/test-i386-sse-exceptions.c
[PATCH 0/2] target/i386: SSE floating-point fixes
Posted by Joseph Myers 3 years, 10 months ago
Fix some issues relating to SSE floating-point emulation.  The first
patch fixes a problem with the handling of the FTZ bit that was found
through the testcase written for the second patch.  Rather than
writing a separate standalone test for that bug, it seemed sufficient
for the testcase in the second patch to cover both patches.

The style checker will produce its usual inapplicable warnings about
use of "volatile" in the testcase and about C99 hex float constants.

Joseph Myers (2):
  target/i386: set SSE FTZ in correct floating-point state
  target/i386: fix IEEE SSE floating-point exception raising

 target/i386/cpu.h                         |   1 +
 target/i386/fpu_helper.c                  |  35 +-
 target/i386/gdbstub.c                     |   1 +
 target/i386/helper.c                      |   1 +
 target/i386/helper.h                      |   1 +
 target/i386/ops_sse.h                     |  28 +-
 target/i386/translate.c                   |   1 +
 tests/tcg/i386/Makefile.target            |   4 +
 tests/tcg/i386/test-i386-sse-exceptions.c | 813 ++++++++++++++++++++++
 9 files changed, 872 insertions(+), 13 deletions(-)
 create mode 100644 tests/tcg/i386/test-i386-sse-exceptions.c

-- 
2.17.1


-- 
Joseph S. Myers
joseph@codesourcery.com

Re: [PATCH 0/2] target/i386: SSE floating-point fixes
Posted by Paolo Bonzini 3 years, 10 months ago
On 26/06/20 01:57, Joseph Myers wrote:
> Fix some issues relating to SSE floating-point emulation.  The first
> patch fixes a problem with the handling of the FTZ bit that was found
> through the testcase written for the second patch.  Rather than
> writing a separate standalone test for that bug, it seemed sufficient
> for the testcase in the second patch to cover both patches.
> 
> The style checker will produce its usual inapplicable warnings about
> use of "volatile" in the testcase and about C99 hex float constants.
> 
> Joseph Myers (2):
>   target/i386: set SSE FTZ in correct floating-point state
>   target/i386: fix IEEE SSE floating-point exception raising
> 
>  target/i386/cpu.h                         |   1 +
>  target/i386/fpu_helper.c                  |  35 +-
>  target/i386/gdbstub.c                     |   1 +
>  target/i386/helper.c                      |   1 +
>  target/i386/helper.h                      |   1 +
>  target/i386/ops_sse.h                     |  28 +-
>  target/i386/translate.c                   |   1 +
>  tests/tcg/i386/Makefile.target            |   4 +
>  tests/tcg/i386/test-i386-sse-exceptions.c | 813 ++++++++++++++++++++++
>  9 files changed, 872 insertions(+), 13 deletions(-)
>  create mode 100644 tests/tcg/i386/test-i386-sse-exceptions.c
> 

Queued, thanks.

Paolo


Re: [PATCH 0/2] target/i386: SSE floating-point fixes
Posted by no-reply@patchew.org 3 years, 10 months ago
Patchew URL: https://patchew.org/QEMU/alpine.DEB.2.21.2006252355430.3832@digraph.polyomino.org.uk/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH 0/2] target/i386: SSE floating-point fixes
Type: series
Message-id: alpine.DEB.2.21.2006252355430.3832@digraph.polyomino.org.uk

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/alpine.DEB.2.21.2006252355430.3832@digraph.polyomino.org.uk -> patchew/alpine.DEB.2.21.2006252355430.3832@digraph.polyomino.org.uk
Switched to a new branch 'test'
6986974 target/i386: fix IEEE SSE floating-point exception raising
4effb74 target/i386: set SSE FTZ in correct floating-point state

=== OUTPUT BEGIN ===
1/2 Checking commit 4effb7446212 (target/i386: set SSE FTZ in correct floating-point state)
2/2 Checking commit 6986974af06e (target/i386: fix IEEE SSE floating-point exception raising)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#310: 
new file mode 100644

ERROR: Use of volatile is usually wrong, please add a comment
#321: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:7:
+volatile float f_res;

ERROR: Use of volatile is usually wrong, please add a comment
#322: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:8:
+volatile double d_res;

ERROR: Use of volatile is usually wrong, please add a comment
#324: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:10:
+volatile float f_snan = __builtin_nansf("");

ERROR: Use of volatile is usually wrong, please add a comment
#325: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:11:
+volatile float f_half = 0.5f;

ERROR: Use of volatile is usually wrong, please add a comment
#326: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:12:
+volatile float f_third = 1.0f / 3.0f;

ERROR: Use of volatile is usually wrong, please add a comment
#327: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:13:
+volatile float f_nan = __builtin_nanl("");

ERROR: Use of volatile is usually wrong, please add a comment
#328: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:14:
+volatile float f_inf = __builtin_inff();

ERROR: Use of volatile is usually wrong, please add a comment
#329: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:15:
+volatile float f_ninf = -__builtin_inff();

ERROR: Use of volatile is usually wrong, please add a comment
#330: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:16:
+volatile float f_one = 1.0f;

ERROR: Use of volatile is usually wrong, please add a comment
#331: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:17:
+volatile float f_two = 2.0f;

ERROR: Use of volatile is usually wrong, please add a comment
#332: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:18:
+volatile float f_zero = 0.0f;

ERROR: Use of volatile is usually wrong, please add a comment
#333: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:19:
+volatile float f_nzero = -0.0f;

ERROR: Use of volatile is usually wrong, please add a comment
#334: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:20:
+volatile float f_min = FLT_MIN;

ERROR: spaces required around that '-' (ctx:VxV)
#335: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:21:
+volatile float f_true_min = 0x1p-149f;
                                 ^

ERROR: Use of volatile is usually wrong, please add a comment
#335: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:21:
+volatile float f_true_min = 0x1p-149f;

ERROR: Use of volatile is usually wrong, please add a comment
#336: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:22:
+volatile float f_max = FLT_MAX;

ERROR: Use of volatile is usually wrong, please add a comment
#337: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:23:
+volatile float f_nmax = -FLT_MAX;

ERROR: Use of volatile is usually wrong, please add a comment
#339: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:25:
+volatile double d_snan = __builtin_nans("");

ERROR: Use of volatile is usually wrong, please add a comment
#340: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:26:
+volatile double d_half = 0.5;

ERROR: Use of volatile is usually wrong, please add a comment
#341: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:27:
+volatile double d_third = 1.0 / 3.0;

ERROR: Use of volatile is usually wrong, please add a comment
#342: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:28:
+volatile double d_nan = __builtin_nan("");

ERROR: Use of volatile is usually wrong, please add a comment
#343: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:29:
+volatile double d_inf = __builtin_inf();

ERROR: Use of volatile is usually wrong, please add a comment
#344: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:30:
+volatile double d_ninf = -__builtin_inf();

ERROR: Use of volatile is usually wrong, please add a comment
#345: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:31:
+volatile double d_one = 1.0;

ERROR: Use of volatile is usually wrong, please add a comment
#346: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:32:
+volatile double d_two = 2.0;

ERROR: Use of volatile is usually wrong, please add a comment
#347: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:33:
+volatile double d_zero = 0.0;

ERROR: Use of volatile is usually wrong, please add a comment
#348: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:34:
+volatile double d_nzero = -0.0;

ERROR: Use of volatile is usually wrong, please add a comment
#349: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:35:
+volatile double d_min = DBL_MIN;

ERROR: spaces required around that '-' (ctx:VxV)
#350: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:36:
+volatile double d_true_min = 0x1p-1074;
                                  ^

ERROR: Use of volatile is usually wrong, please add a comment
#350: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:36:
+volatile double d_true_min = 0x1p-1074;

ERROR: Use of volatile is usually wrong, please add a comment
#351: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:37:
+volatile double d_max = DBL_MAX;

ERROR: Use of volatile is usually wrong, please add a comment
#352: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:38:
+volatile double d_nmax = -DBL_MAX;

ERROR: Use of volatile is usually wrong, please add a comment
#354: FILE: tests/tcg/i386/test-i386-sse-exceptions.c:40:
+volatile int32_t i32_max = INT32_MAX;

total: 33 errors, 1 warnings, 1033 lines checked

Patch 2/2 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/alpine.DEB.2.21.2006252355430.3832@digraph.polyomino.org.uk/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com