Article: AMD's Mobile Strategy
By: Wilco (Wilco.Dijkstra.delete@this.ntlworld.com), December 21, 2011 6:43 am
Room: Moderated Discussions
gallier2 (gallier2@gmx.de) on 12/21/11 wrote:
---------------------------
>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.
Untrue. Strings are not actually that common, but more importantly, different compilers deal with strings in different ways - they do not have to behave like globals. For example on ARM a string is typically placed in a shared literal pool and addressed by a simple ADR (lea).
>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.
There is simply no excuse to use 5 instructions for a 64-bit address constant, that's a bad ABI plus a braindead compiler. With a constant pool you need a single load to get an address or any complex immediate, and any global can be accessed using a single load or store (without ever needing to setup the address).
It's not like accessing globals on a RISC is an unsolved problem.
Wilco
---------------------------
>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.
Untrue. Strings are not actually that common, but more importantly, different compilers deal with strings in different ways - they do not have to behave like globals. For example on ARM a string is typically placed in a shared literal pool and addressed by a simple ADR (lea).
>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.
There is simply no excuse to use 5 instructions for a 64-bit address constant, that's a bad ABI plus a braindead compiler. With a constant pool you need a single load to get an address or any complex immediate, and any global can be accessed using a single load or store (without ever needing to setup the address).
It's not like accessing globals on a RISC is an unsolved problem.
Wilco