タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

asmに関するgioextのブックマーク (3)

  • gccのx86インラインアセンブリに関して

    GCCでインラインアセンブリを使用 する方法と留意点等 for x86  (1999〜2006年10回改訂、2006年1月22日注意を追加、最終更新日2006年5月27日) 文: A. SAITOH <s-akira at users.sourceforge.net>  home ※システム名、CPU名は一般に開発会社の登録商標です。 以下の情報はあまり過度に信用しないで下さい。より正確な情報は、asやgccのinfoから得て下さい。 個々のプロセッサ命令の解説はここでは述べません。そのような技術資料は、インテルやAMDのウェブ サイトのdeveloper向けのページからpdf形式で入手できます。 以下の文及びプログラム例の運用結果に関して、筆者は一切責任を負いません。 参考文献 [0] D. Stancevic, K. Scheibler, J. Leto, Linux Assembly

    gioext
    gioext 2009/09/03
  • GCC x86インラインアセンブラ

    ○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"

    gioext
    gioext 2009/09/03
  • GCC-Inline-Assembly-HOWTO

    Sandeep.Sv0.1, 01 March 2003. This HOWTO explains the use and usage of the inline assembly feature provided by GCC. There are only two prerequisites for reading this article, and that’s obviously a basic knowledge of x86 assembly language and C. 1. Introduction. 1.1 Copyright and License. 1.2 Feedback and Corrections. 1.3 Acknowledgments. 2. Overview of the whole thing. 3. GCC Assembler Syntax. 4.

    gioext
    gioext 2009/09/03
  • 1