From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F4203858C29; Sat, 30 Dec 2023 10:36:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F4203858C29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703932608; bh=Dtr4/J03D+kpGY5sEh1uMERXnW0wmR6Eq+LkdsDnC3s=; h=From:To:Subject:Date:From; b=iz+U06h9FK6flZ608S2JUNPA+fR+u4LEAHKX/szNNwYEinLiDELjmAESqfeu0KjF+ 1T9jFUH/3Jjy/nVfUvJDIOOAaROWLgbYtiLAoEgsMYer84KbsPtk1wUOM26B67qTZv YUPebblGET5BS36oyUZzoFTdVDFtgc6BReRq6BAA= From: "syq at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113179] New: MIPS Date: Sat, 30 Dec 2023 10:36:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: syq at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113179 Bug ID: 113179 Summary: MIPS Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: syq at gcc dot gnu.org Target Milestone: --- ``` struct xx { int a:4; int b:24; int c:3; int d:1; }; void xx (struct xx *a, long long b) { a->d =3D b; } ``` When this code is built on -mabi=3D64, it generates asm like this: ``` lw $2,0($4) ins $2,$5,31,1 jr $31 sw $2,0($4) ``` Since the argument B is `long long`, we cannot be sure that it is well sign-extended, while INS asks for it: ``` If either GPR rs or GPR rt does not contain sign-extended 32-bit values (bi= ts 63..31 equal), then the result of the operation is UNPREDICTABLE. ```=