From: CH Gowri Kumar <gkumar@csa.iisc.ernet.in>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] run time code generation for IA-64
Date: Mon, 26 May 2003 10:49:30 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723706033@msgid-missing> (raw)
[-- 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 --]
next reply other threads:[~2003-05-26 10:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 10:49 CH Gowri Kumar [this message]
2003-05-27 18:17 ` [Linux-ia64] run time code generation for IA-64 David Mosberger
2003-05-27 18:42 ` David Mosberger
2003-05-27 18:56 ` David Mosberger
2003-05-27 18:59 ` CH Gowri Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590723706033@msgid-missing \
--to=gkumar@csa.iisc.ernet.in \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.