Re: [PATCH 06/14] Pramfs: Include files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-06-23 at 07:57 +0200, Jörn Engel wrote:
> 
> Feel free to improve the test.  It is admittedly crap and designed to
> support Chris' argument.  But seeing that it still fails to do so and
> Arnd has already shown one improvement that weakened Chris' argument,
> I
> guess we can all agree that further improvments won't change the
> conclusion, can we? ;)

True. At this point, I'm actually more interested in just how crap the
kernel code is, that's generated by your test. We don't have a portable
way to store a wrong-endian number. Using st_le32() on PowerPC we can
get it down to something like this...

le32:   27777875 cycles
be32:   26564494 cycles
loops: 100000000
le32:   21739926 cycles
be32:   20289854 cycles
loops: 100000000
le32:   25206069 cycles
be32:   20289854 cycles
loops: 100000000
le32:   21739435 cycles
be32:   17391303 cycles
loops: 100000000
le32:   22197744 cycles
be32:   17391305 cycles
loops: 100000000
le32:   22195411 cycles
be32:   21946167 cycles
loops: 100000000

  a0:   7f 4c 42 e6     mftbl   r26
  a4:   2c 1a 00 00     cmpwi   r26,0
  a8:   41 a2 ff f8     beq-    a0 <.init_module+0x54>
  ac:   3c 00 05 f5     lis     r0,1525
  b0:   3b 7f 00 70     addi    r27,r31,112
  b4:   60 00 e1 00     ori     r0,r0,57600
  b8:   7d 20 dc 2c     lwbrx   r9,0,r27
  bc:   39 29 00 01     addi    r9,r9,1
  c0:   79 29 00 20     clrldi  r9,r9,32
  c4:   7d 20 dd 2c     stwbrx  r9,0,r27
  c8:   34 00 ff ff     addic.  r0,r0,-1
  cc:   40 82 ff ec     bne+    b8 <.init_module+0x6c>
  d0:   7f ac 42 e6     mftbl   r29
  d4:   2c 1d 00 00     cmpwi   r29,0
  d8:   41 a2 ff f8     beq-    d0 <.init_module+0x84>
  dc:   3c 00 05 f5     lis     r0,1525
  e0:   60 00 e1 00     ori     r0,r0,57600
  e4:   81 3f 00 74     lwz     r9,116(r31)
  e8:   39 29 00 01     addi    r9,r9,1
  ec:   91 3f 00 74     stw     r9,116(r31)
  f0:   34 00 ff ff     addic.  r0,r0,-1
  f4:   40 82 ff f0     bne+    e4 <.init_module+0x98>
  f8:   7f 8c 42 e6     mftbl   r28

Interestingly, if we get rid of the (gratuitous, afaict) clrldi at 0xc0,
the little-endian version goes _faster_:

le32:   18839472 cycles
be32:   21946166 cycles
loops: 100000000
le32:   25923621 cycles
be32:   29629625 cycles
loops: 100000000

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@xxxxxxxxx                              Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux