[Libre-soc-bugs] [Bug 982] Support PowerPC ABI in ISACaller
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Sep 22 13:18:39 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=982
--- Comment #71 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #67)
> if not self.is_svp64_mode and asmop == "sc" and
> self.syscall_emulation:
> yield from self.emulate_syscall()
> self.update_pc_next()
> return
this is the preferred method, where emulate_syscall() is
about... 10-15 lines of code covering *every* syscall,
because the mmap'd area is in the exact same memory location as
where the ELF relocation targetted it.
(plus mmap and malloc/free redirect/replacement)
(with an option to specify what that is, on the command-line)
(In reply to Jacob Lifshay from comment #68)
> def emulate_syscall(self):
> syscall_num = self.gpr(0)
> if syscall_num in self.syscall_table:
> yield from self.syscall_table[syscall_num](self)
> else:
> self.cr.crl[0][CRFields.SO] = 1
> self.gpr[3] = ENOSYS
this is the "last resort" method that actually is in some
ways "better", because by literally implementing every single
POSIX (ok ok i know Dmitry, it's not actually POSIX) call
we have no "hacks" - just a hell of a lot of work ahead instead.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list