* [OpenRISC] OR1200-generic-question
@ 2016-09-13 5:44 esmaeel ensanimehr
0 siblings, 0 replies; only message in thread
From: esmaeel ensanimehr @ 2016-09-13 5:44 UTC (permalink / raw)
To: openrisc
Dear Sir
I want to use custom instruction in OR1200-generic with inline
assembly in a simple C code.
(may possible to use general defined instruction buts i want to
implement it for future work on OR Project).
___add___ work for me
int x=2,y=3,sum=0;
__asm__("l.add %0,%1,%2" : "=r" (sum) : "r" (x), "r" (y));
///sum : 5
-----------------------
i try to implement a new shift command. shift b to left by c
position and store to a
int a,b,c;//
__asm__("l.cust5 %0%1%2":"=r" (a):"r" (b):"r" (c)); /// a <= b << c ;
but this argument list cause error
/// __asm__("l.cust5"); run correct .
i find that verilog code for shift must be add in or1200_alu.v in final
part.
but how to inform to compiler new added list of argument for cust5.
i find or1k-opc.c and or32-opc.c , damage these file to see how effect
on compile side (or1k-elf) and sim with fusesoc but no effect .
please inform me how to do it.
your sincerly
Esmaeel EnsaniMehr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.librecores.org/pipermail/openrisc/attachments/20160913/a9ab00c8/attachment.html>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-13 5:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-13 5:44 [OpenRISC] OR1200-generic-question esmaeel ensanimehr
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.