Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #2601
| From | Bo Persson <bo@bo-persson.se> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Nitty-gritty aspects of register allocation |
| Date | 2020-09-11 11:44 +0200 |
| Organization | Compilers Central |
| Message-ID | <20-09-030@comp.compilers> (permalink) |
| References | <20-09-028@comp.compilers> <20-09-029@comp.compilers> |
On 2020-09-11 at 03:01, Alexei A. Frounze wrote:
> On Thursday, September 10, 2020 at 5:14:12 PM UTC-7, Elijah Stone wrote:
>> - The second-lowest 8 bits of some registers can be addressed
>> separately. When does it make sense to use them?
>
> AFAIR, on modern CPUs there are penalties in using subregisters.
> See e.g. Agner Fog's optimization manuals for details.
>
A long time ago, when translating 8085 code to 8086 - and mapping a pair
of 8-bit registers onto a 16-bit register - it was an advantage to have
separate access to the two halves.
Nowadays you just don't do that, so when more registers were added this
feature was not propagated to those. That's why these instructions are
only available for some registers.
Bo Persson
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Nitty-gritty aspects of register allocation Elijah Stone <elronnd@elronnd.net> - 2020-09-10 16:41 -0700
Re: Nitty-gritty aspects of register allocation "Alexei A. Frounze" <alexfrunews@gmail.com> - 2020-09-10 18:01 -0700
Re: Nitty-gritty aspects of register allocation Bo Persson <bo@bo-persson.se> - 2020-09-11 11:44 +0200
Re: Nitty-gritty aspects of register allocation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2020-09-11 10:35 +0000
csiph-web