Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

release / riscv-demo

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • riscv-demo
  • simple
  • tests
  • double
  • double_asm.c
  • Martin's avatar
    Release 2022.1 · a22edae1
    Martin committed Sep 07, 2022
    a22edae1 Browse Files
double_asm.c 383 Bytes
BlameHistoryPermalink
Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
////C: '-msoft-fp-single'

int main(void)
{
  asm("fmv.d	f0,f1");
  asm("fneg.d	f0,f1");
  asm("fabs.d	f0,f1");
  asm("fadd.d	f0,f1,f2");
  asm("fsub.d	f0,f1,f2");
  asm("fmul.d	f0,f1,f2");
  asm("fdiv.d	f0,f1,f2");
  asm("fsqrt.d	f0,f1");
  asm("fcvt.d.w	f0,t1");
  asm("fcvt.w.d	t0,f1");
  asm("feq.d	t0,f0,f1");
  asm("flt.d	t0,f0,f1");
  asm("fle.d	t0,f0,f1");

  return 0;
}