avih wrote:
- tcc 64 fails the asm tests (again, all versions regardless of how it was
built).
Different calling convention on win64. I'd suggest the attached
version which is more platform neutral.
-- gr
On Thursday, November 23, 2017 8:17 PM, grischka <gris...@gmx.de> wrote:
I've seen a segfault under some other circumstances on linux 64.
Using "lea str(%rip),%rdi" instead of "mov $str,%rdi" in asm-c-connect-1.c
did fix it. (I can't tell right now whether that is expected behavior or
points to a bug though.)
Also I noticed that apparently 'U' is a string prefix in newer gcc versions.
(Don't know, maybe for unicode?).
Btw, what about the "vide" hack on tccasm.c:1020 from commit 6afe668ec
Can we delete it?
Ciao,
--- grischka
#include <stdio.h>
#if defined _WIN32 && !defined __TINYC__
# define _ "_"
#else
# define _
#endif
static int x1_c(void)
{
printf("x1\n");
return 1;
}
asm(".text;"_"x1: call "_"x1_c; ret");
int main(int argc, char *argv[])
{
asm("call "_"x1");
asm("call "_"x2");
asm("call "_"x3");
return 0;
}
static
int x2(void)
{
printf("x2\n");
return 2;
}
extern int x3(void);
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel