grub-devel
[Top][All Lists]
Advanced

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

Re: Endianness macros capitalization


From: Christian Franke
Subject: Re: Endianness macros capitalization
Date: Fri, 11 Jul 2008 15:21:11 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7

Pavel Roskin wrote:
Quoting Pavel Roskin <address@hidden>:

366976  original
364988  "=q", xchgb
365460  "=q", rolw $8,%w0
365420  "=r", rolw $8,%w0
364996  monstrosity ("=r", conditional xchgb/rolw)
364728  "little details"

Marginally better (by just 12 bytes):
364716  "little details" + "monstrosity"


Very nice optimization idea!

The practical advantage is probably limited by the fact that kernel.img and most of the modules typically included in a i386-pc core.img are not affected.

I attached a diff of "size *.mod" outputs for the test mentioned in my last mail. '-' original code, '+' grub_swap_*() replaced by dummies. Large savings potential is in afs.mod, hfs*.mod, and xfs.mod.

Christian

--- sizes.original      2008-07-10 20:33:57.968750000 +0200
+++ sizes.noswap        2008-07-10 20:34:03.046875000 +0200
@@ -1,78 +1,78 @@
    text           data     bss     dec     hex filename
    4352             24     160    4536    11b8 _bsd.mod
     564              8      48     620     26c _chain.mod
    2128              8      48    2184     888 _linux.mod
    6528             48     128    6704    1a30 _multiboot.mod
     820             28       0     848     350 acorn.mod
-   2552             44      16    2612     a34 affs.mod
-   5532             40      16    5588    15d4 afs.mod
-    960             28      16    1004     3ec amiga.mod
+   2136             44      16    2196     894 affs.mod
+   2656             40      16    2712     a98 afs.mod
+    692             28      16     736     2e0 amiga.mod
     212              8       0     220      dc aout.mod
-   1000             28      16    1044     414 apple.mod
-   3028             36      16    3080     c08 ata.mod
+    888             28      16     932     3a4 apple.mod
+   2948             36      16    3000     bb8 ata.mod
    1756             44      16    1816     718 biosdisk.mod
     876              8      16     900     384 bitmap.mod
     764             20       0     784     310 blocklist.mod
     148             16       0     164      a4 boot.mod
     628             16       0     644     284 bsd.mod
     424             16       0     440     1b8 cat.mod
     340             24       0     364     16c chain.mod
     684             16       0     700     2bc cmp.mod
     396             20       0     416     1a0 configfile.mod
    1228             36      16    1280     500 cpio.mod
     332             16      16     364     16c cpuid.mod
     620             16       0     636     27c echo.mod
    2292             12       0    2304     900 elf.mod
    2044             44      16    2104     838 ext2.mod
    2816             32      16    2864     b30 fat.mod
     832             32      16     880     370 font.mod
    1208              8       0    1216     4c0 fshelp.mod
    3480            132     224    3836     efc gfxterm.mod
    1032             32      16    1080     438 gpt.mod
    5808            488       0    6296    1898 gzio.mod
     284             16       0     300     12c halt.mod
     116             16       0     132      84 hello.mod
     480             16       0     496     1f0 help.mod
    1220             20       0    1240     4d8 hexdump.mod
-   4252             32      64    4348    10fc hfs.mod
-   4184             44      16    4244    1094 hfsplus.mod
-   3128             44      16    3188     c74 iso9660.mod
+   3220             32      64    3316     cf4 hfs.mod
+   2628             44      16    2688     a80 hfsplus.mod
+   3108             44      16    3168     c60 iso9660.mod
    2916             32      16    2964     b94 jfs.mod
-   3968             40       0    4008     fa8 jpeg.mod
+   3956             40       0    3996     f9c jpeg.mod
     232             24       0     256     100 linux.mod
    1076             52      16    1144     478 loopback.mod
    1452             12       0    1464     5b8 ls.mod
    2244             20       0    2264     8d8 lspci.mod
    3260             36      32    3328     d00 lvm.mod
     484             40      32     556     22c memdisk.mod
    2512             36      16    2564     a04 minix.mod
     264             32       0     296     128 multiboot.mod
   25268            104    1936   27308    6aac normal.mod
    5576             44      32    5652    1614 ntfs.mod
    1880             20       0    1900     76c ntfscomp.mod
    1604             24      16    1644     66c pc.mod
     188              4       0     192      c0 pci.mod
     604             16       0     620     26c play.mod
-   4144             24       0    4168    1048 png.mod
+   4108             24       0    4132    1024 png.mod
    3312             40      16    3368     d28 raid.mod
     276             16       0     292     124 read.mod
     108             16       0     124      7c reboot.mod
    7308             48      16    7372    1ccc reiserfs.mod
    1164             16       0    1180     49c search.mod
    2492            216      96    2804     af4 serial.mod
-   2284             40      16    2340     924 sfs.mod
+   1836             40      16    1892     764 sfs.mod
     540             16      32     588     24c sleep.mod
-   1056             24      16    1096     448 sun.mod
+    948             24      16     988     3dc sun.mod
     416             20       0     436     1b4 terminal.mod
    5188             28     512    5728    1660 terminfo.mod
     264             16       0     280     118 test.mod
    1468             24       0    1492     5d4 tga.mod
    2724             52      16    2792     ae8 udf.mod
    2936             52      16    3004     bbc ufs.mod
    8832            204    1952   10988    2aec vbe.mod
     624             20       0     644     284 vbeinfo.mod
    1172             20       0    1192     4a8 vbetest.mod
    1668            108   13584   15360    3c00 vga.mod
    1284              8      32    1324     52c video.mod
     732             32       0     764     2fc videotest.mod
-   4980             40      16    5036    13ac xfs.mod
+   2924             40      16    2980     ba4 xfs.mod

reply via email to

[Prev in Thread] Current Thread [Next in Thread]