From nobody Fri May 17 06:43:28 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625846913482997.5488131288179; Fri, 9 Jul 2021 09:08:33 -0700 (PDT) Received: from localhost ([::1]:46316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1t3I-0005m4-3B for importer@patchew.org; Fri, 09 Jul 2021 12:08:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1t0H-00088u-SP; Fri, 09 Jul 2021 12:05:26 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62620 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1t0E-0007Ae-Ag; Fri, 09 Jul 2021 12:05:25 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 169G4adR005667; Fri, 9 Jul 2021 12:05:21 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 39nwfd9afh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jul 2021 12:05:20 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 169G59d4007054; Fri, 9 Jul 2021 12:05:20 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 39nwfd9af4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jul 2021 12:05:20 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 169FwAqq031942; Fri, 9 Jul 2021 16:05:19 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04dal.us.ibm.com with ESMTP id 39jfhfjvb1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jul 2021 16:05:19 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 169G5IeM14352852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Jul 2021 16:05:18 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3561428071; Fri, 9 Jul 2021 16:05:18 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A66CF2805A; Fri, 9 Jul 2021 16:05:17 +0000 (GMT) Received: from LAPTOP-K4LLPL5U.localdomain (unknown [9.65.254.146]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 9 Jul 2021 16:05:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=OlKnGTbExyAPlkcdvhEddg5rR0Pgn80tvH0fcNBE6U8=; b=tbM65petUavsuogicecBoYmJZl66soKb0tLpWCCHie/PSPn6jjGzzu+tRgmeVY1ET7nC 4qFfSDvMDdeU+lkqVsYdgTYkCKp8mFqZ6R6VAV+l1TJ96XeqUe2hWPHayWS6g0dmjqwl ILD0sQLjnxfNLz70nlDcrqU4dpWi3pJ1OlqZBWg1oQrs3J+XZNIlo2kuaDXJQNF/haCi tCQcqC1gjyqUv2igSIw0dEQKMmyZz5p6UKtTLDpZdGuONKbN1285wDBaNzhgQG8Bqtko 6QeasWt6Vh7oh51d26/h5xH/VU55F41I2HfIi/7dGxIh9ALOficZ71oltGvseI+NUNdx NA== From: Jonathan Albrecht To: qemu-devel@nongnu.org Subject: [PATCH v3 1/2] linux-user/s390x: signal with SIGFPE on compare-and-trap Date: Fri, 9 Jul 2021 12:04:58 -0400 Message-Id: <20210709160459.4962-2-jonathan.albrecht@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210709160459.4962-1-jonathan.albrecht@linux.vnet.ibm.com> References: <20210709160459.4962-1-jonathan.albrecht@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 3jNlQOHEdywFJ3aG1-BD4gpAZq112Fcy X-Proofpoint-ORIG-GUID: Uh7JFRyen-iZkM0Fyw6u5oE43_0DVHxR Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-09_09:2021-07-09, 2021-07-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107090081 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.158.5; envelope-from=jonathan.albrecht@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ruixin.bao@ibm.com, Jonathan Albrecht , iii@linux.ibm.com, david@redhat.com, cohuck@redhat.com, richard.henderson@linaro.org, laurent@vivier.eu, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, krebbel@linux.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625846913988100001 Content-Type: text/plain; charset="utf-8" Currently when a compare-and-trap instruction is executed, qemu will always raise a SIGILL signal. On real hardware, a SIGFPE is raised. Change the PGM_DATA case in cpu_loop to follow the behavior in linux kernel /arch/s390/kernel/traps.c. * Only raise SIGILL if DXC =3D=3D 0 * If DXC matches a non-simulated IEEE exception, raise SIGFPE with correct si_code * Raise SIGFPE with si_code =3D=3D 0 for everything else When applied on 20210705210434.45824-2-iii@linux.ibm.com, this fixes crashes in the java jdk such as the linked bug. Buglink: https://bugs.launchpad.net/qemu/+bug/1920913 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/319 Signed-off-by: Jonathan Albrecht Reviewed-by: Richard Henderson --- linux-user/s390x/cpu_loop.c | 54 +++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/linux-user/s390x/cpu_loop.c b/linux-user/s390x/cpu_loop.c index 22f2e89c62..6a69a6dd26 100644 --- a/linux-user/s390x/cpu_loop.c +++ b/linux-user/s390x/cpu_loop.c @@ -25,6 +25,35 @@ /* s390x masks the fault address it reports in si_addr for SIGSEGV and SIG= BUS */ #define S390X_FAIL_ADDR_MASK -4096LL =20 +static int get_pgm_data_si_code(int dxc_code) +{ + switch (dxc_code) { + /* Non-simulated IEEE exceptions */ + case 0x80: + return TARGET_FPE_FLTINV; + case 0x40: + return TARGET_FPE_FLTDIV; + case 0x20: + case 0x28: + case 0x2c: + return TARGET_FPE_FLTOVF; + case 0x10: + case 0x18: + case 0x1c: + return TARGET_FPE_FLTUND; + case 0x08: + case 0x0c: + return TARGET_FPE_FLTRES; + } + /* + * Non-IEEE and simulated IEEE: + * Includes compare-and-trap, quantum exception, etc. + * Simulated IEEE are included here to match current + * s390x linux kernel. + */ + return 0; +} + void cpu_loop(CPUS390XState *env) { CPUState *cs =3D env_cpu(env); @@ -106,29 +135,14 @@ void cpu_loop(CPUS390XState *env) =20 case PGM_DATA: n =3D (env->fpc >> 8) & 0xff; - if (n =3D=3D 0xff) { - /* compare-and-trap */ + if (n =3D=3D 0) { goto do_sigill_opn; - } else { - /* An IEEE exception, simulated or otherwise. */ - if (n & 0x80) { - n =3D TARGET_FPE_FLTINV; - } else if (n & 0x40) { - n =3D TARGET_FPE_FLTDIV; - } else if (n & 0x20) { - n =3D TARGET_FPE_FLTOVF; - } else if (n & 0x10) { - n =3D TARGET_FPE_FLTUND; - } else if (n & 0x08) { - n =3D TARGET_FPE_FLTRES; - } else { - /* ??? Quantum exception; BFP, DFP error. */ - goto do_sigill_opn; - } - sig =3D TARGET_SIGFPE; - goto do_signal_pc; } =20 + sig =3D TARGET_SIGFPE; + n =3D get_pgm_data_si_code(n); + goto do_signal_pc; + default: fprintf(stderr, "Unhandled program exception: %#x\n", n); cpu_dump_state(cs, stderr, 0); --=20 2.31.1 From nobody Fri May 17 06:43:28 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625846863635971.5503620272871; Fri, 9 Jul 2021 09:07:43 -0700 (PDT) Received: from localhost ([::1]:42500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1t2U-0003FD-I3 for importer@patchew.org; Fri, 09 Jul 2021 12:07:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1t0J-0008Ch-BT; Fri, 09 Jul 2021 12:05:28 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:14524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1t0H-0007BU-FK; Fri, 09 Jul 2021 12:05:27 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 169G40FY057490; Fri, 9 Jul 2021 12:05:22 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39pcs6mpe8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jul 2021 12:05:22 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 169G4CgP058576; Fri, 9 Jul 2021 12:05:22 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 39pcs6mpd6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jul 2021 12:05:22 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 169FwCvJ008560; Fri, 9 Jul 2021 16:05:20 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma02wdc.us.ibm.com with ESMTP id 39jfhdvt9b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Jul 2021 16:05:20 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 169G5Kk640174018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Jul 2021 16:05:20 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFDB12805E; Fri, 9 Jul 2021 16:05:19 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6CE5C28058; Fri, 9 Jul 2021 16:05:19 +0000 (GMT) Received: from LAPTOP-K4LLPL5U.localdomain (unknown [9.65.254.146]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 9 Jul 2021 16:05:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=PPvyftQaSoVUV5zvRZWbw99RoIbePRuZu1v4EQhjEOA=; b=PFXG5XG4Yw9bVmKT9UxaE4455ilb8cJYe4jKnwazUnljtwSPlIfttOmCh+caP4IbeXi3 mzGkGmTf4R+5J3r+YfG+qVqb85sf8sBFClMaxC474yT3g05KxUvHvd7YKZqvX1Qb6adl yq5s0SS98GHOfpehRp12/pR1FI4p0YmvODmQgiwaKKmNa3XpP7/4NuJ4dgVLDI+v5Hs6 u32uEim+clKUUMlDKhtLeB3ptLXKM8vtfmWzzZVG5+iC4hyULTTQecpUR/tn6k+vfr7R HQCvlGRMqirxP9vuSz1yTv6mXl4u4LuY1y5Ay5y0+EMEeLJXt98huz38lNScwmdaev/9 8A== From: Jonathan Albrecht To: qemu-devel@nongnu.org Subject: [PATCH v3 2/2] tests/tcg: Test that compare-and-trap raises SIGFPE Date: Fri, 9 Jul 2021 12:04:59 -0400 Message-Id: <20210709160459.4962-3-jonathan.albrecht@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210709160459.4962-1-jonathan.albrecht@linux.vnet.ibm.com> References: <20210709160459.4962-1-jonathan.albrecht@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 9qP9dizXKF8hnPezSgKQThwqf3jYjjEY X-Proofpoint-GUID: UY1ts58zIEoGLSmXbOD_VpvFMDw7c6vh X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-09_10:2021-07-09, 2021-07-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 bulkscore=0 adultscore=0 impostorscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107090081 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.156.1; envelope-from=jonathan.albrecht@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ruixin.bao@ibm.com, Jonathan Albrecht , iii@linux.ibm.com, david@redhat.com, cohuck@redhat.com, richard.henderson@linaro.org, laurent@vivier.eu, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, krebbel@linux.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1625846865055100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathan Albrecht --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/trap.c | 102 ++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 tests/tcg/s390x/trap.c diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.tar= get index 0a5b25c156..d440ecd6f7 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -9,6 +9,7 @@ TESTS+=3Dexrl-trtr TESTS+=3Dpack TESTS+=3Dmvo TESTS+=3Dmvc +TESTS+=3Dtrap =20 # This triggers failures on s390x hosts about 4% of the time run-signals: signals diff --git a/tests/tcg/s390x/trap.c b/tests/tcg/s390x/trap.c new file mode 100644 index 0000000000..d4c61c7f52 --- /dev/null +++ b/tests/tcg/s390x/trap.c @@ -0,0 +1,102 @@ +/* + * Copyright 2021 IBM Corp. + * + * This work is licensed under the terms of the GNU GPL, version 2 or (at + * your option) any later version. See the COPYING file in the top-level + * directory. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static void error1(const char *filename, int line, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d: ", filename, line); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); + exit(1); +} + +static int __chk_error(const char *filename, int line, int ret) +{ + if (ret < 0) { + error1(filename, line, "%m (ret=3D%d, errno=3D%d/%s)", + ret, errno, strerror(errno)); + } + return ret; +} + +#define error(fmt, ...) error1(__FILE__, __LINE__, fmt, ## __VA_ARGS__) + +#define chk_error(ret) __chk_error(__FILE__, __LINE__, (ret)) + +int sigfpe_count; +int sigill_count; + +static void sig_handler(int sig, siginfo_t *si, void *puc) +{ + if (sig =3D=3D SIGFPE) { + if (si->si_code !=3D 0) { + error("unexpected si_code: 0x%x !=3D 0", si->si_code); + } + ++sigfpe_count; + return; + } + + if (sig =3D=3D SIGILL) { + ++sigill_count; + return; + } + + error("unexpected signal 0x%x\n", sig); +} + +int main(int argc, char **argv) +{ + sigfpe_count =3D sigill_count =3D 0; + + struct sigaction act; + + /* Set up SIG handler */ + act.sa_sigaction =3D sig_handler; + sigemptyset(&act.sa_mask); + act.sa_flags =3D SA_SIGINFO; + chk_error(sigaction(SIGFPE, &act, NULL)); + chk_error(sigaction(SIGILL, &act, NULL)); + + uint64_t z =3D 0x0ull; + uint64_t lz =3D 0xffffffffffffffffull; + asm volatile ( + "lg %%r13,%[lz]\n" + "cgitne %%r13,0\n" /* SIGFPE */ + "lg %%r13,%[z]\n" + "cgitne %%r13,0\n" /* no trap */ + "nopr\n" + "lg %%r13,%[lz]\n" + "citne %%r13,0\n" /* SIGFPE */ + "lg %%r13,%[z]\n" + "citne %%r13,0\n" /* no trap */ + "nopr\n" + : + : [z] "m" (z), [lz] "m" (lz) + : "memory", "r13"); + + if (sigfpe_count !=3D 2) { + error("unexpected SIGFPE count: %d !=3D 2", sigfpe_count); + } + if (sigill_count !=3D 0) { + error("unexpected SIGILL count: %d !=3D 0", sigill_count); + } + + printf("PASS\n"); + return 0; +} --=20 2.31.1