x86: Define a local ABI for system calls.
These ABIs (one 32 bit and one 64 bit) take advantage of the GenericSyscallABI and X86Linux::SyscallABI partial ABIs set up earlier. This removes x86's dependence on the getSyscallArg and setSyscallReturn Process methods. Change-Id: Ia07834cea1afa827d77e590af5397e2a1e0e2099 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23443 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -65,9 +65,7 @@ class X86Linux : public Linux
|
||||
ctc->setIntReg(X86ISA::StackPointerReg, stack);
|
||||
}
|
||||
|
||||
class SyscallABI
|
||||
{
|
||||
};
|
||||
class SyscallABI {};
|
||||
};
|
||||
|
||||
namespace GuestABI
|
||||
@@ -81,7 +79,10 @@ struct Result<ABI, SyscallReturn,
|
||||
static void
|
||||
store(ThreadContext *tc, const SyscallReturn &ret)
|
||||
{
|
||||
tc->setIntReg(ABI::ReturnValueReg, ret.encodedValue());
|
||||
if (ret.suppressed() || ret.needsRetry())
|
||||
return;
|
||||
|
||||
tc->setIntReg(X86ISA::INTREG_RAX, ret.encodedValue());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user