hns - 日記自動生成システム - Version 2.19.9

先月 2013年11月 来月
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2013年11月06日(水) 旧暦 [n年日記] [更新:"2013/11/06 16:42:42"]

#1 [cross] gcc-4.1 for nios2

既に動く gcc-3.4.6 があるので、もしそれを使って crtstuff.c から アセンブリ語を出して見たらどうなるか、と調べて見た。 操作行 (command line) の入力は、gcc-4.1 を作る時のものから借用する
genova@makoto 14:55:09/131106(..build/gcc)%   \
/usr/pkg/cross/bin/nios2-elf-gcc -S  \
-B/usr/pkg/cross/nios2-elf/bin/  \
-B/usr/pkg/cross/nios2-elf/lib/ -isystem  \
/usr/pkg/cross/nios2-elf/include -isystem  \
/usr/pkg/cross/nios2-elf/sys-include -O2 -O2 -g -O2 -DIN_GCC  \
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes  \
-Wmissing-prototypes -Wold-style-definition -isystem ./include  \
-I. -I. -I../../gcc-4.1/gcc  \
-I../../gcc-4.1/gcc/. -I../../gcc-4.1/gcc/../include  \
-I../../gcc-4.1/gcc/../libcpp/include -g0  \
-finhibit-size-directive -fno-inline-functions -fno-exceptions  \
-fno-zero-initialized-in-bss -fno-unit-at-a-time  \
-Dinhibit_libc \ -c ../../gcc-4.1/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.S

In file included from ../../gcc-4.1/gcc/crtstuff.c:71:
../../gcc-4.1/gcc/unwind-dw2-fde.h:36: warning: ignoring #pragma GCC visibility
../../gcc-4.1/gcc/unwind-dw2-fde.h:185: warning: ignoring #pragma GCC visibility
genova@makoto 14:55:23/131106(..build/gcc)% cat -n crtbegin.S | tail -15
 119          stw     ra, 0(sp)
 120  #APP
 121                  .section        .init
 122  #NO_APP
 123          call    frame_dummy
 124  #APP
 125                  .section        .text
 126  #NO_APP
 127          ldw     ra, 0(sp)
 128          addi    sp, sp, 4
 129          ret
 130          .weak   _Jv_RegisterClasses
 131          .weak   __deregister_frame_info
 132          .weak   __register_frame_info
 133          .ident  "GCC: (GNU) 3.4.6 (Altera Nios II 0 b0)"
genova@makoto 14:55:36/131106(..build/gcc)%

-da option for gcc:

gcc には -dletter という指定があります。次に letter = a の場合の例を示します。
/export/git-work/nios2/build/./gcc/xgcc -da \
-B/export/git-work/nios2/build/./gcc/ \
-B/usr/pkg/cross/nios2-elf/bin/ \
-B/usr/pkg/cross/nios2-elf/lib/ -isystem \
/usr/pkg/cross/nios2-elf/include -isystem \
/usr/pkg/cross/nios2-elf/sys-include -O2 -O2 -g -O2 -DIN_GCC \
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wold-style-definition -isystem ./include \
-I. -I. -I../../gcc-4.1/gcc \
-I../../gcc-4.1/gcc/. -I../../gcc-4.1/gcc/../include \
-I../../gcc-4.1/gcc/../libcpp/include -g0 \
-finhibit-size-directive -fno-inline-functions -fno-exceptions \
-fno-zero-initialized-in-bss -fno-unit-at-a-time \
-Dinhibit_libc \
  -c ../../gcc-4.1/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
