Ich versuche, die Atomic LDSET ARM Instruction (http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_chi1476202820379.htm) als Inline-Assembler-Code in C zu verwenden, aber irgendwie bin ich nicht in der Lage, die richtigen Operanden, um herauszufinden. Ich schrieb diesesLDSET ARM-Befehl als Inline-Assembler
int value = 1024; //operate on this value
int setBit = 7; //set the 7th bit
int initValue = 0; //return the original value in this
asm("ldset %w0, %w2, %x1" : "+r"(value), "=r"(initValue) : "r"(setBit));
und bekam diesen Fehler:
test-lib.cpp:26:9: error: invalid operand for instruction
asm("ldset %w0, %w2, %x1" : "+r"(value), "=r"(initValue) : "r"(setBit));
^
<inline asm>:1:17: note: instantiated into assembly here
ldset w9, w10, x10
^
etwas Hilfe bitte auf diesen Bedarf.