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

2013-01-26 Thread Thomas Preud'homme
Le samedi 5 janvier 2013 16:50:32, Thomas Preud'homme a écrit : > What would you think of this simpler patch instead? It works on you fp.c > code at least and it should work for any level. > > It's a simple proof of concept as of now because I'm not sure how the > addresses of local variables are

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

2013-01-05 Thread Thomas Preud'homme
Le samedi 5 janvier 2013 16:35:44, vous avez écrit : > > > > Are you sure the code you compiled for ARM doesn't contain > > __builtin_return_address instead of __builtin_frame_address? > > Thomas, thanks for correcting my arm assembly errors. I agree I did make > mistakes, but I'm sure __builtin_

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

2013-01-05 Thread Thomas Preud'homme
What would you think of this simpler patch instead? It works on you fp.c code at least and it should work for any level. It's a simple proof of concept as of now because I'm not sure how the addresses of local variables are stored in tcc. Thus, I'm not sure that this doesn't break access to loc

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

2013-01-05 Thread Kirill Smelkov
On Sat, Jan 05, 2013 at 03:36:49PM +0100, Thomas Preud'homme wrote: > Le jeudi 13 décembre 2012 17:55:41, vous avez écrit : > > [SNIP] > > > > > from arch/arm/kernel/stacktrace.c: > > > > * With framepointer enabled, a simple function prologue looks like > > this: * mov ip, sp > >

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

2013-01-05 Thread Thomas Preud'homme
Le jeudi 13 décembre 2012 17:55:41, vous avez écrit : [SNIP] > > from arch/arm/kernel/stacktrace.c: > > * With framepointer enabled, a simple function prologue looks like > this: * mov ip, sp > * stmdb sp!, {fp, ip, lr, pc} > * sub fp, ip, #4 > * > * A simple

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

2012-12-13 Thread Kirill Smelkov
Daniel, Thomas, first of all I'm sorry it took me so long to reply. ( Also, if there are some stupid mistakes wrt arm assembly, please forgive me. I've tried to make my analisys resilent to maybe-present off-by-ones, and reply sooner than later, not spending more 20min*several-days to be 100

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

2012-12-09 Thread grischka
Kirill Smelkov wrote: Also grischka writes: btest is not a feature that we can't recommend to use really (at least as long as tcc -btest tcc.c doesn't produce anything useful), FYI, as of mob a55ecf6d it now does, so please don't treat -b mode as second class citizen anymore. Ok. I admit th

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

2012-12-09 Thread Kirill Smelkov
On Thu, Dec 06, 2012 at 02:23:25PM +0100, Thomas Preud'homme wrote: > Le jeudi 6 décembre 2012 04:50:55, vous avez écrit : > > > > > > Hi Kirill, > > > > > > did you make any progress on the issue since Daniel's comments? Could you > > > let me know when you push a patch so that I can test it and

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

2012-12-06 Thread grischka
Thomas Preud'homme wrote: Grischka, what do you think of releasing a rc1 after that? We got plenty of features merged since last release and 3 years start to be quite a long time. I know there is still many things to improve, including some I care about, but it might attract new contributions o

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

2012-12-06 Thread Thomas Preud'homme
Le jeudi 6 décembre 2012 04:50:55, vous avez écrit : > > > > Hi Kirill, > > > > did you make any progress on the issue since Daniel's comments? Could you > > let me know when you push a patch so that I can test it and bump master > > to equal the mob branch? > > Hi Thomas, > > Unfortunately not

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

2012-12-05 Thread Kirill Smelkov
On Wed, Dec 05, 2012 at 11:26:32AM +0100, Thomas Preud'homme wrote: > Le vendredi 30 novembre 2012 00:43:07, Daniel Glöckner a écrit : > > > > You should not look at a leaf function to derive the GCC stack frame. > > It is probably different from the generic stack frame because GCC > > knows this

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

2012-12-05 Thread Thomas Preud'homme
Le vendredi 30 novembre 2012 00:43:07, Daniel Glöckner a écrit : > > You should not look at a leaf function to derive the GCC stack frame. > It is probably different from the generic stack frame because GCC > knows this function will never be part of a stack trace done by > another function of the

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 > > : >0: e1a0c00dmov ip, sp >4: e92d0003push{r0, r1} >

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

2012-11-29 Thread Kirill Smelkov
On Mon, Nov 26, 2012 at 12:05:19AM +0400, Kirill Smelkov wrote: > On Sat, Nov 24, 2012 at 02:43:34PM +0100, Thomas Preud'homme wrote: > > Le samedi 24 novembre 2012 10:02:54, Kirill Smelkov a écrit : > > > > > > Thanks for the info. The progress on my side is as follows: I've learned > > > arm ass