You are reading a single comment by @FManga and its replies. Click here to read the full conversation.
  • I sent you the PR that allows specifically #include <math.h> and enables the string literals.

    Edit: It'd probably be good to have some other headers in there, such as cstdint.

    -mfloat-abi=name
    Specifies which floating-point ABI to use. Permissible values are: ‘soft’, ‘softfp’ and ‘hard’.
    Specifying ‘soft’ causes GCC to generate output containing library calls for floating-point operations. ‘softfp’ allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. ‘hard’ allows generation of floating-point instructions and uses FPU-specific calling conventions.

    Looks like changing from soft to softfp is exactly what we want.

    Edit2: I tested softfp and the compiler does output floating-point instructions. I have no code to test if the float argument passing works as intended, though.

  • I tested softfp and the compiler does output floating-point instructions. I have no code to test if the float argument passing works as intended, though.

    It already works like that, no changes in EspruinoCompiler needed (unless it broke recently)

    Also using floating point instructions work inside inline C, see my tests linked in previous post.

    Include files and macros are intentionally blocked https://github.com/gfwilliams/EspruinoCo­mpiler/blob/master/src/compile.js#L466 so you can't include math.h

About

Avatar for FManga @FManga started