[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Clarification regarding int multiplication

Clarification regarding int multiplication

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Clarification regarding int multiplication

Postby cdg2lax » Sat Dec 22, 2012 11:52 pm

The integer multiplication use the floating point unit. While a 32 bits FP only require a 23x23 bits multiply it also require the upper (most significant bits).
Usually a 32x32 bits multiplication in C return the least significant bits.
So my question is: Does the integer multiplication return either the 32 least significant bits but based on 23 bits operands (That will be original ;) ) or return 64 bits over two registers ( is a full 32 bits multiply) or simply return the least significant 32 bits of a full 32x32 multiplication?
If it is the latest, have you considered offering a multiplication that return only the most significant bits? I am asking as if one want to implement larger precision arithmetic the current instruction set make that a bit tedious...

Thanks.
cdg2lax
 
Posts: 2
Joined: Mon Dec 17, 2012 3:26 am

Re: Clarification regarding int multiplication

Postby ysapir » Sun Dec 23, 2012 5:53 am

The integer operations return the result you'd expect from the respective C integral type operations. This means that the multiply operation returns the lower half of the 64-bit result.

Returning the higher half would be useful for fractional fixed-point calculation as well, and is considered as a possible future enhancement to the Epiphany ISA.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Clarification regarding int multiplication

Postby kathrin » Mon Mar 04, 2013 5:05 am

Nice surprise about this shorter form. Can you tell us what it is you are talking/writing about?
Has any info. about this shorter form been posted before (and i just missed it)?
:P
Become photoshop expert with training course. Get the latest 350-029 css tutorials and 642-974 design guide to learn about different web applications.For more details about this product visit ,best wishes.
kathrin
 
Posts: 1
Joined: Mon Mar 04, 2013 4:56 am

Re: Clarification regarding int multiplication

Postby ysapir » Mon Mar 04, 2013 2:23 pm

User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Clarification regarding int multiplication

Postby timpart » Mon Mar 04, 2013 4:54 pm

My understanding is that the IMUL instruction does a signed integer multiply (when processor is in right mode). So it is 31 x 31 -> 31 if you are dealing with positive integers. An unsigned 32 x 32 -> 64 multiply might be more useful for building bigger width multiplies

Tim
timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Re: Clarification regarding int multiplication

Postby ysapir » Mon Mar 04, 2013 10:34 pm

User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Clarification regarding int multiplication

Postby amylaar » Sun Jun 02, 2013 7:12 am

Also note that the 32 bit lowpart (without saturation) of a 32x32 signed multiply is the same as the 32 bit lowpart
of a 32x32 unsigned multiply.

ui32xui32 -> ui64, si32xsi32 -> si64, si32xui32 -> si64 are all interchangable at the cost of a few extra arithmetic
instructions (got conditional moves, so we don't need branches). So if you want to implement all of them, or only
oneor two, again comes down to a cost-benefit analysis considering dynamic and static use frequencies of these
operations (corresponding to speed and code size issues) vs. instruction encoding space, die area,
operating frequency constraints, power consumption, and yield.
amylaar
 
Posts: 31
Joined: Thu Jan 10, 2013 3:06 pm


Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 6 guests

cron