avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Instruction count


From: Sander Pool
Subject: Re: [avr-gcc-list] Instruction count
Date: Wed, 15 Jan 2003 13:41:41 -0800

Why would you think that 32 bit architectures have smaller exe sizes than 8
bit? And why exactly 4x? I can only think of reasons why 32 bit processors
take up more space, not less.

Are you sure that your types are equally big for each compile (ie.
sizeof(int) is the same on AVR and x86)? I'm pretty sure AVR int are
smaller. What about AVR constants vs. x86 constants?

I try to stay away from assembly so I'm no expert but I'm curious what your
reasoning was.

    Sander


----- Original Message -----
From: "Anubhav" <address@hidden>
To: "Theodore A. Roth" <address@hidden>
Cc: <address@hidden>
Sent: Wednesday, January 15, 2003 12:30 PM
Subject: Re: [avr-gcc-list] Instruction count


> Hi,
>        Thanks to folks on the mailing list, I was able
> to disassemble the program.
>
> I had compiled the program for two platforms x86 using
> gcc and atmega128 using avrgcc.
> Had expected the atmega128 to have the larger binary
> since its a 8 bit CPU and therefore should take more
> than four times as many instructions as on the 32 bit
> intel cpu but the avr executables are approximately 3
> times smaller than intel (infact the intel compiled
> version is dynamically linked as well which should
> further reduce the size.) Can somebody tell me what i
> am missing here ?
>
> The specs of the two executables are as follows
>
> ELF 32-bit LSB executable, version 1 (SYSV),
> statically linked, not stripped (for the Atmega128)
> and
> ELF 32-bit LSB executable, Intel 80386, version 1
> (SYSV), dynamically linked (uses shared libs), not
> stripped (for x86)
>
> Thanks,
> Anubhav


avr-gcc-list at http://avr1.org



reply via email to

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