You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • I was hoping I could add the following to E.compiledC, but even after accounting for the double-escaping, I'm not having success :

    float __attribute__((naked)) __aeabi_d2f(double d) {__asm__ volatile(
        "lsrs r0, #30\n\t"
        "lsls r2, r1, #12\n\t"
        "lsrs r2, #9\n\t"
        "asrs r1, #22\n\t"
        "lsls r1, #22\n\t"
        "orrs r0, r1\n\t"
        "orrs r0, r2\n\t"
        "bx lr"
    );}
    
    double __attribute__((naked)) __aeabi_f2d(float f) {__asm__ volatile(
        "asrs r1, r0, #3\n\t"
        "movs r2, [#0xf](https://forum.espruino.com/search­/?q=%230xf)\n\t"
        "lsls r2, #27\n\t"
        "orrs r1, r2\n\t"
        "lsls r0, #25\n\t"
        "bx lr"
    );}
    

    If you have any luck, please let me know!

About

Avatar for fanoush @fanoush started