Re: [Tinycc-devel] [PATCH] When handling '.' operator, cope with VT_LLOCAL

2015-02-21 Thread Michael Matz
Hi, On Fri, 20 Feb 2015, Edmund Grimley Evans wrote: Does this look all right? Do you have a testcase? I'll agree that there's possibly something fishy, but the change doesn't look 100% right. ... looksy looksy ... Hmm, maybe I trace your path how you found this :) When trying to use

Re: [Tinycc-devel] [PATCH] deprecating VT_REF

2015-02-21 Thread Michael Matz
Hi, On Sat, 21 Feb 2015, Edmund Grimley Evans wrote: Michael Matz matz@frakked.de: I don't like this. tccgen.c should become _less_ dependend on the TARGET defines, not more. Hence either VT_REF has a purpose and it might make sense to use it in more backends, or it hasn't and should

Re: [Tinycc-devel] [PATCH] When handling '.' operator, cope with VT_LLOCAL

2015-02-21 Thread Michael Matz
Hi, On Sun, 22 Feb 2015, Edmund Grimley Evans wrote: The only disadvantage that I can think of is that certain expressions which would cause GCC to warn that value computed is not used would not get optimised. I think the conversion to rvalue might not actually have to emit code, in which

Re: [Tinycc-devel] [PATCH] deprecating VT_REF

2015-02-21 Thread Michael Matz
Hi, On Fri, 20 Feb 2015, Edmund Grimley Evans wrote: VT_REF is not mentioned in the documentation and seems to be used only for x86_64. Also, it seems to be the same thing as VT_LLOCAL, really. This could be a first step towards removing it altogether. Commit message: Make it explicit

Re: [Tinycc-devel] [PATCH] When handling '.' operator, cope with VT_LLOCAL

2015-02-21 Thread Edmund Grimley Evans
Michael Matz matz@frakked.de: Do you have a testcase? I made the change after something in abitest failed with the arm64 back end, but with a newer version than the one I sent to the list. is: this patches only one place where lvalue_type is called (i.e. where something on the stack is

Re: [Tinycc-devel] [PATCH] deprecating VT_REF

2015-02-21 Thread Edmund Grimley Evans
Michael Matz matz@frakked.de: I don't like this. tccgen.c should become _less_ dependend on the TARGET defines, not more. Hence either VT_REF has a purpose and it might make sense to use it in more backends, or it hasn't and should be removed also from x86_64. I agree, but inserting

Re: [Tinycc-devel] [PATCH] TCC arm64 back end

2015-02-21 Thread Michael Matz
Hi, On Thu, 19 Feb 2015, Edmund Grimley Evans wrote: It's not finished, but a lot of things seem to work, and there's a problem with the linker that perhaps someone could help me with. See README.arm64 for details. That's quite cool. Below is a patch on top of your's (slightly amended to

Re: [Tinycc-devel] [PATCH] use RELA relocations properly for R_DATA_PTR

2015-02-21 Thread Michael Matz
Hello Edmund, On Tue, 17 Feb 2015, Edmund Grimley Evans wrote: With TCC the addend is zero! Apparently TCC is putting the offset is in the data section: readelf -x .data t1.gcc.o 0x readelf -x .data t1.tcc.o 0x 1000

Re: [Tinycc-devel] Some tcc questions

2015-02-21 Thread Michael Matz
Hi, On Thu, 19 Feb 2015, Naper Hamza wrote: Hello , I wanna know if tcc have a global config , where we can change some stuff , if not why not implementing one ?  That's not how compilers traditionally work, it would be a layering violation. What options are active for a compilation is

Re: [Tinycc-devel] Fallout from commit 01c041923474750a236da02561f0f8835

2015-02-21 Thread Michael Matz
Hi, On Fri, 20 Feb 2015, Edmund Grimley Evans wrote: extern void f(void); g() { void (*ptr)(void) = f; ptr(); } Here there will be a GOT slot allocated for 'f'. The initialization of 'ptr' will load from that GOT slot. So even though direct calls to 'f' can (and will be, when 'f' is