RISCV inline assembly code

3,153 views
Skip to first unread message

Nhon Quach

unread,
Dec 19, 2017, 2:05:36 AM12/19/17
to sw-...@groups.riscv.org
Hi, all,

I am writing C code, but need to point the a0 and a1 registers in the CPU to some data structures and do a few other things (such as making a call, etc.). Is there any reference material I can read up on? I found some generic asm volatile stuff for putting inline assembly code, but they are x86 specific. Is there a RISCV one somewhere?

Would appreciate your help asap. I am stuck :).

Thanks,

Nhon 

Tommy Murphy

unread,
Dec 19, 2017, 4:38:48 AM12/19/17
to RISC-V SW Dev

Anton Krug

unread,
Dec 19, 2017, 7:42:04 AM12/19/17
to Nhon Quach, sw-...@groups.riscv.org

I was using this manual:


http://www.ethernut.de/en/documents/arm-inline-asm.html


It works well on my riscv experiments.



From: Nhon Quach <nhon....@gmail.com>
Sent: 19 December 2017 07:05:33
To: sw-...@groups.riscv.org
Subject: [sw-dev] RISCV inline assembly code
 
EXTERNAL EMAIL

--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CALXyL8EO8FzSzQ3dqrJB9J-GFjQTpcUjngntuNEr%3DYxh4-bQ1g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages