Re: Storing 16bit values in upper part of 32bit registers

2009-11-05 Thread H. Peter Anvin
On 10/15/2009 08:56 AM, Richard Henderson wrote: > On 10/15/2009 07:41 AM, Markus L wrote: >> However the IS is designed so that it is beneficial to to store 16bit >> values in the high part of the registers (rNh) and also the calling >> conventions that we want follow require 16bit values to be pa

Re: Storing 16bit values in upper part of 32bit registers

2009-10-15 Thread Richard Henderson
On 10/15/2009 07:41 AM, Markus L wrote: However the IS is designed so that it is beneficial to to store 16bit values in the high part of the registers (rNh) and also the calling conventions that we want follow require 16bit values to be passed and returned in rNh. What would be the "proper way"

Re: Storing 16bit values in upper part of 32bit registers

2009-10-15 Thread sumanth
Hi Marcus, Though I am novice in gcc , I think I can answer your question. As far as I know, your load instruction will take care of this issue. You need to restrict your load instruction so that it will place your return value of function in lower r

Storing 16bit values in upper part of 32bit registers

2009-10-15 Thread Markus L
Hi, I am working with an architecture where the 32bit registers (rN) are divided into high (rNh) and low (rNl) 16bit sub registers that can in principle be individually accessed by the instructions in the IS. However the IS is designed so that it is beneficial to to store 16bit values in the high