In message <55fc6759.9090...@aaug.net>
John Tytgat wrote:
>This corrupts r0-r3, possibly r14 when this gets executed in SVC. You
>need to tell gcc this. Inline assembler does not follow the APCS-32 ABI
>calling conventions (which I think you seem to assume
On Fri, Sep 18, 2015 at 03:07:43PM +0100, Gavin Wraith wrote:
> Has anyone any advice about the use of data synchronization
> barriers when calling SWIs from C code compiled with GCC?
>
> To give RiscLua a command 'sys' analogous to BASIC's SYS
> command I use this code
>
> asm volatile(
>
Has anyone any advice about the use of data synchronization
barriers when calling SWIs from C code compiled with GCC?
To give RiscLua a command 'sys' analogous to BASIC's SYS
command I use this code
asm volatile(
"stmfd sp!, {r4-r8,r12}" "\n\t"
"orr r12,%1,#0x2 @ X-bit"
On Fri, Sep 18, 2015 at 05:29:38PM +0100, Gavin Wraith wrote:
> In message <20150918150505.gp22...@chiark.greenend.org.uk> you wrote:
>
>
> >In what way does it not seems to work?
>
> Well,
>
> local sys, $, dim in (require "riscos")
> local x, mesg = sys (16)
> print (x and "ok" or mesg)
>
>