Testing here shows:
#include <stdint.h>
#include <stdio.h>
void *
bar(void)
{
return (void *)0xffffffff12345678;
}
int
main(int argc, char **argv)
{
void *ret;
ret = bar();
printf("Ret is 0x%llx\n", ret);
return 0;
}
compile with:
tcc -m64 -o bar.exe bar.c
and run as:
bar Ret is 0xffffffff12345678
so this seems to be fine.
--Fred
On Sunday, June 25, 2023 at 02:34:11 PM EDT, Herman ten Brugge via
Tinycc-devel <[email protected]> wrote:
On 6/25/23 09:45, ljs wrote:
//in app void* Create() { return 0xffffffff12345678; }
tcc_add_symbol("Create",Create);
//in tcc script void * ret = Create(); //in 64 bit,ret ==
0x0000000012345678;not 0xffffffff12345678 If do not understand this.
Can you give a small sample program that I can compile to show your problem.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel