• R/O
  • HTTP
  • SSH
  • HTTPS

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Rev. aaaeb63d738f000d38c0b01eeabe30e1fa424fe4
Größe 2,168 Bytes
Zeit 2015-12-17 00:02:37
Autor Yoshinori Sato
Log Message

Merge branch 'master' of ssh://sourceware.org/git/binutils-gdb

Content

                  ^    ->|            |
Frame             |   |  |            |
Number          - |   |  |============|       int fact (int n)
               |  |   |  |   i = 3    |       {
               |  |   |  |------------|         if (0 == n) {
               |  |   |  |   f = ?    |           return  1;  <-------- PC
  #4 main()   <   |   |  |------------|        }
               |  |   |  |            |         else {
               |  |  -+->|------------|   --->    return n * fact (n - 1);
               |   -+-+--+-----o      |  |      }
                =   | |  |============|  |    }
               |    | |  |   n = 3    |  |
               |    | |  |------------|  |    main ()
  #3 fact (3) <     | |  |     o---------+-   {
               |   -+-+->|------------|  | |    int  i;
               |  | |  --+-----o      |  | |
                = | |    |============|  | |    for (i = 0; i < 10; i++) {
               |  | |    |   n = 2    |  |  ->    int  f = fact (i);
               |  | |    |------------|  |        printf ("%d! = %d\n", i , f);
  #2 fact (2) <   | |    |     o------+--|      }
               |  | |  ->|------------|  |    }
               |  |  -+--+-----o      |  |
                = |   |  |============|  |
               |  |   |  |   n = 1    |  |
               |  |   |  |------------|  |
  #1 fact (1) <   |   |  |     o------+--|
               |  |   |  |------------|  |
               |   ---|--+-----o      |<-+------- FP
                =     |  |============|  |                   |
               |      |  |   n = 0    |  |                   |
               |      |  |------------|  |                   |
  #0 fact (0) <       |  |     o---------                    |
               |      |  |------------|                      |
               |       --+-----o      |<--------- SP         |
                =        |============|                      |
               |         |  Red Zone  |                      v  
               |         \/\/\/\/\/\/\/                 Direction of
  #-1         <          \/\/\/\/\/\/\/                 stack growth
               |         |            |