<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/alabama_country/">
    <title>alabama_country @Wiki</title>
    <link>http://w.atwiki.jp/alabama_country/</link>
    <atom:link href="https://w.atwiki.jp/alabama_country/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>alabama_country @Wiki</description>

    <dc:language>ja</dc:language>
    <dc:date>2015-02-22T13:01:45+09:00</dc:date>
    <utime>1424577705</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/7.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/43.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/36.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/42.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/15.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/41.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/40.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/alabama_country/pages/39.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/7.html">
    <title>SandBox</title>
    <link>https://w.atwiki.jp/alabama_country/pages/7.html</link>
    <description>
      *サンドボックスの目的
慣用的に砂場と呼ばれるお遊び場。さて、適当にいじってみてください。
**引用文
&gt; 鷹田いわく、我ら意鶴を蟹梓乃と四番と。
ははぁ。
&gt; 最近C組危ないですねー(by ホリヰモン)
&gt; 君、君のことも含んでだ、M君!
&gt; m9(ﾟДﾟ,,)!
**ソースコード
codehighlight
#codehighlight(c++){{
#include &lt;iostream&gt;
class Jaga
{
public:
	Jaga();
	~Jaga();
	void bake();
private:
	unsigned int length;	// 長さ
	signed char name[20];	// 名前を入れる
};
int main(int argc, char *argv[])
{
	if(!argc)
		return 0;
	else
	{
		// 処理
	}
	Jaga jagaimo;
	jagaimo.bake();
}
Jaga::bake(void)
{
/****************
 **元気ですかー**
 ****************/
	int i;
	Daikon-&gt;length;
}
}}
**リスト
-とらｋ
-なつｓ
-おねｇ
-ゆのｈ
+ぷりｎ
+はるｋ
+ですｍ
+げほげほ
**定義済みリスト
: ポプラ･いちょう| 校長のこと。
: ザビエル| 音楽科
: ぴぐもん| 社会科系
: トトロ| 同じく社会科
: ロシア人| 数学科
I think it Right!
 I think it Right!
