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.