はじめてのひき - FizzBuzzAsm_psp Diff
- Added parts are displayed like this.
- Deleted parts are displayed
like this.
! Version
% psp-gcc -v
Using built-in specs.
Target: psp
コンフィグオプション: ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0 --with-bugurl=http://wiki.pspdev.org/psp:toolchain
スレッドモデル: single
gcc version 4.3.0 20070914 (experimental: PSPDEV 20060507) (GCC)
! Optimized
fizzbuzz.o: ファイル形式 elf32-littlemips
セクション .text の逆アセンブル:
00000000 <main>:
0: 27bdffd8 addiu sp,sp,-40
4: afbf0024 sw ra,36(sp)
8: afbe0020 sw s8,32(sp)
c: afb7001c sw s7,28(sp)
10: afb60018 sw s6,24(sp)
14: afb50014 sw s5,20(sp)
18: afb40010 sw s4,16(sp)
1c: afb3000c sw s3,12(sp)
20: afb20008 sw s2,8(sp)
24: afb10004 sw s1,4(sp)
28: afb00000 sw s0,0(sp)
2c: 24100001 li s0,1
30: 2411000f li s1,15
34: 24130005 li s3,5
38: 24140003 li s4,3
3c: 3c020000 lui v0,0x0
3c: R_MIPS_HI16 $LC3
40: 245e0000 addiu s8,v0,0
40: R_MIPS_LO16 $LC3
44: 3c020000 lui v0,0x0
44: R_MIPS_HI16 $LC2
48: 24560000 addiu s6,v0,0
48: R_MIPS_LO16 $LC2
4c: 3c020000 lui v0,0x0
4c: R_MIPS_HI16 $LC1
50: 24570000 addiu s7,v0,0
50: R_MIPS_LO16 $LC1
54: 3c020000 lui v0,0x0
54: R_MIPS_HI16 $LC0
58: 24550000 addiu s5,v0,0
58: R_MIPS_LO16 $LC0
5c: 24120065 li s2,101
60: 16200002 bnez s1,6c <main+0x6c>
64: 0211001a div zero,s0,s1
68: 000001cd break 0x7
6c: 00001010 mfhi v0
70: 14400005 bnez v0,88 <main+0x88>
74: 00000000 nop
78: 0c000000 jal 0 <main>
78: R_MIPS_26 puts
7c: 02a02021 move a0,s5
80: 08000039 j e4 <main+0xe4>
80: R_MIPS_26 .text
84: 26100001 addiu s0,s0,1
88: 16600002 bnez s3,94 <main+0x94>
8c: 0213001a div zero,s0,s3
90: 000001cd break 0x7
94: 00001010 mfhi v0
98: 14400005 bnez v0,b0 <main+0xb0>
9c: 00000000 nop
a0: 0c000000 jal 0 <main>
a0: R_MIPS_26 puts
a4: 02e02021 move a0,s7
a8: 08000039 j e4 <main+0xe4>
a8: R_MIPS_26 .text
ac: 26100001 addiu s0,s0,1
b0: 16800002 bnez s4,bc <main+0xbc>
b4: 0214001a div zero,s0,s4
b8: 000001cd break 0x7
bc: 00001010 mfhi v0
c0: 14400005 bnez v0,d8 <main+0xd8>
c4: 03c02021 move a0,s8
c8: 0c000000 jal 0 <main>
c8: R_MIPS_26 puts
cc: 02c02021 move a0,s6
d0: 08000039 j e4 <main+0xe4>
d0: R_MIPS_26 .text
d4: 26100001 addiu s0,s0,1
d8: 0c000000 jal 0 <main>
d8: R_MIPS_26 printf
dc: 02002821 move a1,s0
e0: 26100001 addiu s0,s0,1
e4: 1612ffde bne s0,s2,60 <main+0x60>
e8: 00000000 nop
ec: 8fbf0024 lw ra,36(sp)
f0: 8fbe0020 lw s8,32(sp)
f4: 8fb7001c lw s7,28(sp)
f8: 8fb60018 lw s6,24(sp)
fc: 8fb50014 lw s5,20(sp)
100: 8fb40010 lw s4,16(sp)
104: 8fb3000c lw s3,12(sp)
108: 8fb20008 lw s2,8(sp)
10c: 8fb10004 lw s1,4(sp)
110: 8fb00000 lw s0,0(sp)
114: 03e00008 jr ra
118: 27bd0028 addiu sp,sp,40
! Normal
fizzbuzz.o: ファイル形式 elf32-littlemips
セクション .text の逆アセンブル:
00000000 <main>:
0: 27bdffe0 addiu sp,sp,-32
4: afbf001c sw ra,28(sp)
8: afbe0018 sw s8,24(sp)
c: 03a0f021 move s8,sp
10: 24020001 li v0,1
14: afc20000 sw v0,0(s8)
18: 0800003a j e8 <main+0xe8>
18: R_MIPS_26 .text
1c: 00000000 nop
20: 8fc30000 lw v1,0(s8)
24: 2402000f li v0,15
28: 14400002 bnez v0,34 <main+0x34>
2c: 0062001a div zero,v1,v0
30: 000001cd break 0x7
34: 00001010 mfhi v0
38: 14400007 bnez v0,58 <main+0x58>
3c: 00000000 nop
40: 3c020000 lui v0,0x0
40: R_MIPS_HI16 .rodata
44: 24440000 addiu a0,v0,0
44: R_MIPS_LO16 .rodata
48: 0c000000 jal 0 <main>
48: R_MIPS_26 puts
4c: 00000000 nop
50: 08000037 j dc <main+0xdc>
50: R_MIPS_26 .text
54: 00000000 nop
58: 8fc30000 lw v1,0(s8)
5c: 24020005 li v0,5
60: 14400002 bnez v0,6c <main+0x6c>
64: 0062001a div zero,v1,v0
68: 000001cd break 0x7
6c: 00001010 mfhi v0
70: 14400007 bnez v0,90 <main+0x90>
74: 00000000 nop
78: 3c020000 lui v0,0x0
78: R_MIPS_HI16 .rodata
7c: 2444000c addiu a0,v0,12
7c: R_MIPS_LO16 .rodata
80: 0c000000 jal 0 <main>
80: R_MIPS_26 puts
84: 00000000 nop
88: 08000037 j dc <main+0xdc>
88: R_MIPS_26 .text
8c: 00000000 nop
90: 8fc30000 lw v1,0(s8)
94: 24020003 li v0,3
98: 14400002 bnez v0,a4 <main+0xa4>
9c: 0062001a div zero,v1,v0
a0: 000001cd break 0x7
a4: 00001010 mfhi v0
a8: 14400007 bnez v0,c8 <main+0xc8>
ac: 00000000 nop
b0: 3c020000 lui v0,0x0
b0: R_MIPS_HI16 .rodata
b4: 24440014 addiu a0,v0,20
b4: R_MIPS_LO16 .rodata
b8: 0c000000 jal 0 <main>
b8: R_MIPS_26 puts
bc: 00000000 nop
c0: 08000037 j dc <main+0xdc>
c0: R_MIPS_26 .text
c4: 00000000 nop
c8: 3c020000 lui v0,0x0
c8: R_MIPS_HI16 .rodata
cc: 2444001c addiu a0,v0,28
cc: R_MIPS_LO16 .rodata
d0: 8fc50000 lw a1,0(s8)
d4: 0c000000 jal 0 <main>
d4: R_MIPS_26 printf
d8: 00000000 nop
dc: 8fc20000 lw v0,0(s8)
e0: 24420001 addiu v0,v0,1
e4: afc20000 sw v0,0(s8)
e8: 8fc20000 lw v0,0(s8)
ec: 28420065 slti v0,v0,101
f0: 1440ffcb bnez v0,20 <main+0x20>
f4: 00000000 nop
f8: 03c0e821 move sp,s8
fc: 8fbf001c lw ra,28(sp)
100: 8fbe0018 lw s8,24(sp)
104: 27bd0020 addiu sp,sp,32
108: 03e00008 jr ra
10c: 00000000 nop
% psp-gcc -v
Using built-in specs.
Target: psp
コンフィグオプション: ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0 --with-bugurl=http://wiki.pspdev.org/psp:toolchain
スレッドモデル: single
gcc version 4.3.0 20070914 (experimental: PSPDEV 20060507) (GCC)
! Optimized
fizzbuzz.o: ファイル形式 elf32-littlemips
セクション .text の逆アセンブル:
00000000 <main>:
0: 27bdffd8 addiu sp,sp,-40
4: afbf0024 sw ra,36(sp)
8: afbe0020 sw s8,32(sp)
c: afb7001c sw s7,28(sp)
10: afb60018 sw s6,24(sp)
14: afb50014 sw s5,20(sp)
18: afb40010 sw s4,16(sp)
1c: afb3000c sw s3,12(sp)
20: afb20008 sw s2,8(sp)
24: afb10004 sw s1,4(sp)
28: afb00000 sw s0,0(sp)
2c: 24100001 li s0,1
30: 2411000f li s1,15
34: 24130005 li s3,5
38: 24140003 li s4,3
3c: 3c020000 lui v0,0x0
3c: R_MIPS_HI16 $LC3
40: 245e0000 addiu s8,v0,0
40: R_MIPS_LO16 $LC3
44: 3c020000 lui v0,0x0
44: R_MIPS_HI16 $LC2
48: 24560000 addiu s6,v0,0
48: R_MIPS_LO16 $LC2
4c: 3c020000 lui v0,0x0
4c: R_MIPS_HI16 $LC1
50: 24570000 addiu s7,v0,0
50: R_MIPS_LO16 $LC1
54: 3c020000 lui v0,0x0
54: R_MIPS_HI16 $LC0
58: 24550000 addiu s5,v0,0
58: R_MIPS_LO16 $LC0
5c: 24120065 li s2,101
60: 16200002 bnez s1,6c <main+0x6c>
64: 0211001a div zero,s0,s1
68: 000001cd break 0x7
6c: 00001010 mfhi v0
70: 14400005 bnez v0,88 <main+0x88>
74: 00000000 nop
78: 0c000000 jal 0 <main>
78: R_MIPS_26 puts
7c: 02a02021 move a0,s5
80: 08000039 j e4 <main+0xe4>
80: R_MIPS_26 .text
84: 26100001 addiu s0,s0,1
88: 16600002 bnez s3,94 <main+0x94>
8c: 0213001a div zero,s0,s3
90: 000001cd break 0x7
94: 00001010 mfhi v0
98: 14400005 bnez v0,b0 <main+0xb0>
9c: 00000000 nop
a0: 0c000000 jal 0 <main>
a0: R_MIPS_26 puts
a4: 02e02021 move a0,s7
a8: 08000039 j e4 <main+0xe4>
a8: R_MIPS_26 .text
ac: 26100001 addiu s0,s0,1
b0: 16800002 bnez s4,bc <main+0xbc>
b4: 0214001a div zero,s0,s4
b8: 000001cd break 0x7
bc: 00001010 mfhi v0
c0: 14400005 bnez v0,d8 <main+0xd8>
c4: 03c02021 move a0,s8
c8: 0c000000 jal 0 <main>
c8: R_MIPS_26 puts
cc: 02c02021 move a0,s6
d0: 08000039 j e4 <main+0xe4>
d0: R_MIPS_26 .text
d4: 26100001 addiu s0,s0,1
d8: 0c000000 jal 0 <main>
d8: R_MIPS_26 printf
dc: 02002821 move a1,s0
e0: 26100001 addiu s0,s0,1
e4: 1612ffde bne s0,s2,60 <main+0x60>
e8: 00000000 nop
ec: 8fbf0024 lw ra,36(sp)
f0: 8fbe0020 lw s8,32(sp)
f4: 8fb7001c lw s7,28(sp)
f8: 8fb60018 lw s6,24(sp)
fc: 8fb50014 lw s5,20(sp)
100: 8fb40010 lw s4,16(sp)
104: 8fb3000c lw s3,12(sp)
108: 8fb20008 lw s2,8(sp)
10c: 8fb10004 lw s1,4(sp)
110: 8fb00000 lw s0,0(sp)
114: 03e00008 jr ra
118: 27bd0028 addiu sp,sp,40
! Normal
fizzbuzz.o: ファイル形式 elf32-littlemips
セクション .text の逆アセンブル:
00000000 <main>:
0: 27bdffe0 addiu sp,sp,-32
4: afbf001c sw ra,28(sp)
8: afbe0018 sw s8,24(sp)
c: 03a0f021 move s8,sp
10: 24020001 li v0,1
14: afc20000 sw v0,0(s8)
18: 0800003a j e8 <main+0xe8>
18: R_MIPS_26 .text
1c: 00000000 nop
20: 8fc30000 lw v1,0(s8)
24: 2402000f li v0,15
28: 14400002 bnez v0,34 <main+0x34>
2c: 0062001a div zero,v1,v0
30: 000001cd break 0x7
34: 00001010 mfhi v0
38: 14400007 bnez v0,58 <main+0x58>
3c: 00000000 nop
40: 3c020000 lui v0,0x0
40: R_MIPS_HI16 .rodata
44: 24440000 addiu a0,v0,0
44: R_MIPS_LO16 .rodata
48: 0c000000 jal 0 <main>
48: R_MIPS_26 puts
4c: 00000000 nop
50: 08000037 j dc <main+0xdc>
50: R_MIPS_26 .text
54: 00000000 nop
58: 8fc30000 lw v1,0(s8)
5c: 24020005 li v0,5
60: 14400002 bnez v0,6c <main+0x6c>
64: 0062001a div zero,v1,v0
68: 000001cd break 0x7
6c: 00001010 mfhi v0
70: 14400007 bnez v0,90 <main+0x90>
74: 00000000 nop
78: 3c020000 lui v0,0x0
78: R_MIPS_HI16 .rodata
7c: 2444000c addiu a0,v0,12
7c: R_MIPS_LO16 .rodata
80: 0c000000 jal 0 <main>
80: R_MIPS_26 puts
84: 00000000 nop
88: 08000037 j dc <main+0xdc>
88: R_MIPS_26 .text
8c: 00000000 nop
90: 8fc30000 lw v1,0(s8)
94: 24020003 li v0,3
98: 14400002 bnez v0,a4 <main+0xa4>
9c: 0062001a div zero,v1,v0
a0: 000001cd break 0x7
a4: 00001010 mfhi v0
a8: 14400007 bnez v0,c8 <main+0xc8>
ac: 00000000 nop
b0: 3c020000 lui v0,0x0
b0: R_MIPS_HI16 .rodata
b4: 24440014 addiu a0,v0,20
b4: R_MIPS_LO16 .rodata
b8: 0c000000 jal 0 <main>
b8: R_MIPS_26 puts
bc: 00000000 nop
c0: 08000037 j dc <main+0xdc>
c0: R_MIPS_26 .text
c4: 00000000 nop
c8: 3c020000 lui v0,0x0
c8: R_MIPS_HI16 .rodata
cc: 2444001c addiu a0,v0,28
cc: R_MIPS_LO16 .rodata
d0: 8fc50000 lw a1,0(s8)
d4: 0c000000 jal 0 <main>
d4: R_MIPS_26 printf
d8: 00000000 nop
dc: 8fc20000 lw v0,0(s8)
e0: 24420001 addiu v0,v0,1
e4: afc20000 sw v0,0(s8)
e8: 8fc20000 lw v0,0(s8)
ec: 28420065 slti v0,v0,101
f0: 1440ffcb bnez v0,20 <main+0x20>
f4: 00000000 nop
f8: 03c0e821 move sp,s8
fc: 8fbf001c lw ra,28(sp)
100: 8fbe0018 lw s8,24(sp)
104: 27bd0020 addiu sp,sp,32
108: 03e00008 jr ra
10c: 00000000 nop