Hello,
I'm trying to add a pseudo instruction for my SE mode program, and it
looks like the arguments aren't being passed correctly. I tried to
follow the other functions with the changes I made, but I can't see
what's going wrong. Here are the changes I made to various places in gem5.
In two_byte_opcodes.isa:
0x57: m5reserved3({{
// enqueue
PseudoInst::crisysenqueue(xc->tcBase(), Rdi, Rsi);
}}, IsNonSpeculative);
In pseudo_inst.cc:
void crisysenqueue(ThreadContext *tc, uint64_t addr, uint64_t info)
...
DPRINTF(Crisys, "Queuing address %llx info %llx\n",
(long long unsigned)addr, (long long unsigned)info);
...
m5op.h: void m5_crisysenqueue(uint64_t addr, uint64_t info);
m5ops.h: #define crisysenqueue_func 0x57
m5op_x86.S: TWO_BYTE_OP(m5_crisysenqueue, crisysenqueue_func)
And this is an excerpt from my test program:
for (i = 0; i < 1000; i++) {
m5_crisysenqueue(i, i);
}
Which was compiled with: gcc -o enqueue -I util/m5 enqueue.c
util/m5/m5op_x86.S -static
However, when I turn debug output on, it always shows
18609000: global: Queuing address 80496c0 info 0
The same address and info, regardless of the parameters I pass to the
function.
Am I missing some instruction addressing mode issue? Is there another
file I need to modify that I missed?
Thanks,
David
--
David Gloe
gloex...@umn.edu da...@cs.umn.edu dcg...@gmail.com
Masters Student, Computer Science
University of Minnesota
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users