Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.target/arm/fixed_float_conversion.c @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Check that vcvt is used for fixed and float data conversions. */ /* { dg-do compile } */ /* { dg-require-effective-target arm_vfp3_ok } */ /* { dg-options "-O1" } */ /* { dg-add-options arm_vfp3 } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ float fixed_to_float (int i) { return ((float) i / (1 << 16)); } int float_to_fixed (float f) { return ((int) (f * (1 << 16))); } /* { dg-final { scan-assembler "vcvt.f32.s32" } } */ /* { dg-final { scan-assembler "vcvt.s32.f32" } } */