Article: AMD's Mobile Strategy
By: gallier2 (gallier2.delete@this.gmx.de), December 21, 2011 6:41 am
Room: Moderated Discussions
Exophase (exophase@gmail.com) on 12/20/11 wrote:
---------------------------
>Linus Torvalds (torvalds@linux-foundation.org) on 12/20/11 wrote:
>---------------------------
>>Pretty much every single large immediate I ever see is
>>an address that has been resolved by the linker.
>>
>>It sounds like you've worked with machines that simply
>>cannot do them for so long that you don't even realize
>>that they are immediates.
>>
>>So of course you never see them - you think they are data
>>in a separate table, and you think they don't exist.
>>
>>Linus
>
>Well that's just not true, because I've programmed a lot of x86 assembly in addition
>to various RISCs. I think I've done more x86 than anything else, although I've coded a lot of ARM too.
>
>Of course, I also spend about as much time compiling for both, but admittedly I
>don't look at what the compilers generate nearly as much.
You should, it has nothing to do with hand generated assembler. Every string litteral in a C program is a global variable and normal C programs are littered with strings. That was for instance what killed me on SPARC when going from 32 to 64 bits binaries. Every address load went from 2 to 5 instructions and it used 3 instead of 2 registers which had downwind pessimization effects on register allocation.
>
>Now, give me real data for a decent range of real world programs.
---------------------------
>Linus Torvalds (torvalds@linux-foundation.org) on 12/20/11 wrote:
>---------------------------
>>Pretty much every single large immediate I ever see is
>>an address that has been resolved by the linker.
>>
>>It sounds like you've worked with machines that simply
>>cannot do them for so long that you don't even realize
>>that they are immediates.
>>
>>So of course you never see them - you think they are data
>>in a separate table, and you think they don't exist.
>>
>>Linus
>
>Well that's just not true, because I've programmed a lot of x86 assembly in addition
>to various RISCs. I think I've done more x86 than anything else, although I've coded a lot of ARM too.
>
>Of course, I also spend about as much time compiling for both, but admittedly I
>don't look at what the compilers generate nearly as much.
You should, it has nothing to do with hand generated assembler. Every string litteral in a C program is a global variable and normal C programs are littered with strings. That was for instance what killed me on SPARC when going from 32 to 64 bits binaries. Every address load went from 2 to 5 instructions and it used 3 instead of 2 registers which had downwind pessimization effects on register allocation.
>
>Now, give me real data for a decent range of real world programs.