I am using the 11.2.1 tools. I want to do in-out paramters, and immediate values would be nice too.
Runes in other gcc manuals suggest that the likes of this works for tmp as an in-out variable, a common pattern on processors which don't have 3-reg RISC capability on most instructions, as XMOS does.
Code: Select all
asm("andnot %0, %2" : "=r"(tmp) : "0"(tmp), "r"(mask));
With
Code: Select all
asm("andnot %0, %2" : "=r"(tmp) : "r"(tmp), "r"(mask));
Some variants support the use of "+" for in-out, I read i.e.
Code: Select all
asm("andnot %0, %1" : "+r"(tmp) : "r"(mask));
This also does not work
Code: Select all
asm("ldc r0, %0" :: "i"(0xf7));
Code: Select all
#include <xs1.h>
#define stringify(x) stringify0(x)
#define stringify0(x) #x
asm("getr %0, " stringify(XS1_RES_TYPE_LOCK) : "=r"(lock));
Regards
Max.