thradams / cake

Cake a C23 front end and transpiler written in C
http://thradams.com/cake/index.html
GNU General Public License v3.0
544 stars 24 forks source link

implement __asm__ #122

Open thradams opened 8 months ago

thradams commented 8 months ago

asm is not implemented

//en.cppreference.com/w/c/language/asm.html
#include <stdio.h>

extern int func(void);
// the definition of func is written in assembly language
__asm__(".globl func\n\t"
        ".type func, @function\n\t"
        "func:\n\t"
        ".cfi_startproc\n\t"
        "movl $7, %eax\n\t"
        "ret\n\t"
        ".cfi_endproc");