public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/64871] New: inline assembly neon
@ 2015-01-30 6:39 x8zmac at hotmail dot com
2015-01-30 7:40 ` [Bug target/64871] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: x8zmac at hotmail dot com @ 2015-01-30 6:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64871
Bug ID: 64871
Summary: inline assembly neon
Product: gcc
Version: 4.8.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: x8zmac at hotmail dot com
Hi
I add a piece of code in multimedia.
It makes data in array reverse.
It works, but when I add -O2 or -O3 the result is error and vmov with -O2 ,-O3
create illegal instruction.
asm volatile
(
"pld [%0, #0xFFF];\n\t\
vldm %0!,{d0-d3};\n\t\
vswp.32 d0,d3;\n\t\
vswp.32 d1,d2;\n\t\
VREV64.32 q0, q0;\n\t\
VREV64.32 q1, q1;\n\t\
vstm %1!,{d0-d3};"
:
:"r"(data),"r"(coeff),"r"(tmp),"r"(sum),"r"(ptr)
:"d0", "d1","d2","d3","d4","d5","d6","d7"
);
asm volatile
(
"pld [%0, #0xFFF];\n\t\
vldm %0!,{d0-d3};\n\t\
vldm %1!,{d4-d7};\n\t\
VMUL.I32 d0,d0,d4;\n\t\
VMUL.I32 d1,d1,d5;\n\t\
VMUL.I32 d2,d2,d6;\n\t\
VMUL.I32 d3,d3,d7;\n\t\
VADD.I32 d0,d0,d1;\n\t\
VADD.I32 d2,d2,d3;\n\t\
VADD.I32 d0,d0,d2;\n\t\
VMOV %2,%3,d0;\n\t\
add %3,%3,%2;\n\t\
str %3,[%4]"
:
:"r"(data),"r"(coeff),"r"(tmp),"r"(sum),"r"(ptr)
:"d0", "d1","d2","d3","d4","d5","d6","d7"
);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/64871] inline assembly neon
2015-01-30 6:39 [Bug c/64871] New: inline assembly neon x8zmac at hotmail dot com
@ 2015-01-30 7:40 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-01-30 7:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64871
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|c |target
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You don't record that you write memory. Also you don't record that you touch
%0.
You should be using the neon intrinsics instead really.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-30 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 6:39 [Bug c/64871] New: inline assembly neon x8zmac at hotmail dot com
2015-01-30 7:40 ` [Bug target/64871] " 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).