RE: [Tinycc-devel] libtcc not working properly on x86-64 targets

2009-12-21 Thread Michael Kuklinski
I'm going to try to restate my problem since I poorly presented it originally. Using both the Master and the Mob revisions, I have the same problem in x86-64 mode. If I attempt to pass a pointer to a function using tcc_add_symbol, the pointer somewhere down the line becomes truncated to 32-bit.

RE: [Tinycc-devel] libtcc not working properly on x86-64 targets

2009-12-21 Thread Michael Kuklinski
I'm saying that that's the effect I'm getting -- I'm using the latest Master, and functions that I pass as symbols in 64-bit mode are having their addresses truncated to 32 bits. I don't know where it is occurring in code. -Original Message- From: grischka Sent: Monday, December 21, 200

Re: [Tinycc-devel] libtcc not working properly on x86-64 targets

2009-12-21 Thread grischka
Michael Kuklinski wrote: I'm using the master version. AFAIK there aren't any "cast to uint_32 from void*" in the master branch. --- grischka -Original Message- From: grischka Sent: Monday, December 21, 2009 11:33 AM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] libtcc no

Re: [Tinycc-devel] RE: size_t badly redefined in time.h for _WIN64

2009-12-21 Thread grischka
Christian Jullien wrote: I also noticed that size_t size varies Okay, I fixed that: http://repo.or.cz/w/tinycc.git/commitdiff/24dd2505 Also, you might be able to #define _USE_32BIT_TIME_T if you want time32_t, but no promises, since not only time_t but a lot more depends on that in the mingw h

RE: [Tinycc-devel] libtcc not working properly on x86-64 targets

2009-12-21 Thread Michael Kuklinski
I'm using the master version. -Original Message- From: grischka Sent: Monday, December 21, 2009 11:33 AM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] libtcc not working properly on x86-64 targets Michael Kuklinski wrote: > I did fix several bugs in the adding of the symbol tha

Re: [Tinycc-devel] libtcc not working properly on x86-64 targets

2009-12-21 Thread grischka
Michael Kuklinski wrote: I did fix several bugs in the adding of the symbol that were equivalent to a cast to uint_32 from void*, however the system is still treating it as a 32-bit address -- for instance, if I pass it 0xAABBCCDD11223344, I get an access exception on 0x11223344. Is it

[Tinycc-devel] RE: size_t badly redefined in time.h for _WIN64

2009-12-21 Thread Christian Jullien
I also noticed that size_t size varies #include int s1() { size_t i; return(sizeof(i)); } #include int s2() { size_t i; return(sizeof(i)); } int main() { printf("before time.h: %d\n", s1()); printf("after time.h: %d\n", s2()); } Outputs: before time.h: 4 afte

[Tinycc-devel] size_t badly redefined in time.h for _WIN64

2009-12-21 Thread Christian Jullien
foo.c: #include static void foo(size_t); #include // after time.h is included, size_t is not of the same type static void foo(size_t unused) {} tcc foo.c foo.c:4: error: incompatible types for redefinition of 'foo' Changing by: #ifndef _SIZE_T_DEFINED #define _SIZE_T_DEFI

RE: [Tinycc-devel] libtcc not working properly on x86-64 targets

2009-12-21 Thread Michael Kuklinski
I did fix several bugs in the adding of the symbol that were equivalent to a cast to uint_32 from void*, however the system is still treating it as a 32-bit address -- for instance, if I pass it 0xAABBCCDD11223344, I get an access exception on 0x11223344. Is it possible that TinyCC is si