On Sun, Jul 22, 2012 at 8:28 AM, Ali Saidi <[email protected]> wrote:
>
> On Jul 21, 2012, at 11:51 AM, Steve Reinhardt wrote:
>
> > The big question here is whether anyone knows of any other syscalls or
> > architectures that might need this more powerful stack handling scheme;
> if
> > so, we should probably go with the first approach. If not, I'm open to
> the
> > second approach. If someone feels like the current scheme is good
> enough,
> > or there's a third approach I haven't considered, please speak up. I'd
> > like to get some initial consensus here before I go ripping things up.
>
> For ARM we certainly need to be able to do the 64 bit alignment (64 bit
> args are passed starting in even registers only). So a prototype (badly
> constructed imho) foo(uint32_t a1, uint64 a2) needs to get arg1 from r0 and
> a2 from r2:r3. There seem to be a couple of these case in ARM.
>
Thanks for info, Ali. Are these syscalls that are currently unsupported,
or did I miss them somewhere?
It's still not clear to me whether we want to beef up the current "magic"
approach to make it cleaner magic, or fall back to the original dirt simple
method and handle these things manually. For example, I'll use
ftruncate64, which (along with truncate64) is the only place the current
magic is used. The signature looks like your example:
int ftruncate(int fd, off_t length);
so if we go back to the simple technique, I could see doing something like
this internally:
int doTruncate64(int fd, uint64_t length) { ... actual truncate call... }
int truncate64Func_64(...)
{
int fd = p->getSyscallArg(tc, 0);
uint64_t length = p->getSyscallArg(tc, 1);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev