Create  Edit  Diff  FrontPage  Index  Search  Changes  Login

はじめてのひき - FizzBuzzAsm_ppu Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

! Version

% gcc -v
Using built-in specs.
Target: ppc64-yellowdog-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-secureplt --with-long-double-128 --host=ppc64-yellowdog-linux --build=ppc64-yellowdog-linux --target=ppc64-yellowdog-linux --with-cpu=default32
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-52.ydl.1)

! Optimized


fizzbuzz.o:     file format elf32-powerpc

Disassembly of section .text:

00000000 <main>:
    0: 94 21 ff d0 stwu    r1,-48(r1)
    4: 7c 08 02 a6 mflr    r0
    8: 93 01 00 10 stw     r24,16(r1)
    c: 93 21 00 14 stw     r25,20(r1)
   10: 93 41 00 18 stw     r26,24(r1)
   14: 93 61 00 1c stw     r27,28(r1)
   18: 93 81 00 20 stw     r28,32(r1)
   1c: 93 a1 00 24 stw     r29,36(r1)
   20: 93 c1 00 28 stw     r30,40(r1)
   24: 93 e1 00 2c stw     r31,44(r1)
   28: 90 01 00 34 stw     r0,52(r1)
   2c: 3b e0 00 01 li      r31,1
   30: 3b 80 00 0f li      r28,15
   34: 3f 60 00 00 lis     r27,0
36: R_PPC_ADDR16_HA .rodata.str1.4
   38: 3f c0 66 66 lis     r30,26214
   3c: 63 de 66 67 ori     r30,r30,26215
   40: 3f 00 00 00 lis     r24,0
42: R_PPC_ADDR16_HA .rodata.str1.4+0xc
   44: 3f a0 55 55 lis     r29,21845
   48: 63 bd 55 56 ori     r29,r29,21846
   4c: 3f 20 00 00 lis     r25,0
4e: R_PPC_ADDR16_HA .rodata.str1.4+0x14
   50: 3f 40 00 00 lis     r26,0
52: R_PPC_ADDR16_HA .rodata.str1.4+0x1c
   54: 7c 1f e3 d6 divw    r0,r31,r28
   58: 54 09 20 36 rlwinm  r9,r0,4,0,27
   5c: 7d 20 48 50 subf    r9,r0,r9
   60: 7f 9f 48 00 cmpw    cr7,r31,r9
   64: 40 9e 00 10 bne-    cr7,74 <main+0x74>
   68: 38 7b 00 00 addi    r3,r27,0
6a: R_PPC_ADDR16_LO .rodata.str1.4
   6c: 48 00 00 01 bl      6c <main+0x6c>
6c: R_PPC_REL24 puts
   70: 48 00 00 68 b       d8 <main+0xd8>
   74: 7d 3f f0 96 mulhw   r9,r31,r30
   78: 7d 29 0e 70 srawi   r9,r9,1
   7c: 7f e0 fe 70 srawi   r0,r31,31
   80: 7d 20 48 50 subf    r9,r0,r9
   84: 55 20 10 3a rlwinm  r0,r9,2,0,29
   88: 7c 00 4a 14 add     r0,r0,r9
   8c: 7f 9f 00 00 cmpw    cr7,r31,r0
   90: 40 9e 00 10 bne-    cr7,a0 <main+0xa0>
   94: 38 78 00 0c addi    r3,r24,12
96: R_PPC_ADDR16_LO .rodata.str1.4+0xc
   98: 48 00 00 01 bl      98 <main+0x98>
98: R_PPC_REL24 puts
   9c: 48 00 00 3c b       d8 <main+0xd8>
   a0: 7d 3f e8 96 mulhw   r9,r31,r29
   a4: 7f e0 fe 70 srawi   r0,r31,31
   a8: 7d 20 48 50 subf    r9,r0,r9
   ac: 55 20 08 3c rlwinm  r0,r9,1,0,30
   b0: 7c 00 4a 14 add     r0,r0,r9
   b4: 7f 9f 00 00 cmpw    cr7,r31,r0
   b8: 40 9e 00 10 bne-    cr7,c8 <main+0xc8>
   bc: 38 79 00 14 addi    r3,r25,20
be: R_PPC_ADDR16_LO .rodata.str1.4+0x14
   c0: 48 00 00 01 bl      c0 <main+0xc0>
c0: R_PPC_REL24 puts
   c4: 48 00 00 14 b       d8 <main+0xd8>
   c8: 38 7a 00 1c addi    r3,r26,28
ca: R_PPC_ADDR16_LO .rodata.str1.4+0x1c
   cc: 7f e4 fb 78 mr      r4,r31
   d0: 4c c6 31 82 crclr   4*cr1+eq
   d4: 48 00 00 01 bl      d4 <main+0xd4>
d4: R_PPC_REL24 printf
   d8: 2f 9f 00 64 cmpwi   cr7,r31,100
   dc: 3b ff 00 01 addi    r31,r31,1
   e0: 40 9e ff 74 bne+    cr7,54 <main+0x54>
   e4: 80 01 00 34 lwz     r0,52(r1)
   e8: 7c 08 03 a6 mtlr    r0
   ec: 83 01 00 10 lwz     r24,16(r1)
   f0: 83 21 00 14 lwz     r25,20(r1)
   f4: 83 41 00 18 lwz     r26,24(r1)
   f8: 83 61 00 1c lwz     r27,28(r1)
   fc: 83 81 00 20 lwz     r28,32(r1)
  100: 83 a1 00 24 lwz     r29,36(r1)
  104: 83 c1 00 28 lwz     r30,40(r1)
  108: 83 e1 00 2c lwz     r31,44(r1)
  10c: 38 21 00 30 addi    r1,r1,48
  110: 4e 80 00 20 blr

! Normal


fizzbuzz.o:     file format elf32-powerpc

Disassembly of section .text:

00000000 <main>:
    0: 94 21 ff d0 stwu    r1,-48(r1)
    4: 7c 08 02 a6 mflr    r0
    8: 93 e1 00 2c stw     r31,44(r1)
    c: 90 01 00 34 stw     r0,52(r1)
   10: 7c 3f 0b 78 mr      r31,r1
   14: 38 00 00 01 li      r0,1
   18: 90 1f 00 08 stw     r0,8(r31)
   1c: 48 00 00 fc b       118 <main+0x118>
   20: 81 7f 00 08 lwz     r11,8(r31)
   24: 38 00 00 0f li      r0,15
   28: 7d 2b 03 d6 divw    r9,r11,r0
   2c: 7d 20 4b 78 mr      r0,r9
   30: 54 00 20 36 rlwinm  r0,r0,4,0,27
   34: 7c 09 00 50 subf    r0,r9,r0
   38: 7c 00 58 50 subf    r0,r0,r11
   3c: 2f 80 00 00 cmpwi   cr7,r0,0
   40: 40 9e 00 14 bne-    cr7,54 <main+0x54>
   44: 3d 20 00 00 lis     r9,0
46: R_PPC_ADDR16_HA .rodata
   48: 38 69 00 00 addi    r3,r9,0
4a: R_PPC_ADDR16_LO .rodata
   4c: 48 00 00 01 bl      4c <main+0x4c>
4c: R_PPC_REL24 puts
   50: 48 00 00 bc b       10c <main+0x10c>
   54: 81 7f 00 08 lwz     r11,8(r31)
   58: 3c 00 66 66 lis     r0,26214
   5c: 60 00 66 67 ori     r0,r0,26215
   60: 7c 0b 00 96 mulhw   r0,r11,r0
   64: 7c 09 0e 70 srawi   r9,r0,1
   68: 7d 60 fe 70 srawi   r0,r11,31
   6c: 7d 20 48 50 subf    r9,r0,r9
   70: 91 3f 00 1c stw     r9,28(r31)
   74: 80 1f 00 1c lwz     r0,28(r31)
   78: 54 00 10 3a rlwinm  r0,r0,2,0,29
   7c: 81 3f 00 1c lwz     r9,28(r31)
   80: 7c 00 4a 14 add     r0,r0,r9
   84: 7d 60 58 50 subf    r11,r0,r11
   88: 91 7f 00 1c stw     r11,28(r31)
   8c: 80 1f 00 1c lwz     r0,28(r31)
   90: 2f 80 00 00 cmpwi   cr7,r0,0
   94: 40 9e 00 14 bne-    cr7,a8 <main+0xa8>
   98: 3d 20 00 00 lis     r9,0
9a: R_PPC_ADDR16_HA .rodata+0xc
   9c: 38 69 00 0c addi    r3,r9,12
9e: R_PPC_ADDR16_LO .rodata+0xc
   a0: 48 00 00 01 bl      a0 <main+0xa0>
a0: R_PPC_REL24 puts
   a4: 48 00 00 68 b       10c <main+0x10c>
   a8: 81 7f 00 08 lwz     r11,8(r31)
   ac: 3c 00 55 55 lis     r0,21845
   b0: 60 00 55 56 ori     r0,r0,21846
   b4: 7d 2b 00 96 mulhw   r9,r11,r0
   b8: 7d 60 fe 70 srawi   r0,r11,31
   bc: 7d 20 48 50 subf    r9,r0,r9
   c0: 91 3f 00 18 stw     r9,24(r31)
   c4: 80 1f 00 18 lwz     r0,24(r31)
   c8: 54 00 08 3c rlwinm  r0,r0,1,0,30
   cc: 81 3f 00 18 lwz     r9,24(r31)
   d0: 7c 00 4a 14 add     r0,r0,r9
   d4: 7d 60 58 50 subf    r11,r0,r11
   d8: 91 7f 00 18 stw     r11,24(r31)
   dc: 80 1f 00 18 lwz     r0,24(r31)
   e0: 2f 80 00 00 cmpwi   cr7,r0,0
   e4: 40 9e 00 14 bne-    cr7,f8 <main+0xf8>
   e8: 3d 20 00 00 lis     r9,0
ea: R_PPC_ADDR16_HA .rodata+0x14
   ec: 38 69 00 14 addi    r3,r9,20
ee: R_PPC_ADDR16_LO .rodata+0x14
   f0: 48 00 00 01 bl      f0 <main+0xf0>
f0: R_PPC_REL24 puts
   f4: 48 00 00 18 b       10c <main+0x10c>
   f8: 3d 20 00 00 lis     r9,0
fa: R_PPC_ADDR16_HA .rodata+0x1c
   fc: 38 69 00 1c addi    r3,r9,28
fe: R_PPC_ADDR16_LO .rodata+0x1c
  100: 80 9f 00 08 lwz     r4,8(r31)
  104: 4c c6 31 82 crclr   4*cr1+eq
  108: 48 00 00 01 bl      108 <main+0x108>
108: R_PPC_REL24 printf
  10c: 81 3f 00 08 lwz     r9,8(r31)
  110: 38 09 00 01 addi    r0,r9,1
  114: 90 1f 00 08 stw     r0,8(r31)
  118: 80 1f 00 08 lwz     r0,8(r31)
  11c: 2f 80 00 64 cmpwi   cr7,r0,100
  120: 40 9d ff 00 ble+    cr7,20 <main+0x20>
  124: 81 61 00 00 lwz     r11,0(r1)
  128: 80 0b 00 04 lwz     r0,4(r11)
  12c: 7c 08 03 a6 mtlr    r0
  130: 83 eb ff fc lwz     r31,-4(r11)
  134: 7d 61 5b 78 mr      r1,r11
  138: 4e 80 00 20 blr
[[tipp|http://telefon-internet-anschluss-wechseln.de/Nordrhein-Westfalen-NRW/Rhein-Sieg-Kreis/Troisdorf]]