I found a built-in asm assembly that works, and I can't figure it out ( link ):
__asm__ __volatile__ (
"1: sbiw %0,1" "\n\t"
"brne 1b" : "=w" (us) : "0" (us)
);
I found several gas manuals such as this , but I could not find an explanation. In any case, the file can be compiled by avr-gcc:
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu = atmega328p -DF_CPU = 16000000L -MMD -DUSB_VID = null -DUSB_PID = null -DARDUINO = 105 -I / Applications / Arduino.app / Contents / Resources / Java / hardware / arduino / core / arduino -I / Applications / Arduino.app / Content / Resources / Java / hardware /arduino/variant/standard/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring.c -o / var / folders / 64 / fwfkm1k51zbd4_c5lwpsbljh0000gn / T / build5450310618632679.. w /.
So what does "= w" mean in the GCC Inline Assembly?
source
share