public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113179] New: MIPS
@ 2023-12-30 10:36 syq at gcc dot gnu.org
  2023-12-31  6:42 ` [Bug rtl-optimization/113179] [11/12/13/14 Regression] MIPS: INS is used for long long, before SLL pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: syq at gcc dot gnu.org @ 2023-12-30 10:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113179

            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 = b;
}
```

When this code is built on -mabi=64, 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 (bits
63..31 equal), then the result of the operation is UNPREDICTABLE.
```

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-06  4:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-30 10:36 [Bug target/113179] New: MIPS syq at gcc dot gnu.org
2023-12-31  6:42 ` [Bug rtl-optimization/113179] [11/12/13/14 Regression] MIPS: INS is used for long long, before SLL pinskia at gcc dot gnu.org
2023-12-31  6:44 ` [Bug middle-end/113179] " pinskia at gcc dot gnu.org
2024-03-04  4:20 ` law at gcc dot gnu.org
2024-04-27  9:16 ` [Bug middle-end/113179] [11/12/13/14/15 " syq at gcc dot gnu.org
2024-05-06  4:10 ` cvs-commit at gcc dot gnu.org
2024-05-06  4:13 ` syq at gcc dot gnu.org
2024-05-06  4:15 ` syq at gcc dot gnu.org
2024-05-06  4:18 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).