æ¥é ãã楽天ã®ãµã¼ãã¹ããå©ç¨ããã ãã¾ãã¦ãããã¨ããããã¾ãã ãµã¼ãã¹ããå©ç¨ããã ãã¦ããã¾ãã¨ãã大å¤ç³ã訳ãããã¾ããããç¾å¨ãç·æ¥ã¡ã³ããã³ã¹ãè¡ããã¦ããã ãã¦ããã¾ãã ã客æ§ã«ã¯ãç·æ¥ã®ã¡ã³ããã³ã¹ã«ããããè¿·æãããããã¦ãããèª ã«ç³ã訳ãããã¾ããã ã¡ã³ããã³ã¹ãçµäºæ¬¡ç¬¬ããµã¼ãã¹ã復æ§ãããã¾ãã®ã§ã ä»ãã°ãããå¾ ã¡ããã ãã¾ãããããé¡ãç³ãä¸ãã¾ãã
"asm"ã¨"__asm__"ã¯ãåºæ¬çã«ã¯åãã§ãããã"__asm__"ã¯ä½¿ç¨ãã¦ããè¨èªã®äºç´èª/é¢æ°çã¨ã¶ã¤ããå ´å使ç¨ãã¾ããã¾ãã¯ANSI Cäºæã®ã³ã¼ããã¤ãã£ã¦ããå ´åã"asm"ãã¼ã¯ã¼ãã使ç¨ã§ããªããªãã®ã§"__asm__"ã使ãã¾ãã /* keyword asm ã¨åãé¢æ°*/ function asm(void){ } /* asmã使ç¨ã§ããªãã®ã§__asm__ãä½¿ç¨ */ function inline(){ __asm__("asm code"); }
âGCC x86ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã© asm ("å½ä»¤ source,dest"); â ã°ãã¼ãã«å¤æ° --------------------------------------------------------- ãã®ã¾ã¾ä½¿ãã¾ã #include <stdio.h> int i; int j; main(){ i=10; asm ("movl i,%eax"); asm ("add $10,%eax");  //æ°å¤ã¯å é ã«$ãã¼ã¯ãä»ãã asm ("movl %eax,j"); printf("%d %d\n",i,j); } â¼ä¸ã®ããã°ã©ã ã®æ¸ãæ¹ãå¤ãããã® #include <stdio.h> int i; int j; main(){ i=10; asm (  "movl i,%eax  \n\t" "add $10,%eax  \n\t" "movl %eax,j"
gcc4.1ã®__attribute__ã®ã¡ã¢ã é¢æ°å±æ§ â __attribute__((alias("name"))) é¢æ°ãä»ã®é¢æ°ã®ã¨ã¤ãªã¢ã¹ã«ããã void foo() __attribute__((alias("bar"))); __attribute__((always_inline)) æé©åããªãã®ã¨ãã§ããé¢æ°ãã¤ã³ã©ã¤ã³å±éããã __attribute__((flatten)) é¢æ°ã®ãµã¤ãºãã¤ã³ã©ã¤ã³åãã©ã¡ã¼ã¿ãç¡è¦ãã¦ã常ã«ã¤ã³ã©ã¤ã³å±éããã __attribute__((cdecl)) 386å°ç¨ã __attribute__((const)) é¢æ°ã«å¯ä½ç¨ããªããæ»ãå¤ãå¼æ°ã®ã¿ã«ä¾åããã¨ä»®å®ããã __attribute__((constructor)) é¢æ°ãmainã«å ¥ãåã«èªåçã«å¼ã°ããããã«ããã __attribute__((dest
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}