public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96236] New: __builtin_mma_disassemble_acc() doesn't store elements correctly in LE mode
@ 2020-07-17 20:08 bergner at gcc dot gnu.org
  2020-07-17 20:09 ` [Bug target/96236] " bergner at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-17 20:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96236
           Summary: __builtin_mma_disassemble_acc() doesn't store elements
                    correctly in LE mode
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bergner at gcc dot gnu.org
  Target Milestone: ---

The __builtin_mma_disassemble_acc built-in doesn't correctly account for little
endian byte ordering of the pointer type passed to it is not a __vector_quad
pointer as the following test case shows:

bergner@pike:~/$ cat disassemble.c 
void
buggy (void *dst)
{
  __vector_quad acc;
  __builtin_mma_xxsetaccz (&acc);
  __builtin_mma_disassemble_acc (dst, &acc);
}

void
foo (__vector_quad *dst)
{
  __vector_quad acc;
  __builtin_mma_xxsetaccz (&acc);
  __builtin_mma_disassemble_acc (dst, &acc);
}
bergner@pike:~/$ gcc -S -O2 -mcpu=power10 disassemble.c 
bergner@pike:~/$ cat disassemble.s 
buggy:
        xxsetaccz 0
        xxmfacc 0
        stxv 0,0(3)
        stxv 1,16(3)
        stxv 2,32(3)
        stxv 3,48(3)
        blr

foo:
        xxsetaccz 0
        xxmfacc 0
        stxvp 2,0(3)
        stxvp 0,32(3)
        blr

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

end of thread, other threads:[~2020-07-23 19:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 20:08 [Bug target/96236] New: __builtin_mma_disassemble_acc() doesn't store elements correctly in LE mode bergner at gcc dot gnu.org
2020-07-17 20:09 ` [Bug target/96236] " bergner at gcc dot gnu.org
2020-07-22 18:37 ` cvs-commit at gcc dot gnu.org
2020-07-22 18:39 ` bergner at gcc dot gnu.org
2020-07-22 19:26 ` bergner at gcc dot gnu.org
2020-07-23 17:17 ` cvs-commit at gcc dot gnu.org
2020-07-23 19:35 ` bergner 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).