public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] run time code generation for IA-64
@ 2003-05-26 10:49 CH Gowri Kumar
  2003-05-27 18:17 ` David Mosberger
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: CH Gowri Kumar @ 2003-05-26 10:49 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1449 bytes --]

Hi all,
I have been writing macros for the runtime code generation for IA-64.
You can find the files in the attachment (ia64.tar.gz).

I am facing a serious problem while calling the functions from the 
runtime generated code. I am able to execute the function but while 
returning it is dumping core. I couldn't figure out what is the mistake I 
am doing.

This is what I am doing to generate a call statement:
I have a function named "Test_Function" which I am trying to call from the 
generated code. For that I am doing this:

IA64_FUNCTION* fp;
fp = (IA64_FUNCTION*)Test_Function;
target = fp->addr;

Generate code such that this target address is moved into register R15
and then to a branch register b6 and generate a call statment as:
br.call.sptk.many b0 =b6.

Also, I am storing the GP,RP etc. in R4,R5 (as they are preserved across
function calls).

The IA64_dumpcode function dumps the code which have generated at runtime 
and seems to be work properly.

Can anyone explain what is the mistake I am doing and the remedy?


The attachment contains all the relavent files:

bash$ make
gcc ia64_codegen.c test_call.c
bash$ ./a.out
.......

Thanks in advance.

Regards,
Gowri Kumar

PS: This being the first version, I haven't done anything towards 
exploiting parallelism. So, each instruction will effectively make a 
bundle with the other two slots as nops. Once I am assured of the 
correctness of macros, I will go for the scheduling.

[-- Attachment #2: Type: APPLICATION/x-gzip, Size: 18564 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-27 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-26 10:49 [Linux-ia64] run time code generation for IA-64 CH Gowri Kumar
2003-05-27 18:17 ` David Mosberger
2003-05-27 18:42 ` David Mosberger
2003-05-27 18:56 ` David Mosberger
2003-05-27 18:59 ` CH Gowri Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox