From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 288C53858290; Mon, 20 Jun 2022 12:25:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 288C53858290 From: "ulrich.weigand at de dot ibm.com" To: gdb-prs@sourceware.org Subject: [Bug tdep/29247] [gdb, tdep] ../../gdb/ppc-sysv-tdep.c:1945: internal-error: ppc64_sysv_abi_return_value: Assertion `ok' failed Date: Mon, 20 Jun 2022 12:25:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ulrich.weigand at de dot ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2022 12:25:23 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29247 ulrich.weigand at de dot ibm.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ulrich.weigand at de dot i= bm.com --- Comment #8 from ulrich.weigand at de dot ibm.com --- (In reply to Tom de Vries from comment #7) > I finally remembered that I can use osc to build the gdb package for the > tumbleweed distro, even if the powerpc machine isn't running tumbleweed. Thanks for looking into this! It seems we indeed forgot to add support for IEEE long double to ppc-sysv-tdep.c ... > As a first try, I added this code: > ... > if (tdep->elf_abi =3D=3D POWERPC_ELF_V2 > && TYPE_LENGTH (valtype) =3D=3D 16 > && valtype->code () =3D=3D TYPE_CODE_FLT > && (gdbarch_long_double_format (gdbarch) > =3D=3D floatformats_ia64_quad)) > { > int regnum =3D tdep->ppc_vsr0_regnum + 32 + 2 + index; >=20 > if (writebuf !=3D NULL) > { > regcache->cooked_write (regnum, writebuf); > } > if (readbuf !=3D NULL) > { > regcache->cooked_read (regnum, readbuf); > } > return 1; > } This looks good to me, except for: > I'm not sure if the tdep->elf_abi =3D=3D POWERPC_ELF_V2 and > gdbarch_long_double_format (gdbarch) =3D=3D floatformats_ia64_quad are bo= th > necessary. I don't think the elf_abi check is needed, the floatformat check should be enough. > Still, four fails lefts: > ... > FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc1, ldc2) > FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc= 2, > ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, > ldc3, ldc4) > FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc= 1, > ldc2) > FAIL: gdb.base/callfuncs.exp: noproto: p > t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, > ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) > ... There are more places in ppc-sysv-tdep.c that need to handle IEEE long doub= le, in particular ppc64_sysv_abi_push_freg and ppc64_sysv_abi_return_value_base= .=20 Those should hopefully fix the above inferior call tests. --=20 You are receiving this mail because: You are on the CC list for the bug.=