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

Re: [PATCH 02/23] lib: move 64-bit div/mod compiler helpers



On 01.04.2021 16:56, Julien Grall wrote:
> On 01/04/2021 11:19, Jan Beulich wrote:
>> --- a/xen/common/lib.c
>> +++ b/xen/lib/divmod.c
>> @@ -40,7 +40,6 @@
>>    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>>    * SUCH DAMAGE.
>>    */
>> -#if BITS_PER_LONG == 32
> 
> In theory BITS_PER_LONG == 32 is not quite the same as 32-bit arch. Can 
> you clarify whether this code is necessary on 64-bit arch where long is 
> only 32-bit.

Likely the compiler can get away without invoking these helpers, so
the code would remain unused. I'm uncertain whether CONFIG_64BIT
ought to be set for such an architecture, as we assume sizeof(long)
== sizeof(void*), and hence pointers would then need to be 32-bit
as well there.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.