| 商品| 価格| 性格|
| これ|BGCOLOR(RED)1円| みんな元気|
| あれ|BGCOLOR(#FFF7EE)100円| 氏ね|
| それ| Priceless| ﾏﾀｰﾘ|
----
**投票
#vote(とらｋ[3],なつｓ[2],おねｇ[2],ゆのｈ[13],ぷりｎ[3],はるｋ[2],どれもいらないお[2])
----
**コメント
- 来たー、といってみるてすつ  -- 管理wwww  (2006-02-25 19:32:54)
#comment
----
&amp;counter()       </description>
    <dc:date>2015-02-22T13:01:45+09:00</dc:date>
    <utime>1424577705</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/43.html">
    <title>linux</title>
    <link>https://w.atwiki.jp/alabama_country/pages/43.html</link>
    <description>
      *Gnome
**GConf
gconftool-2はGconfという設定を共有するための仕組み、みたいなのの設定用ツール。ログイン画面の変更のためにはgdmユーザで設定しないと意味がないので、sudo -u &#039;gdm&#039; gconftool-2 ...
**XRandR
xrandrを使うとディスプレイの解像度を変更できるので、これを起動直後に走らせたいと思ったら/etc/gdm/の下のInit/に$DISPLAYと同じ名の実行権限のついたファイルを置け。ちなみにそこでVGAがあるかないか調べたかったけどxrandr -q | grepという…    </description>
    <dc:date>2010-04-09T18:15:30+09:00</dc:date>
    <utime>1270804530</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/alabama_country/pages/1.html</link>
    <description>
      *このwiki
個人ツール。
*教科一覧
//-ドイツ語(一列と二列ごっちゃ)
-[[C言語]]
-[[ディジタル回路]]
-信号解析基礎（取り敢えず暫定PDFだけ貼っとく&amp;ref(SignalAnalysis.pdf)）
-[[バージョン管理]]
-[[LaTeX]]
-[[前期実験]]
-[[後期実験]]
-[[Twitter]]
-数学3正かな版ノート&amp;ref(note_old.pdf)
-[[linux]]
-[[産業総論]]
//-英語二列
//&amp;html(&lt;span style=&quot;color:red;font-size:150%;&quot;&gt;遅い、遅すぎるっ！&lt;/span&gt;)
//[[WLRepo - 基本骨子]]
//[[WL - 2章]]
遊び、練習はこちらで。
[[SandBox]]
----

■　その他にもいろいろな機能満載！！
-[[詳しくは、FAQ・初心者講座@wikiをみてね☆&gt;http://www1.atwiki.jp/faq/]]

**分からないことは？
-[[@wikiの詳しい使い方はヘルプ・FAQ・初心者講座@wikiをごらんください。メールでのお問い合わせも受け付けております。&gt;http://www1.atwiki.jp/faq/]]
-[[ユーザ同士のコミュニケーションにはたすけあい掲示板をご利用ください&gt;http://bbs.atwiki.jp/]]

&amp;counter()人
- CSSの修正で横幅がリキッドになりました  -- お知らせ  (2009-01-05 16:23:32)
- C++で宿題のコードを結構華麗に解いた  -- お知らせ  (2009-01-09 02:32:19)
#comment    </description>
    <dc:date>2010-04-09T18:13:57+09:00</dc:date>
    <utime>1270804437</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/alabama_country/pages/2.html</link>
    <description>
      -[[トップページ]]
-C言語
--[[C言語]]
-[[SandBox]]
-[[メニュー]]
-[[更新履歴&gt;メニュー2]]
#javascript(){{
&lt;script type=&quot;text/javascript&quot;&gt;
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src=&#039;&quot; + gaJsHost + &quot;google-analytics.com/ga.js&#039; type=&#039;text/javascript&#039;%3E%3C/script%3E&quot;));
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
try {
var pageTracker = _gat._getTracker(&quot;UA-407503-4&quot;);
pageTracker._trackPageview();
} catch(err) {}&lt;/script&gt;
}}    </description>
    <dc:date>2010-02-10T23:56:06+09:00</dc:date>
    <utime>1265813766</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/36.html">
    <title>産業総論</title>
    <link>https://w.atwiki.jp/alabama_country/pages/36.html</link>
    <description>
          </description>
    <dc:date>2010-02-10T23:55:30+09:00</dc:date>
    <utime>1265813730</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/42.html">
    <title>C-assign-2009-11-17</title>
    <link>https://w.atwiki.jp/alabama_country/pages/42.html</link>
    <description>
      *積分
#codehighlight(c){{
/* 
 * int_seq.c
 *
 * compile:
 *   gcc int_seq.c -lm
 *
 */

#include &lt;pthread.h&gt;
#include &lt;unistd.h&gt;
#include &lt;math.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;sys/time.h&gt;

typedef struct f_args
{
  double (*f)(double);
  double dest;
  double a;
  double b;
  int N;
} f_args, * f_args_t;

void* integrate(void * _arg)
{
  f_args_t arg = _arg;
  double (*f)(double) = arg-&gt;f;
  double a = arg-&gt;a;
  double b = arg-&gt;b;
  int N = ((f_args_t)_arg)-&gt;N;
  int i;
  double s = 0.0;
  for (i = 0; i &lt; N; i++) {
    double x      = a + (b - a) *  i      / N;
    double x_next = a + (b - a) * (i + 1) / N;
    double dx = x_next - x;
    s += f(x) * dx;
  }
  arg-&gt;dest = s;
  return _arg;
}

double cur_time()
{
  struct timeval tp[1];
  gettimeofday(tp, NULL);
  return tp-&gt;tv_usec * 1.0E-6 + tp-&gt;tv_sec;
}

int main()
{
  //int n_threads = 2;
  //pthread_t *tids = (pthread_t *)malloc(sizeof(pthread_t *) * n_threads);
  //f_args *args = (f_args *)malloc(sizeof(f_args_t *) * n_threads);
  pthread_t tids[2];
  double a = 0.0;
  double b = M_PI / 2.0;
  double t0 = cur_time();
  //int N = 100000000;
  f_args args1 = {sin, 0.0, a, b/2, 50000000};
  f_args args2 = {sin, 0.0, b/2, b, 50000000};
  double s;
  pthread_create(&amp;tids[0], NULL, integrate, &amp;args1);
  pthread_create(&amp;tids[1], NULL, integrate, &amp;args2);
  pthread_join(tids[0], NULL);
  pthread_join(tids[1], NULL);
  s = args1.dest + args2.dest;
  double t1 = cur_time();
  printf(&quot;\\int_[%f,%f] sin(x) dx = %f\n&quot;, a, b, s);
  printf(&quot;%.6f sec\n&quot;, t1 - t0);
  return 0;
}
}}
*素数
**C言語版
#codehighlight(c){{
/* 
 * prime_seq.c
 *
 *
 */

#include &lt;stdio.h&gt;
#include &lt;sys/time.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;pthread.h&gt;
#include &lt;unistd.h&gt;

typedef struct prime_task
{
  int a;
  int b;
} *prime_task_t;

typedef struct f_args
{
  prime_task_t task;
  int thread_id;
} f_args, *f_args_t;

volatile int task_counter = 0;
volatile int primes_counter = 0;
int n_prime_task = 100;
pthread_mutex_t m;

#undef DEBUG

int check_prime(int n)
{
  int d;
  for (d = 2; d * d &lt;= n; d++) {
    if (n % d == 0) return 0;
  }
#ifdef DEBUG
  printf(&quot;%d is prime\n&quot;, n);
#endif
  return 1;
}

int check_primes(int a, int b)
{
  int n;
  int s = 0;
  for (n = a; n &lt; b; n++) {
    s += check_prime(n);
  }
  return s;
}

void* check_primes_th(void * _task)
{
  prime_task_t task = ( (f_args_t)_task)-&gt;task;
  int a,b;
  while(1)
    {
      pthread_mutex_lock(&amp;m);
      if(task_counter &gt;= n_prime_task)
	break;
      a = task[task_counter].a;
      b = task[task_counter].b;
      ++task_counter;
      pthread_mutex_unlock(&amp;m);
#ifdef DEBUG
      printf(&quot;task : %d, thread : %d\n&quot;,task_counter-1, ( (f_args_t)_task)-&gt;thread_id);
#endif
      primes_counter += check_primes(a,b);
    }
  pthread_mutex_unlock(&amp;m);
  return NULL;
}

double cur_time()
{
  struct timeval tp[1];
  gettimeofday(tp, NULL);
  return tp-&gt;tv_usec * 1.0E-6 + tp-&gt;tv_sec;
}

int main()
{
  int N = 10000000;
  pthread_t tids[2];
  f_args args[2];
  prime_task_t pt = (prime_task_t)malloc(sizeof(struct prime_task) * n_prime_task);
  int t;
  for(t=0; t &lt; n_prime_task; ++t)
    {
      pt[t].a = (N-1)*  t  /n_prime_task + 2;
      pt[t].b = (N-1)*(t+1)/n_prime_task + 1;
    }
  pthread_mutex_init(&amp;m, NULL);
  args[0].task = args[1].task = pt;
  args[0].thread_id = 1;
  args[1].thread_id = 2;
  double t0 = cur_time();
  pthread_create(&amp;tids[0], NULL, check_primes_th, &amp;args[0]);
  pthread_create(&amp;tids[1], NULL, check_primes_th, &amp;args[1]);
  pthread_join(tids[0], NULL);
  pthread_join(tids[1], NULL);
  double t1 = cur_time();
  printf(&quot;%d primes in %f sec\n&quot;, primes_counter, t1 - t0);
  return 0;
}
}}
**C++に書き換え
#codehighlight(c++){{
//#define DEBUG // デバッグ用画面出力の制御

#include &lt;cstdio&gt;
#include &lt;sys/time.h&gt;
#include &lt;deque&gt;
#include &lt;vector&gt;
#include &lt;pthread.h&gt;
#include &lt;unistd.h&gt;

inline double cur_time()
{
  struct timeval tp[1];
  gettimeofday(tp, NULL);
  return tp-&gt;tv_usec * 1.0E-6 + tp-&gt;tv_sec;
}

struct PrimeTask
{
  int a, b;
  PrimeTask(int a, int b) : a(a), b(b){};
};


extern &quot;C&quot;
{
  typedef void* (*thread_run_t)(void*);
};

class CheckPrimes
{
private:
  unsigned int n_thread;
  unsigned int n_task;
  pthread_mutex_t m;
  volatile int primes_counter;
  std::deque&lt;PrimeTask&gt; task;

  static int check_prime(int n)
  {
    for (int d = 2; d * d &lt;= n; d++) {
      if (n % d == 0) return 0;
    }
    return 1;
  };

  static int check_primes(int a, int b)
  {
    int n;
    int s = 0;
    for (n = a; n &lt; b; n++) {
      s += check_prime(n);
    }
    return s;
  };

  void check_primes_th()
  {
    int a,b;
    while(1)
      {
	pthread_mutex_lock(&amp;m);
	if(task.empty())
	  break;
	a = task.back().a;
	b = task.back().b;
	task.pop_back();
	pthread_mutex_unlock(&amp;m);
	int x = check_primes(a,b);
	primes_counter += x;
#ifdef DEBUG
	pthread_t xtid = pthread_self();
	printf(&quot;task left : %d, thread : %#x, [%d,%d], detected : %6d, total : %6d\n&quot;,
	       task.size(), (unsigned int)xtid, a, b, x, primes_counter);
#endif
      }
    pthread_mutex_unlock(&amp;m);
  };

  static void run(void * pParam)
  {
    CheckPrimes *pCheckPrimes = (CheckPrimes *)pParam;
    pCheckPrimes-&gt;check_primes_th();
  };

public:
  CheckPrimes(unsigned int threads, unsigned int tasks)
    : n_thread(threads), n_task(tasks), primes_counter(0)
  {
    pthread_mutex_init(&amp;m, NULL);
  };
  int operator()(int Nmax)
  {
    std::vector&lt;pthread_t&gt; tid;
    tid.resize(n_thread);
    task.clear();
    primes_counter = 0;

    for(unsigned int t=0; t &lt; n_task; ++t)
      task.push_back(PrimeTask((Nmax-1)*  t  /n_task + 2,
			       (Nmax-1)*(t+1)/n_task + 1)
		     );

    for(std::vector&lt;pthread_t&gt;::iterator it=tid.begin();
	it != tid.end(); ++it)
      pthread_create(&amp;(*it), NULL, (thread_run_t)CheckPrimes::run, this);
    for(std::vector&lt;pthread_t&gt;::iterator it=tid.begin();
	it != tid.end(); ++it)
      pthread_join(*it, NULL);
    return primes_counter;
  };
};

int main()
{
  int N = 10000000;
  double t0 = cur_time();
  int primes = CheckPrimes(2, 100)(N);
  double t1 = cur_time();
  printf(&quot;%d primes in %f sec\n&quot;, primes, t1 - t0);
  return 0;
}
}}    </description>
    <dc:date>2009-11-20T19:46:01+09:00</dc:date>
    <utime>1258713961</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/15.html">
    <title>C言語</title>
    <link>https://w.atwiki.jp/alabama_country/pages/15.html</link>
    <description>
      *C言語とは？
[[Wikipedia - C言語&gt;http://ja.wikipedia.org/wiki/C%E8%A8%80%E8%AA%9E]]
#co(){
*ノート一覧
要は教科書を脳内に取り込んでコピーすることで理解を図るという企画。
:[[C-基礎知識]] | まずは変数や関数、演算子などの基礎の基礎について。
:[[C-形式的お話]]|Cの常識的とされてあまり教わらないことについて。でもよく読めば結構K&amp;Rに書いてあるんだな。
:[[C-思考回路]] | シーケンシャルな思考の構築方法を制御構文とからめて。
}
*駄ソース
課題の駄ソース。
-[[C-assign-2008-10-30]]
-[[C-assign-2008-12-11]]
-[[C-assign-2009-01-09]]
-[[C-assign-2009-01-09-with-javascript]]
-[[C-test-2009-01-15]]
-[[C-assign-2009-01-23]]
-[[C-assign-2009-03-11]]
-[[C-assign-2009-03-13]]
-[[CPP-assign-2009-06-10]]
-[[CPP-assign-2009-10-27]]
-[[C-assign-2009-11-17]]
*駄文
COBOLかっけぇ
#codehighlight(pre){
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID.     HELLOWORLD.
000300 DATE-WRITTEN.   02/05/96        21:04.
000400*       AUTHOR    BRIAN COLLINS
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400     DISPLAY &quot; &quot; LINE 1 POSITION 1 ERASE EOS.
100500     DISPLAY &quot;HELLO, WORLD.&quot; LINE 15 POSITION 10.
100600     STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800     EXIT.
}    </description>
    <dc:date>2009-11-17T14:26:13+09:00</dc:date>
    <utime>1258435573</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/41.html">
    <title>バージョン管理</title>
    <link>https://w.atwiki.jp/alabama_country/pages/41.html</link>
    <description>
      *sshについてのメモ
[[github アカウントを取ってからのメモ « ゆっくり…して…イってネ！&gt;http://sakuratan.biz/archives/953]]を見てこういうのを学んだ。
~/.ssh/configに
#codehighlight(bash){
IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa
IdentityFile ~/.ssh/%r@%h
}
と書けばいいとのこと。manによると%rはリモートユーザー名で、%hはリモートホスト名。
*ツール
-[[subversion]]
-[[Git]]    </description>
    <dc:date>2009-11-09T10:20:42+09:00</dc:date>
    <utime>1257729642</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/40.html">
    <title>後期実験</title>
    <link>https://w.atwiki.jp/alabama_country/pages/40.html</link>
    <description>
      *後期実験
-[[後期実験-OpenCV/OpenGL]]
-[[後期実験-アセンブリ]]    </description>
    <dc:date>2009-11-05T14:05:26+09:00</dc:date>
    <utime>1257397526</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/alabama_country/pages/39.html">
    <title>後期実験-アセンブリ</title>
    <link>https://w.atwiki.jp/alabama_country/pages/39.html</link>
    <description>
      *Twitter上での議論
:xharaken|関数呼び出しの引数を載せるのをesp[4],esp[8],esp[12],...にしておいて，戻り番地をesp[0]に入れることにすれば，call時にesp-=4する手間やret時にesp+=4する手間が減る気がするんだが・・・・・・何か考え落としてるのかなぁ
:yuyarin|@xharaken コーリングコンベンションって言うから cdecl でそんなことしてたっけと思ったけど，もしかして call, ret で 次のアドレスをスタックに push/pop する仕様の話？
:xharaken|@yuyarin そのpush/popする話．なんでpush/popしなきゃいけないの？esp[4]以降に引数を積んでおいてesp[0]に戻り番地入れるんじゃダメなの？
:yuyarin|@xharaken push/pop がデクリメント/インクリメント→ストアになっている理由は src のアドレス計算を考えれば分かるけど，push/pop esp を可能にするためです．
:xharaken|@yuyarin ごめん．説明の下手で悪いんだけど，(1)一般のpush/popがデクリメント/インクリメント→ストア/ロードになっているのはすこぶる同意，(2)callの仕様が，espを減らした上でesp[0]に戻り番地を書き込む理由がわからない
:xharaken|callの仕様がesp-=4してからesp[0]に戻り番地を入れる方式の場合，f(1,2,3)を呼ぶには，pushl 1; pushl 2; pushl 3; call f;となる．
:xharaken|一方で，callの仕様が単にesp[0]に戻り番地を入れる方式の場合，f(1,2,3)を呼ぶには，pushl 1; pushl 2; pushl 3; pushl 0; call f;みたいに，callの直前で意図的に1個スタックをずらす操作が必要になる
:xharaken|こう考えると，一見，esp-=4してからesp[0]に戻り番地を入れる方式の方が，命令数が少なくて望ましい様に見えるが・・・
:xharaken|実際には（特に関数が複雑でない場合），フレーム開始時にsubl $100, espみたいにして，ガバッとフレームを確保してしまい，f(1,2,3)を呼び出す際には，esp[8]=3; esp[4]=2; esp[0]=1; call f;とする方が多い
:xharaken|そうだとすれば，callの仕様を単にesp[0]に戻り番地を書き込むことにしておいて，esp[12]=3; esp[8]=2; esp[4]=1; call f;と書けるようにしておいた方が，関数呼び出しが微妙に軽くなるんじゃないか・・・という疑問．
:xharaken|ごめん．さっきの例でpushlする順序間違えた．× pushl 1; pushl 2; pushl 3; call f; ○ pushl 3; pushl 2; pushl 1; call f;
:xharaken|いや待てよ，そういうことをやりたければ，callなんか使わずに，esp[12]=3; esp[8]=2; esp[4]=1; esp[0]=eip+5; jmp f;とか書けば良い，って話なのかな．．．（なんか話題があまりに瑣末な気がしてきた）
:yuyarin|@xharaken 一応確認しておきたいんだけど，esp[8] とか書いてる時の esp の基準は call 直前だよね？
:xharaken|@yuyarin そう，esp[8]の基準はcall直前．
:yuyarin|@xharaken push を使おうとする場合，auto var の確保のときに 4スタックポインタのサイズ分多めに取るとか，デクリメントしなきゃいけないので，難読化するし意味も無くなる．call が push を利用する方が統一的で美しい．
:xharaken|@yuyarin というか，4スタックポインタどころか必要十分に大きく取っておけば良いし，現に最適化オプション付きのgccは，単純な関数に対してはたいていそういうコードを出力するみたい．
:yuyarin|@xharaken なんで gcc がスタックの無駄遣いをしているのかは知らない．．．cdecl の規約としては cl の吐く asm の方が簡潔で分かりやすい．
:xharaken|@yuyarin 無駄遣いしてるのは，単に速いからじゃない？クロック数は知らないけど，pushlよりはmovlの方が速そう（衝突も考えなくていい）．gccは，変な最適化周りは相当がんばってる．
:yuyarin|@xharaken まともにスタックを使えば push でも衝突はしない．速そうというのは多分当たっていて，理由は push だと毎回デクリメントする必要があるけど sub&amp;mov ならばそれが必要ないからその分速いはず．
:xharaken|@yuyarin processor consistencyを維持する範囲なら，複数のmovlをOut of orderに実行することも原理的には可能なはず（実際に行われるかは知らないが）    </description>
    <dc:date>2009-11-05T14:04:18+09:00</dc:date>
    <utime>1257397458</utime>
  </item>
  </rdf:RDF>
