Andes Workshop
http://forum.andestech.com/

how to use mulr64 instruction
http://forum.andestech.com/viewtopic.php?f=25&t=956
Page 1 of 1

Author:  maolj [ Thu Jun 30, 2016 6:04 pm ]
Post subject:  how to use mulr64 instruction

Andes mulr64 instruction: [ mulr64 rt, ra, rb ] that multiply the unsigned integer contents of two 32-bit registers and write the 64-bit result to an even/odd pair of 32-bit registers.

if you want to use this instruction, you can programming code as below:

#include <stdio.h>
#include <stdlib.h>
long long my_mulr64([long long a, long long b)
{
return a*b;
}

long long my_mul(int a, int b)
{
return a*b;
}

int main(void)
{
long long x, y;
long long z=0x5566;
x=0x24680;
y=0x12345;
z+=x*y;
z+=my_mulr64(x, y);
z+=my_mul(24680+10, 123456789+10);
}

that declare the related variable as long long type.
attached is the project.

Attachments:
hello-mulr64.zip [40.42 KiB]
Downloaded 1025 times

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/