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
  • packedhalf
  • ph_cmp.c
  • Martin's avatar
    Release 2022.1 · a22edae1
    Martin committed Sep 07, 2022
    a22edae1 Browse Files
ph_cmp.c 349 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 24 25 26
////C: '-msoft-fp-half'
////A: '--has-fhalf --has-fpack'

typedef half ph __attribute__((ext_vector_type(2)));


int main(void)
{
  volatile ph a,b;
//  volatile ph o;

//  a.x = 1.23456789h;
//  a.y = 34.5678901h;

//  b.x = 2.3456789h;
//  b.y = 9.87654321h;

//  int o = (a == b);

  if (a==b)
    return 1;
  else
    return 0;

//  return o;
}