Andes Workshop

how to use mulr64 instruction
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;
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: [40.42 KiB]
Downloaded 821 times

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group