Re: [Tinycc-devel] include file not found

2006-06-29 Thread Daniel Glöckner
On Fri, Jun 30, 2006 at 01:40:11AM +0800, rty wrote: .\examples\fib.c:1: include file 'stdio.h' not found my question: how to include stdio.h ? I use windows98 TCC does not provide stdio.h, as it was originally targetted at unix-like systems where C header files are usually provided by the

Re: [Tinycc-devel] TCC on new ARM selfhosted

2006-09-05 Thread Daniel Glöckner
On Tue, Sep 05, 2006 at 08:46:31PM +0200, [EMAIL PROTECTED] wrote: Since we are already discussing ARM features, has anyone succeeded in getting a _selfhosted_ ARM version for any kind of system (Windows CE or Linux). That would require an ARM inline assembler in TinyCC. IIRC the one I wrote

Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL)

2006-09-08 Thread Daniel Glöckner
On Thu, Sep 07, 2006 at 11:10:08PM -0500, Cayle Graumann wrote: 5) I switched to the ARMEL (EABI) environment, and reconfigured with --enable-cross. As mentioned before the config.h file was not made. Probably because uname -m is armv5tejl and configure only knows about armv4l.

Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL)

2006-09-17 Thread Daniel Glöckner
On Sun, Sep 17, 2006 at 02:12:39PM -0500, Cayle Graumann wrote: #define nelem(x)(sizeof (x)/sizeof (x)[0]) Try #define nelem(x)(sizeof (x)/sizeof ((x)[0])) parse_expr_type() needs the block after /* post operations */ from unary() after skip(')') when parse_btype() is false.

Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL)

2006-09-18 Thread Daniel Glöckner
On Mon, Sep 18, 2006 at 12:42:12AM -0500, Cayle Graumann wrote: When I try and compile the test code, everything goes well until the linking step, when I get undefined symbol errors for __libc_csu_fini and __libc_csu_init. In my scratchbox environment /usr/lib/libc.so is a linker script with

Re: [Tinycc-devel] Bug in tcc

2006-09-24 Thread Daniel Glöckner
Patch is attached. save_reg tried to save a floating point value from the value stack because its r2 contained 0 (== TREG_EAX), but r2 is valid only for VT_LLONG. Daniel diff -rud a/tcc.c b/tcc.c --- a/tcc.c Sun Sep 24 18:34:55 2006 +++ b/tcc.c Sun Sep 24 18:35:16 2006 @@ -4585,7

Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL) [PATCH]

2006-10-09 Thread Daniel Glöckner
On Sun, Oct 08, 2006 at 11:44:35PM -0400, Rob Landley wrote: What exactly does this do? I mean, what _is_ arm EABI? The codesourcery page on this says that EABI is a nickname for Arm's documented ABI: http://www.codesourcery.com/gnu_toolchains/arm/faq.html#q_ABI_what_is_abi

Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL) [PATCH]

2006-10-09 Thread Daniel Glöckner
On Mon, Oct 09, 2006 at 04:52:19PM +0200, Daniel Glöckner wrote: and I would not have inserted that bug in gen_cvt_itof by incorrectly using func_old_type. Patch for this bug (and another one that I found while testing the patch) attached. Apply after the big EABI patch. Daniel diff -rwud

Re: [Tinycc-devel] Merging patches...

2006-10-09 Thread Daniel Glöckner
On Sun, Oct 08, 2006 at 11:49:53PM -0400, Rob Landley wrote: Would someone please explain to me why stdarg.h says the va_args macros are only correct for i386, but we have an arm eabi patch pending that doesn't touch this file? Which is wrong? The both are wrong. The macros are correct for

Re: [Tinycc-devel] Merging patches...

2006-10-09 Thread Daniel Glöckner
On Mon, Oct 09, 2006 at 03:53:28PM -0400, Rob Landley wrote: Is that the only one that needs per-arch tweaking? Let's see... The c67 target can pass only simple values = 4 bytes to functions and has no code to handle the variable arguments passed in registers. The il target is too abstract to

Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane).

2006-10-12 Thread Daniel Glöckner
On Thu, Oct 12, 2006 at 04:35:31PM -0400, Rob Landley wrote: I just don't see why what machine you're running the compiler on is any of the compiler's business. It should only care what machine it's producing target binaries for. So the difference between cross-compiling and native

Re: [Tinycc-devel] what are tcc's limitations?

2006-10-12 Thread Daniel Glöckner
On Sat, Oct 14, 2006 at 04:26:24AM +0800, bj wrote: what is it's difference between mingw except for speed, size ,the fact that it has no sound and no .rc resource compiling (by default)? MinGW = GCC GCC received a lot more testing and thus can more likely cope with uncommon C constructs.

Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane).

2006-10-12 Thread Daniel Glöckner
On 12 Oct 06 17:11, Rob Landley wrote: and teaching it about dead code elimination are higher priority for me than most other things. Isn't that easy to do. Think about if(0) { ... label: ... } ... goto label; You may not discard the contents of the if until you are shure that the label

Re: [Tinycc-devel] TCC on ARM

2006-12-01 Thread Daniel Glöckner
On Fri, Dec 01, 2006 at 05:29:11AM -0800, tike64 wrote: Thanks for hint. Why wasn't -lm needed when host machine was i386? Glibc on i386 has ldexp in libc.so.6 as well as in libm.so.6, so -lm is not needed. Are you trying to compile it on Linux? tcc.c:9505:2: warning: #warning add arch

Re: [Tinycc-devel] TCC on ARM

2006-12-06 Thread Daniel Glöckner
On Mon, Dec 04, 2006 at 12:19:53AM -0800, tike64 wrote: Daniel Glöckner [EMAIL PROTECTED] wrote: I prefer to just ln -s libgcc1_s.so to libtcc1.a. I have used buildroot to make a toolchain. I couldn't find libgcc1* from the tree - only libgcc.a and friends. Sorry, I meant libgcc.a

Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?

2007-05-07 Thread Daniel Glöckner
On Mon, May 07, 2007 at 12:31:00PM -0400, David A. Wheeler wrote: Many C compilers implement alloca() by simply manipulating the stack pointer. Indeed, grischka's patch does this (though only for x86-32 Windows). But in tinycc's case, the obvious way to do this will fail horrifically in

Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?

2007-05-08 Thread Daniel Glöckner
On Tue, May 08, 2007 at 02:31:33PM -0400, David A. Wheeler wrote: Unfortunately this breaks ({int x=1; x;}). Sorry, I don't understand that last sentence. ({int x=1; x;}) puts a reference to x on vtop and leaves the block. We may not reuse x's stack space. int f() { return ({int x=1;

Re: [Tinycc-devel] alloca for tcc (x86) - second cut

2007-05-09 Thread Daniel Glöckner
On Wed, May 09, 2007 at 12:56:03AM -0400, David A. Wheeler wrote: Rob Landley: Last I checked, tcc could also produce arm output. I take it this is going to need an arm version of the .S file? (This goes in... libtcc?) I'm not planning to write the ARM code, but once the x86 code is

Re: [Tinycc-devel] alloca for tcc (x86) - second cut

2007-05-10 Thread Daniel Glöckner
On Wed, May 09, 2007 at 07:25:25PM -0400, David A. Wheeler wrote: Rob Landley: 4) Daniel's arm version is way the heck shorter than your x86 version, and seems more like what I'd expect for tcc... That code doesn't interface with the bounded stuff... and if you use -b, it should handle

Re: [Tinycc-devel] Isolated bug

2007-05-12 Thread Daniel Glöckner
, Daniel Glöckner wrote: int f(int *x) { asm(xorl %0,%0:=r(*x)); } Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Unknown assembler directive '.lcomm'

2007-05-16 Thread Daniel Glöckner
On Wed, May 16, 2007 at 11:07:11AM -0300, Conrado Miranda wrote: So I got the asm.c file at http://landley.net/code/tinycc/bugs. I tried to compile but I got an error: asm.c:5: unknown opcode 'xorl'. The bug asm.c triggers is that subst_asm_operand doesn't have enough information to correctly

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Daniel Glöckner
On Wed, Oct 03, 2007 at 01:59:47AM -0500, Rob Landley wrote: It boils down to a funky call to alloca()... One thing to note is that memory for VLAs is freed when the block ends. GCC does this by saving the stack pointer before allocating the VLA and restoring it at the end of the block. This

Re: [Tinycc-devel] command line parsing in scripts

2008-04-28 Thread Daniel Glöckner
On Mon, Apr 28, 2008 at 04:22:42PM +, Joshua Phillips wrote: Since when can you only pass one argument to the interpreter? Try this: #!/bin/echo -DTEST=1 -run Put it in a file, chmod +x and run it. You get -DTEST=1 -run ./filename. If you don't, then there's a problem with your

Re: [Tinycc-devel] [PATCH] bug?

2008-08-19 Thread Daniel Glöckner
Patch is attached. gfunc_prolog did not set VT_LVAL_xxx flags for function arguments. I hope lvalue_type in that place always does the right thing. Daniel diff -rwud tinycc-orig/arm-gen.c tinycc/arm-gen.c --- tinycc-orig/arm-gen.c Tue Dec 4 21:38:09 2007 +++ tinycc/arm-gen.cWed Aug

Re: [Tinycc-devel] tinycc on arm

2008-09-02 Thread Daniel Glöckner
On Tue, Sep 02, 2008 at 11:31:01AM +0800, ccecping wrote: I am trying to compile tinycc to let it run on arm. I downloaded tcc-0.9.24.tar, and I tried many times but failed, I wonder if it can run ARM? It does for some configurations. Please tell us - where you try to compile tinycc - the

Re: [Tinycc-devel] tinycc on arm

2008-09-03 Thread Daniel Glöckner
On Wed, Sep 03, 2008 at 04:23:50PM +0800, ccecping wrote: /usr/lib/crtl.o: invalid object file /usr/lib/crti.o: invalid object file /usr/lib/libm.so:bad architecture /usr/lib/libm.a: invalid object file tcc: cannot find -lm make:*** [tcc] Error 1 It needs crt1.o, crti.o, crtn.o, libm,

[Tinycc-devel] [PATCH 1/5] Runtime lib functions

2008-09-05 Thread Daniel Glöckner
Yesterday I felt the urge to change a few things in TinyCC. This is the first and biggest change of all of them. - use __aeabi_*divmod functions in ARM EABI to make binaries depend solely on standardized library functions - refactor ARM floating point - integer conversion a bit - rename long

[Tinycc-devel] [PATCH 2/5] ARM related Makefile changes

2008-09-05 Thread Daniel Glöckner
- Builds all four possible ARM targets when cross compiling - Adds some auto detection to select the target for native ARM builds The auto detection will select EABI if it finds /lib/ld-linux.so.3. It will select VFP floating point support when /proc/cpuinfo lists a VFP or iWMMXt coprocessor.

[Tinycc-devel] [PATCH 3/5] A prefix for default library/include search paths

2008-09-05 Thread Daniel Glöckner
This patch is useful for cross compilers. Without this patch tcc tries to use the host's libraries, crt*.o and include files. The patch prepends a string to all default paths. The string can be passed to configure with --sysroot=string. Daniel diff -rud tcc-0.9.24-immed2/configure

Re: [Tinycc-devel] tinycc on arm

2008-09-05 Thread Daniel Glöckner
On Fri, Sep 05, 2008 at 08:45:30AM +0800, ccecping wrote: I can find crt*.o files under the cross compiler arm-linux-gcc directories. Those crtbegin*.o and crtend*.o files provided by gcc are not needed by TinyCC. Did you build glibc yourself? Daniel

Re: [Tinycc-devel] Re: TinyCC CVS, Rob's fork, the future (was: [PATCH 5/5] Fix gv for long longs)

2008-09-07 Thread Daniel Glöckner
On Mon, Sep 08, 2008 at 01:05:09AM +0400, Kirill Smelkov wrote: Sorry for the noise again, but isn't this what cvsps does already for ages? Wheels like being reinvented. :) Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org

Re: [Tinycc-devel] [PATCH 5/5] Fix gv for long longs

2008-09-11 Thread Daniel Glöckner
On Thu, Sep 11, 2008 at 05:06:43AM +0200, grischka wrote: There are three diffs: - arm.diff : some hunks seem to exist already in CVS completely applied by bellard 2004-10-04 22:19:21 - bugfixes.diff : applies mostly but not completly chunk 1+2 replaced by bellard 2004-10-18 00:18:20 chunk 3

Re: [Tinycc-devel] too many basic types error

2008-09-15 Thread Daniel Glöckner
On Mon, Sep 15, 2008 at 02:23:45PM -0700, Josh Goldstein wrote: /* struct var_value { int var_type; union var_data my_data; } */ If I uncomment the commented part, I get the error. Is there a limit on the number of structs or unions you can define? Yes, but it is VERY high.

Re: [Tinycc-devel] tinycc on arm

2008-09-25 Thread Daniel Glöckner
On Thu, Sep 25, 2008 at 10:11:59PM +0800, ccecping wrote: I compiled tcc with arm-tcc, and it can run on arm, but needs lots of lib files to support, how to solve it? which libary files should I copy to arm? You need libc.so.6, libm.so.6, and libdl.so.2 to be able to run tcc. On top of that

Re: [Tinycc-devel] tinycc on arm

2008-09-27 Thread Daniel Glöckner
On Sat, Sep 27, 2008 at 09:31:34AM +0800, ccecping wrote: But if I include stdio.h, #include stdio.h main() { int i=0; i++; printf(%d,i); return 0; } then it said: In file included from /hello.c:1; In file included from /usr/local/include/stdio.h:62;

Re: [Tinycc-devel] can tcc compile assembly language program?

2008-11-10 Thread Daniel Glöckner
On Mon, Nov 10, 2008 at 03:48:22PM +0800, ccecping wrote: Can tcc compile the assembling language program? For x86, yes. For ARM, no. and if it can ,how to configure it? No special configuration needed. Daniel ___ Tinycc-devel mailing list

Re: [Tinycc-devel] Re: global 64-bit variables initialization

2008-11-20 Thread Daniel Glöckner
On Thu, Nov 20, 2008 at 08:50:22AM +0100, Masha Rabinovich wrote: int a = 2.0 ? 0 : 1; int b = (_Bool)2.0; int c = !2.0; int d = 2.0; int e = (char)500; int main() { printf(%d %d %d %d %d\n, a, b, c, d, e); } GCC output: 0 1 0 2 -12 TCC output: 1 0 1 0 500 Nice example. It

Re: [Tinycc-devel] x86-64 port

2008-11-29 Thread Daniel Glöckner
On 30 Nov 08 05:12, shinichiro. h wrote: I've worked on porting TCC for x86-64 and I'd like to send a patch. This patch is the diff from CVS head. http://shinh.skr.jp/tmp/tinycc_x86_64.patch.gz I'd really like to see this being split. One could make one big patch for those Elf32_x - ElfW(x)

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-18 Thread Daniel Glöckner
On Fri, Mar 13, 2009 at 05:05:09PM -0500, Rob Landley wrote: On Thursday 12 March 2009 16:20:28 Marc Andre Tanner wrote: grischka and Daniel you are the ones who actually committed code during the last few months, what do you think? I'm fine with whatever RCS is used. It's not like I touch

Re: [Tinycc-devel] arm-gen: suspicious looking loop constructs

2009-05-06 Thread Daniel Glöckner
On Wed, May 06, 2009 at 04:09:32PM +0200, grischka wrote: which looks like it could be typos. Daniel? You are right, this is broken in several ways. I must have had a bad day. It is fixed in mob. Daniel ___ Tinycc-devel mailing list

Re: [Tinycc-devel] tinycc on Mac

2009-05-16 Thread Daniel Glöckner
On Sat, May 16, 2009 at 09:41:17AM +0200, Francesco Turci wrote: tcc.c: In function ?rt_get_caller_pc?: tcc.c:9865: error: request for member ?gregs? in something not a structure or union Could you test the attached patch? I don't have a Mac to test on. I based the patch on this mail:

Re: [Tinycc-devel] accessing tinycc from C program

2009-08-20 Thread Daniel Glöckner
On Thu, Aug 20, 2009 at 05:06:47PM +, fsw...@comcast.net wrote: tcc_compile_string(s, int main(){printf(Hello World!);return 0;}\n); How about tcc_compile_string(s, int main(){printf(\Hello World!\);return 0;}\n); ? Daniel ___ Tinycc-devel

Re: [Tinycc-devel] Working on new features

2009-08-25 Thread Daniel Glöckner
On Tue, Aug 25, 2009 at 10:27:00AM +0200, Frédéric Feret wrote: I also saw in this thread: http://lists.gnu.org/archive/html/tinycc-devel/2006-09/msg5.html that Daniel had written an ARM assembler for TCC, but I can't find nor in tinycc/daniel.git, or on its website. It is possible to

Re: [Tinycc-devel] Working on new features

2009-08-26 Thread Daniel Glöckner
On Wed, Aug 26, 2009 at 10:44:14AM +0200, Frédéric Feret wrote: Here's my TCC patches. I will try to push these modifications on the mob branch. --- tcc.orig/tcc.h 2009-07-18 22:08:01.0 +0200 +++ tcc/tcc.h 2009-08-25 22:54:49.41750 +0200 @@ -118,8 +118,7 @@ #endif /*

Re: [Tinycc-devel] TCC sizeof incorrect result

2009-10-07 Thread Daniel Glöckner
On Thu, Oct 08, 2009 at 03:03:52AM +0800, Nyan Htoo Tin wrote: printf(sizeof buf + 0 = %u\n,sizeof(buf+0)); Fixed in mob branch Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Oddness in latest mob release

2009-10-22 Thread Daniel Glöckner
On Thu, Oct 22, 2009 at 10:56:12AM +0300, Robert Starr wrote: Problem is that crti.o and crtn.o aren't even present in this build. crti.o and crtn.o are provided by the glibc-devel package. Are you compiling for x86_64 targets? Then they are in /usr/lib64. Daniel

Re: [Tinycc-devel] Array BUG

2010-03-15 Thread Daniel Glöckner
On Mon, Mar 15, 2010 at 11:30:51AM +0100, pancake wrote: this code doesnt compiles with gcc ,the bug is because tcc allows to compile such expressions? a.c:10: error: invalid use of array with unspecified bounds a.c:10: error: invalid use of array with unspecified bounds I have a patch that

Re: [Tinycc-devel] WinCE ARM prolog

2010-04-17 Thread Daniel Glöckner
On Fri, Apr 16, 2010 at 11:18:44PM +0300, Timo VJ Lähde wrote: Is TinyCC ARM prolog : mov ip, sp stmdb sp!, {fp, ip, lr} add fp, sp, #C compatible with this ? From Microsoft http://msdn.microsoft.com/en-us/library/ms254231.aspx Probably not. I never thought of making it compatible with

Re: [Tinycc-devel] tcc-git compilation error

2010-05-06 Thread Daniel Glöckner
On Thu, May 06, 2010 at 07:53:24AM -0700, Gustavo Bruzza wrote: *a.c:11: error: ';' expected (got .Luid)*. I hope someone can point my mistake or confirm this as a bug. This is a known bug. For now I have reverted the offending commit in mob. Daniel

Re: [Tinycc-devel] Failed compilation on armel: bug?

2010-05-10 Thread Daniel Glöckner
On Mon, May 10, 2010 at 01:13:33AM +0200, Thomas Preud'homme wrote: tcc tests fails to run on armel debian build daemon and it doesn't seems like a debian specific issue as I got a can't relocate at value x message. See

[Tinycc-devel] Weak symbol problem

2010-05-14 Thread Daniel Glöckner
Hi, while trying to get TinyCC to link to Debian sid's armel libraries, I've encountered a problem with weak symbols. The situation is as follows: - crti.o contains a R_ARM_PLT32 and R_ARM_GOT32 relocation to the weak undefined symbol __gmon_start__ - no library defines this symbol - TinyCC

Re: [Tinycc-devel] Weak symbol problem

2010-05-14 Thread Daniel Glöckner
Before I commit the following patch as fix, can somebody please look over it for side effects? The patch marks all undefined weak symbols found in external libraries as strong. The value of all remaining weak symbols is set to zero just before the section is output. If this approach is correct,

Re: [Tinycc-devel] A question about c lib used by tcc on linux

2010-12-09 Thread Daniel Glöckner
On Wed, Dec 08, 2010 at 04:56:36PM +0800, Bin Shi wrote: On linux platform, what c library is used by tcc ? Is it glibc ? Looking at the code: on EABI ARM and x86_64 glibc else uClibc if it is available else glibc If so, which version is used by tcc-0.9.25? glibc 2.x Is there some

Re: [Tinycc-devel] Several Question about arm-tcc

2010-12-28 Thread Daniel Glöckner
On Tue, Dec 28, 2010 at 04:14:43PM +0800, Bin Shi wrote: 1. I can compile tcc with gcc, but failed with tcc it self (--cc=/tcc/bin/tcc), how to fix it? the error message is listed as follow: /tcc/bin/tcc -o tcc tcc.o libtcc.a -lm -ldl tcc: error: undefined symbol '__divdi3' tcc: error:

Re: [Tinycc-devel] Struct and float parameter passing ir arm-gen.c

2011-10-27 Thread Daniel Glöckner
Hi, On Fri, Oct 28, 2011 at 12:08:55AM +0200, Thomas Preud'homme wrote: I've been reading arm-gen.c lately and was a bit surprised by some code related to struct and float (including double and long double) parameter passing in gfunc_call. It's probably just a mistake from my reading in

Re: [Tinycc-devel] Memory corruption bug in libtcc

2012-01-22 Thread Daniel Glöckner
On Mon, Jan 23, 2012 at 12:14:58AM +0100, grischka wrote: Thomas Preud'homme wrote: Similar bug happens for i386 for example with double bar(double a, double b, double c, double d); double foo (double *p) { return bar(p[1], p[2], p[3], p[4]); } which

Re: [Tinycc-devel] Memory corruption bug in libtcc

2012-01-23 Thread Daniel Glöckner
On Mon, Jan 23, 2012 at 11:30:54AM +0100, Thomas Preud'homme wrote: Shouldn't the same fix (Cf attached file) be applied for x86-64? Yes you are right, x86-64 needs fixing as well. As I'm not sure about the answer I didn't dare to commit the change. It needs to be modified a little, as load

Re: [Tinycc-devel] Support arm hardfloat calling convention

2012-06-04 Thread Daniel Glöckner
Hi Thomas, On Tue, May 22, 2012 at 03:42:47PM +0200, Thomas Preud'homme wrote: I added support for arm hardfloat calling convention (standard variant in AAPCS) and I would appreciate some feedback on the patch. there I was thinking that no one (including myself) would ever be able to

Re: [Tinycc-devel] Support arm hardfloat calling convention

2012-06-05 Thread Daniel Glöckner
On Mon, Jun 04, 2012 at 10:49:35PM +0200, Thomas Preud'homme wrote: I might be able to give you an access to a Debian porterbox. Would you be interested? Thanks, but no. These days I don't do that much TinyCC related in my spare time. Daniel ___

Re: [Tinycc-devel] Bug: malloc + function returning double + comparison between doubles

2012-06-10 Thread Daniel Glöckner
On Sun, Jun 10, 2012 at 09:15:52AM +0200, Michael Matz wrote: Thomas: as you were last fiddling with arm, you might want to check if the test works on it. The other alloca testcase is #ifdef'ed on i386 and x86_64, but that only makes sense if alloca really isn't supported on arm, which I

Re: [Tinycc-devel] Bug: malloc + function returning double + comparison between doubles

2012-06-10 Thread Daniel Glöckner
On Sun, Jun 10, 2012 at 08:03:24PM +0200, Thomas Preud'homme wrote: Le dimanche 10 juin 2012 20:01:11, Michael Matz a écrit : but we don't build a libtcc1 for ARM ... I think we should do so then. As it seems the various arithmetic routines of libtcc1.c aren't needed on arm it would

Re: [Tinycc-devel] question about bit-fields

2012-10-22 Thread Daniel Glöckner
On Mon, Oct 22, 2012 at 09:38:22PM +0200, Didier Barvaux wrote: Please send your patch, it may be better than mine. Or maybe we can create a third patch from ours and mine. By the way, ARM describes how to bit-fields should be laid out in

Re: [Tinycc-devel] TCC and smart linking

2012-10-23 Thread Daniel Glöckner
Hi, On Thu, Oct 11, 2012 at 01:14:57PM +0300, Oleg N. Cher wrote: Do you know Total Commander by /Christian Ghisler? /It is very powerful and widely functional product which is able to many possibilities. Its author is not specifically to save the code size, but the size of distribution is

Re: [Tinycc-devel] [ RFC] About packing two infos in a long v2

2012-11-10 Thread Daniel Glöckner
On Wed, Nov 07, 2012 at 04:18:00PM +0100, Thomas Preud'homme wrote: Le mercredi 7 novembre 2012 16:09:51, Milutin Jovanović a écrit : Other then that, looks OK to me. BTW, I did not check correctness, just reviewed the style and logic. Don't worry for the correctness. GOT needs to be

Re: [Tinycc-devel] [PATCH] arm: Handle __builtin_frame_address(1) correctly

2012-11-29 Thread Daniel Glöckner
On Thu, Nov 29, 2012 at 09:43:33PM +0400, Kirill Smelkov wrote: tcc first saves r0 r1, and only then fp: $ ./arm-eabi-tcc -c y.c $ arm-linux-gnueabi-objdump -d y.o f: 0: e1a0c00dmov ip, sp 4: e92d0003push{r0, r1} 8:

Re: [Tinycc-devel] ARM (RPi) compiler bug

2013-02-03 Thread Daniel Glöckner
Hi, should be fixed in mob now, please test. Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Another ARM (RPi) compiler bug

2013-02-03 Thread Daniel Glöckner
On Sun, Feb 03, 2013 at 10:14:16PM +0100, Christian Jullien wrote: Wrong double - int conversion when double is 0 Should be fixed as well now. Same type of error. Must have had a bad day. Daniel ___ Tinycc-devel mailing list

Re: [Tinycc-devel] Another ARM (RPi) compiler bug

2013-02-04 Thread Daniel Glöckner
Hi, On Mon, Feb 04, 2013 at 07:46:08AM +0100, Christian Jullien wrote: I'm still looking in ISO standard if there is a note on this conversion. Anyway, tcc behaves differently from gcc (and *all* other compiler I know where is conversion truncates) while tcc rounds it's specified in

Re: [Tinycc-devel] RE :Re: Another ARM (RPi) compiler bug

2013-02-04 Thread Daniel Glöckner
Hi, On Mon, Feb 04, 2013 at 09:51:04AM +0100, Christian JULLIEN wrote: Now my complete OpenLisp shows only ONE bug related to utf8 conversion (probably signed/unsigned char/int issue). keep in mind that on ARM plain char is unsigned. Daniel ___

Re: [Tinycc-devel] RE :Re: RE :Re: Another ARM (RPi) compiler bug

2013-02-04 Thread Daniel Glöckner
Hi, On Mon, Feb 04, 2013 at 01:47:46PM +0100, Christian JULLIEN wrote: your mail client produced a multipart/alternative with an empty text/plain part. The error is in gfunc_prolog when it does pn = (pn + (align-1)/4) -(align/4); while align is 4. Thomas, is the correct fix to clamp

Re: [Tinycc-devel] how to get Unix style line endings for output (just \n not \r\n) --- works when writing to a file, not when redirecting stdout on command line

2013-03-05 Thread Daniel Glöckner
On Tue, Mar 05, 2013 at 11:05:59AM -0800, John Refling wrote: Just curious though, where would developers go to find information specific to tinycc like this? I'd like to learn more of the tinycc details. Is there a list of all the tinycc extensions somewhere? The truth is that your

Re: [Tinycc-devel] TCC and external variables - am I not seeing something?

2013-03-09 Thread Daniel Glöckner
On Sun, Mar 10, 2013 at 12:31:11AM +0100, Aleksandar Kuktin wrote: The compiler I normally use is GCC, which has no problems about linking these files. Unless you compile with -fno-common Header files have this: /*extern*/ nbworks_do_align_t nbworks_do_align; It is bad practice to have

Re: [Tinycc-devel] Compiling preprocessed files with tinycc?

2013-03-20 Thread Daniel Glöckner
On Wed, Mar 20, 2013 at 01:01:10PM -0700, Austin English wrote: manually correcting that, I'm able to preprocess the problematic file down to: austin@debian-home:~/src/wine-tcc/dlls/d3d8/tests$ cat stateblock.i.tcc.c typedef struct _D3DVECTOR { float x; float y; float z; } D3DMATRIX;

Re: [Tinycc-devel] ARM code generator / ARM tiny C compiler

2013-04-24 Thread Daniel Glöckner
On Wed, Apr 24, 2013 at 06:00:17PM +0200, ggasnie...@free.fr wrote: Are there people working on the feature ? For this long-term feature, what are the main aspects of TCC to understand before going forward ? What do you miss in the current TCC ARM code generator? Daniel

Re: [Tinycc-devel] ARM code generator / ARM tiny C compiler

2013-04-24 Thread Daniel Glöckner
On Wed, Apr 24, 2013 at 10:15:29PM +0200, ggasnie...@free.fr wrote: So where could I find the supported ARM architecture The generated code should be compatible with ARMv4. Floating point hardware or emulator (either FPA or VFP) is a must. and what is the roadmap for it ? There is no central

Re: [Tinycc-devel] ARM code generator / ARM tiny C compiler

2013-04-25 Thread Daniel Glöckner
On Thu, Apr 25, 2013 at 01:11:42PM +0200, Armin Steinhoff wrote: libtcc1.c doesn't compile for ARMv7 :) libtcc1.c doesn't contain the functions needed for ARM. Daniel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org

Re: [Tinycc-devel] RE :Re: ARM code generator / ARM tiny C compiler

2013-04-25 Thread Daniel Glöckner
On Thu, Apr 25, 2013 at 04:05:24PM +0200, Christian JULLIEN wrote: Wouah! Do you mean you're implementing eabi_ functions for ARM (such as div and mod ?) Total respect!! I once had an incomplete libtcc1 on my homepage, where I used a division function from GMP. It could not be compiled

Re: [Tinycc-devel] Recent changes segfault on Linux ARM

2013-04-26 Thread Daniel Glöckner
On Fri, Apr 26, 2013 at 08:27:25PM +0100, James Lyon wrote: I think that ARM should use a hidden pointer to return the data in ret_2float_test, but reading the ARM EABI spec a structure with 2 floats in might count as a 64-bit containerized vector and thus would be returned in r0 and r1. In

Re: [Tinycc-devel] Recent changes segfault on Linux ARM

2013-04-26 Thread Daniel Glöckner
On Fri, Apr 26, 2013 at 10:58:39PM +0200, Daniel Glöckner wrote: And I am not happy that is_fconst() apparently does not work. Scratch that. is_fconst() is for FPA an the VMOV (imm) instruction I saw in the output of GCC is VFPv3. Daniel ___ Tinycc

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-04-30 Thread Daniel Glöckner
On Tue, Apr 30, 2013 at 03:40:43PM +0200, grischka wrote: So the questions is: Do you people want, is it possible, what would it take - to change our tinycc code's license from LGPL to a BSD-like one (such as below). Please discuss. I don't see anything good coming from a change from LGPL

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-04-30 Thread Daniel Glöckner
On Tue, Apr 30, 2013 at 05:43:03PM +0200, Thomas Preud'homme wrote: As I already said privately, I'm fine with BSD-2-clause. Does that mean you prefer it over the LGPL? What about you, grischka? Which one do you prefer? Daniel ___ Tinycc-devel

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-04-30 Thread Daniel Glöckner
On Tue, Apr 30, 2013 at 07:07:34PM +0200, Thomas Preud'homme wrote: Mmmmh. Overall I'm more a (A|L)GPL guy but I choose different license for different project. For tcc I thought it could make sense since we have only libtcc has static lib and many people seem to build stuff around it. And

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-05-01 Thread Daniel Glöckner
Hi, On Tue, Apr 30, 2013 at 09:14:58PM +0200, Marc Andre Tanner wrote: The fear of proprietary forks seems unfounded because there is already a mature BSD licensed C compiler (clang) available for people to base their work on. Let's see.. $ size /opt/llvm/bin/clang textdata bss

Re: [Tinycc-devel] Recent changes segfault on Linux ARM

2013-05-01 Thread Daniel Glöckner
On Fri, Apr 26, 2013 at 10:58:39PM +0200, Daniel Glöckner wrote: There are two things broken in the code generated by TCC: First of all TCC thinks it has to return the structure in memory pointed to by r0 and second it gets confused about where it stored r0 and instead reads the first float

[Tinycc-devel] ARM hardfloat prolog

2013-05-01 Thread Daniel Glöckner
Hi Thomas, I saw that you used the following line to store the floating point arguments that have been passed in fpu register: o(0xED2D0A00|nf); /* save s0-s15 on stack if needed */ In my 2nd edition ARM ARM this maps to the FSTMS instruction and there is a note allowing implementations to

Re: [Tinycc-devel] Recent changes segfault on Linux ARM

2013-05-01 Thread Daniel Glöckner
Hi Christian, On Wed, May 01, 2013 at 04:44:09PM +0200, Christian Jullien wrote: ARM hardfloat: fix struct return with float/double args Fixes the case where the structure is not returned in registers. I thought it was related to ret_2float_test At least on Rpi I still have:

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-05-01 Thread Daniel Glöckner
On Tue, Apr 30, 2013 at 07:12:50PM +0200, Daniel Glöckner wrote: On Tue, Apr 30, 2013 at 07:07:34PM +0200, Thomas Preud'homme wrote: Mmmmh. Overall I'm more a (A|L)GPL guy but I choose different license for different project. For tcc I thought it could make sense since we have only libtcc

Re: [Tinycc-devel] ARM hardfloat prolog

2013-05-01 Thread Daniel Glöckner
On Wed, May 01, 2013 at 05:02:54PM +0200, Thomas Preud'homme wrote: Le mercredi 1 mai 2013 16:59:25, Daniel Glöckner a écrit : In my 2nd edition ARM ARM this maps to the FSTMS instruction and there is a note allowing implementations to keep the values in an internal representation and just

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-05-02 Thread Daniel Glöckner
Hi Rune, On Thu, May 02, 2013 at 10:37:58AM +, u-tcc-u...@aetey.se wrote: From my perspective I'd like to skip the additional worry about which programs can be linked to which libraries and how. if you are a packager, why do you have to worry about that? I mean, if you still have the

Re: [Tinycc-devel] ARM hardfloat prolog

2013-05-02 Thread Daniel Glöckner
On Thu, May 02, 2013 at 01:02:19PM +0200, Thomas Preud'homme wrote: Do you know where big-endian is used and by who? There once was a port of Debian for ARM big endian but it never got much traction so it seems to me there is not much interest for such a port anyway. No, I don't think I've

Re: [Tinycc-devel] Fastest TCC version

2013-06-21 Thread Daniel Glöckner
On Fri, Jun 21, 2013 at 05:26:05AM +0530, Sherjil Ozair wrote: Could anyone direct me to the fastest TCC version that is there right now for compile-time? I downloaded 0.9.26 from http://bellard.org/tcc/. Is this the fastest one? I expect not, since this is quite an old version. That's a

Re: [Tinycc-devel] TinyC configuration on WinXP

2013-08-07 Thread Daniel Glöckner
On Wed, Aug 07, 2013 at 08:37:22PM +0100, James Lyon wrote: It appears to add CPATH and C_INCLUDE_PATH to the header search path and LIBRARY_PATH to the linker search. I've not used this mechanism though. The code for this was added with 0ad857c80e1 after 0.9.26. 0.9.25 didn't use environment

Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold

2013-09-11 Thread Daniel Glöckner
On Wed, Sep 11, 2013 at 03:40:15PM -0500, Cayce Pollard wrote: ./../tinycc/tccpp.c:1961: error: undefined reference to 'strtold' Just substitute strtod for strtold. It has probably been omitted from Android's libc because long double == double on ARM nowadays (i.e. with EABI or VFP). Daniel

Re: [Tinycc-devel] Problem Compiling tinycc For Android: strtold

2013-09-12 Thread Daniel Glöckner
On Wed, Sep 11, 2013 at 08:26:31PM -0500, Cayce Pollard wrote: Also, would that work for linking __clear_cache to the Android equivalent cacheflush? I would prefer directly using the __ARM_NR_cacheflush syscall to make it work on non-Bionic Linux as well. The syscall has been introduced into

Re: [Tinycc-devel] Error: File crti.o/crt1.o Not Found and No Function Renaming

2013-09-17 Thread Daniel Glöckner
On Tue, Sep 17, 2013 at 07:07:38AM -0500, Cayce Pollard wrote: tcc: error: file '/project/arm-cc/sysroot/lib//libgcc_s.so.1' not found tcc: error: undefined symbol '__divsi3' tcc: error: undefined symbol '__modsi3' tcc: error: undefined symbol '__aeabi_uidiv' tcc: error: undefined symbol

Re: [Tinycc-devel] TCC, king of small exe... hey wait...

2013-09-20 Thread Daniel Glöckner
On Fri, Sep 20, 2013 at 06:49:05PM +0200, Yann Collet wrote: - Is it even an objective for TCC to generate small-size exe ? No, Wikipedia refers to the size of the compiler, not to the size of the output. Have you tried GCC's -Os switch? On very small executables padding added by the linker

Re: [Tinycc-devel] Generating better i386 code

2013-09-26 Thread Daniel Glöckner
Hi Jason, On Thu, Sep 26, 2013 at 03:39:45PM +1000, Jason Hood wrote: * 4- 8-byte structs copy as int/long long (all targets); did you check if the structure is aligned to a multiple of 4 bytes? Otherwise it will crash on ARM. Daniel ___

Re: [Tinycc-devel] Generating better i386 code

2013-09-27 Thread Daniel Glöckner
On Fri, Sep 27, 2013 at 11:21:19AM +1000, Jason Hood wrote: On 26/09/2013 16:30, Daniel Glöckner wrote: On Thu, Sep 26, 2013 at 03:39:45PM +1000, Jason Hood wrote: * 4- 8-byte structs copy as int/long long (all targets); did you check if the structure is aligned to a multiple of 4 bytes

Re: [Tinycc-devel] float value triggers error

2013-11-03 Thread Daniel Glöckner
On Sun, Nov 03, 2013 at 12:09:32PM -0800, Steven G. Messervey wrote: mob-branch, configured with --with-libgcc only, debian squeeze 32-bit: tcc: error: undefined symbol '__tcc_fpinit' tcc: error: undefined symbol '__tcc_cvt_ftol' --with-libgcc uses libgcc instead of libtcc1. This will of

Re: [Tinycc-devel] linking tinycc

2014-01-04 Thread Daniel Glöckner
Hi Christian, On Sat, Jan 04, 2014 at 10:46:15AM +0100, Christian Jullien wrote: If I understand you well, you want to change RELICENSING file From Daniel Glöckner? arm-gen.c To Daniel GlöcknerNO arm-gen.c done. What can we do

  1   2   >