Is it possbile to hack I386 backend to make all function calls to be indirect function calling?

2010-10-25 Thread redriver jiang
Hi, I meet a requirement to make all function calls to be indirect function calling ( for I386 GCC compiler). I am not familiar with frontend, so my first idea is to hack it from backend, change the asm output for call and call_value insn patterns, generate a related varible in data section,

Re: Is it possbile to hack I386 backend to make all function calls to be indirect function calling?

2010-10-25 Thread Andi Kleen
redriver jiang jiang.redri...@gmail.com writes: Hi, I meet a requirement to make all function calls to be indirect function calling ( for I386 GCC compiler). I am not familiar with frontend, so my first idea is For x86-64 using the large code model (-mcmodel=large) will result in all

Re: Is it possbile to hack I386 backend to make all function calls to be indirect function calling?

2010-10-25 Thread Ian Lance Taylor
redriver jiang jiang.redri...@gmail.com writes: I meet a requirement to make all function calls to be indirect function calling ( for I386 GCC compiler). I am not familiar with frontend, so my first idea is to hack it from backend, change the asm output for call and call_value insn

Re: Is it possbile to hack I386 backend to make all function calls to be indirect function calling?

2010-10-25 Thread Jan Hubicka
redriver jiang jiang.redri...@gmail.com writes: I meet a requirement to make all function calls to be indirect function calling ( for I386 GCC compiler). I am not familiar with frontend, so my first idea is to hack it from backend, change the asm output for call and call_value insn