riscvarchive / riscv-binutils-gdb

RISC-V backports for binutils-gdb. Development is done upstream at the FSF.
GNU General Public License v2.0
147 stars 233 forks source link

how can i automatic allocate register when i use vector instruct? #181

Closed JointMicro closed 4 years ago

JointMicro commented 4 years ago

My code : long long a = 5,b = 2,c = 6;

asm("vwmul.vx %dest, %src1, %src2"
    :[dest]"=v"(a)
    :[src1]"v"(b),[src2]"r"(c));

compile error : main.c:17:2: error: impossible constraint in 'asm' asm("vwmul.vx %dest, %src1, %src2"

jim-wilson commented 4 years ago

There is no compiler support as yet, so no way to write extended asms. You can only write assembly language code.

JointMicro commented 4 years ago

thank you for your early feedback. what time do it can be used,please?

jim-wilson commented 4 years ago

There is no dedicated person working on it, so it is impossible to say when it might be ready, other than the fact that it is unlikely to be anytime soon.

wzgpeter commented 3 years ago

is there any progress on this issue. thank you!