lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] About 32 and 64 bits registers


From: Paolo Bonzini
Subject: Re: [Lightning] About 32 and 64 bits registers
Date: Tue, 31 Aug 2010 16:17:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 08/30/2010 08:53 PM, Paulo César Pereira de Andrade wrote:
   Err, what I mean't was, to follow a proper logic of not showing the 
programmer
register widths, it should mean:

mul_i  r0(64) = r1(i32) * r2(i32)
mul_ui r0(64) = r1(u32) * r2(u32)

It doesn't matter what you do. Using mul_{i,ui} and relying on the top bits (e.g. by using a branch opcode with long type) is undefined anyway.

To get the high bits in a 32x32->64 multiplication, you need to use hmul or extend to long before doing the multiplication. It's inefficient, but it's also not extremely common in generated code.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]