Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Martin / daiteq-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
  • daiteq-demo
  • simple
  • tests
  • half
  • half_arrays.c
  • Martin's avatar
    daiteq LLVM demos, Release 4 · 3428f119
    Martin committed Oct 11, 2021
    3428f119 Browse File
half_arrays.c 388 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 27 28
////C: '-msoft-fp-half'
//A: '--has-fhalf'
//C: '-O0'

#include <stdint.h>

const half c[3] = {1.11H, 2.22H, 3.33H};

int main(void)
{
  volatile half a[3] = {1.234567H, 3.1415926H, 2.7182818284H};
  volatile half b;

//  volatile uint16_t u[3] = {0x1234, 0xABCD, 0x1357};
//  volatile uint16_t w;

//  asm("nop");

  b = c[1];

  b = a[2];

//  asm("nop");

//  w = u[1];

  return 0;
}