سؤال

I known the inline assembly in function scope of c. but, I find that I can also declare an asm statement(basic assembly, not extended by gnu) in file scope. I would like to know the function of the inline assembly in file scope of c.

هل كانت مفيدة؟

المحلول

It's a feature like any other, you use it to solve a specific problem. Scanning the linux kernel, you see this used in a number of places. Here's one, along with an explanation of why it was done this way:

bioscalls.c

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top