この結果、次のような中間のものが残されます。
genova@makoto 16:20:38/131106(..build/gcc)% ls -lt |grep crtstuff.c
-rw-r--r--  1 makoto  wheel       445 Nov  6 16:20 crtstuff.c.38.greg
-rw-r--r--  1 makoto  wheel     13763 Nov  6 16:20 crtstuff.c.37.lreg
-rw-r--r--  1 makoto  wheel      9337 Nov  6 16:20 crtstuff.c.36.sched1
-rw-r--r--  1 makoto  wheel      9200 Nov  6 16:20 crtstuff.c.34.life2
-rw-r--r--  1 makoto  wheel      6482 Nov  6 16:20 crtstuff.c.32.split1
-rw-r--r--  1 makoto  wheel      6617 Nov  6 16:20 crtstuff.c.31.regmove
-rw-r--r--  1 makoto  wheel      6640 Nov  6 16:20 crtstuff.c.29.ce2
-rw-r--r--  1 makoto  wheel      6824 Nov  6 16:20 crtstuff.c.28.combine
-rw-r--r--  1 makoto  wheel        60 Nov  6 16:20 crtstuff.c.27.ner
-rw-r--r--  1 makoto  wheel     10261 Nov  6 16:20 crtstuff.c.26.life1
-rw-r--r--  1 makoto  wheel      7951 Nov  6 16:20 crtstuff.c.25.cse2
-rw-r--r--  1 makoto  wheel      8383 Nov  6 16:20 crtstuff.c.23.loop2_done
-rw-r--r--  1 makoto  wheel      8335 Nov  6 16:20 crtstuff.c.18.loop2_init
-rw-r--r--  1 makoto  wheel      5670 Nov  6 16:20 crtstuff.c.17.loop2
-rw-r--r--  1 makoto  wheel      7851 Nov  6 16:20 crtstuff.c.15.ce1
-rw-r--r--  1 makoto  wheel      6617 Nov  6 16:20 crtstuff.c.14.bp
-rw-r--r--  1 makoto  wheel      7562 Nov  6 16:20 crtstuff.c.13.cfg
-rw-r--r--  1 makoto  wheel      8158 Nov  6 16:20 crtstuff.c.12.bypass
-rw-r--r--  1 makoto  wheel      5843 Nov  6 16:20 crtstuff.c.11.old-loop
-rw-r--r--  1 makoto  wheel     11618 Nov  6 16:20 crtstuff.c.10.gcse1
-rw-r--r--  1 makoto  wheel      8199 Nov  6 16:20 crtstuff.c.09.cse1
-rw-r--r--  1 makoto  wheel      8544 Nov  6 16:20 crtstuff.c.08.jump
-rw-r--r--  1 makoto  wheel      6131 Nov  6 16:20 crtstuff.c.07.vregs
-rw-r--r--  1 makoto  wheel      5827 Nov  6 16:20 crtstuff.c.06.unshare
-rw-r--r--  1 makoto  wheel      5827 Nov  6 16:20 crtstuff.c.05.initvals
-rw-r--r--  1 makoto  wheel      5827 Nov  6 16:20 crtstuff.c.03.locators
-rw-r--r--  1 makoto  wheel      5827 Nov  6 16:20 crtstuff.c.02.sibling
-rw-r--r--  1 makoto  wheel      6108 Nov  6 16:20 crtstuff.c.01.eunotes
-rw-r--r--  1 makoto  wheel      6485 Nov  6 16:20 crtstuff.c.00.expand
-rw-r--r--  1 makoto  wheel     13929 Nov  6 16:19 crtstuff.c.20.combine
-rw-r--r--  1 makoto  wheel     27116 Nov  6 16:19 crtstuff.c.33.sched2
-rw-r--r--  1 makoto  wheel     25413 Nov  6 16:19 crtstuff.c.31.bbro
-rw-r--r--  1 makoto  wheel     18849 Nov  6 16:19 crtstuff.c.30.rnreg
-rw-r--r--  1 makoto  wheel     18914 Nov  6 16:19 crtstuff.c.29.ce3
-rw-r--r--  1 makoto  wheel     22974 Nov  6 16:19 crtstuff.c.27.flow2
-rw-r--r--  1 makoto  wheel     14594 Nov  6 16:19 crtstuff.c.26.postreload
-rw-r--r--  1 makoto  wheel     16300 Nov  6 16:19 crtstuff.c.25.greg
-rw-r--r--  1 makoto  wheel     28164 Nov  6 16:19 crtstuff.c.24.lreg
-rw-r--r--  1 makoto  wheel     20560 Nov  6 16:19 crtstuff.c.23.sched
-rw-r--r--  1 makoto  wheel     14392 Nov  6 16:19 crtstuff.c.22.regmove
-rw-r--r--  1 makoto  wheel     14152 Nov  6 16:19 crtstuff.c.21.ce2
-rw-r--r--  1 makoto  wheel     21948 Nov  6 16:19 crtstuff.c.19.life
-rw-r--r--  1 makoto  wheel     18409 Nov  6 16:19 crtstuff.c.18.cse2
-rw-r--r--  1 makoto  wheel     18514 Nov  6 16:19 crtstuff.c.14.ce1
-rw-r--r--  1 makoto  wheel     14438 Nov  6 16:19 crtstuff.c.12.bp
-rw-r--r--  1 makoto  wheel     17897 Nov  6 16:19 crtstuff.c.11.cfg
-rw-r--r--  1 makoto  wheel     19066 Nov  6 16:19 crtstuff.c.10.bypass
-rw-r--r--  1 makoto  wheel     10795 Nov  6 16:19 crtstuff.c.09.loop
-rw-r--r--  1 makoto  wheel     36832 Nov  6 16:19 crtstuff.c.08.gcse
-rw-r--r--  1 makoto  wheel     10912 Nov  6 16:19 crtstuff.c.07.addressof
-rw-r--r--  1 makoto  wheel     19252 Nov  6 16:19 crtstuff.c.06.cse
-rw-r--r--  1 makoto  wheel     18068 Nov  6 16:19 crtstuff.c.05.null
-rw-r--r--  1 makoto  wheel     17570 Nov  6 16:19 crtstuff.c.04.jump
-rw-r--r--  1 makoto  wheel      9442 Nov  6 16:19 crtstuff.c.01.rtl



最近の日記
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)