makesyscalls: add override of ABI change detection
While we can detect most ABI changes through analysis of syscalls.master with suitable annotations, to cases are handled in the core implementation and others have changes that can not be infered. Add two new config variables syscall_abi_change and syscall_no_abi_change which override the detected value. Both are space-seperated lists of syscall names. Reviewed by: kevans
This commit is contained in:
parent
988e8db3c0
commit
64cc9803ab
@ -68,6 +68,10 @@ local config = {
|
||||
abi_semid_t = "semid_t",
|
||||
abi_ptr_array_t = "",
|
||||
ptr_intptr_t_cast = "intptr_t",
|
||||
syscall_abi_change = "",
|
||||
sys_abi_change = {},
|
||||
syscall_no_abi_change = "",
|
||||
sys_no_abi_change = {},
|
||||
obsol = "",
|
||||
obsol_dict = {},
|
||||
unimpl = "",
|
||||
@ -391,6 +395,18 @@ local function process_unimpl()
|
||||
end
|
||||
end
|
||||
|
||||
local function process_syscall_abi_change()
|
||||
local changes_abi = config["syscall_abi_change"]
|
||||
for syscall in changes_abi:gmatch("([^ ]+)") do
|
||||
config["sys_abi_change"][syscall] = true
|
||||
end
|
||||
|
||||
local no_changes = config["syscall_no_abi_change"]
|
||||
for syscall in no_changes:gmatch("([^ ]+)") do
|
||||
config["sys_no_abi_change"][syscall] = true
|
||||
end
|
||||
end
|
||||
|
||||
local function abi_changes(name)
|
||||
if known_abi_flags[name] == nil then
|
||||
abort(1, "abi_changes: unknown flag: " .. name)
|
||||
@ -1197,6 +1213,9 @@ process_syscall_def = function(line)
|
||||
if args ~= nil then
|
||||
funcargs, changes_abi = process_args(args)
|
||||
end
|
||||
if config["sys_no_abi_change"][funcname] then
|
||||
changes_abi = false
|
||||
end
|
||||
local noproto = config["abi_flags"] ~= "" and not changes_abi
|
||||
|
||||
local argprefix = ''
|
||||
@ -1204,12 +1223,19 @@ process_syscall_def = function(line)
|
||||
if abi_changes("pointer_args") then
|
||||
for _, v in ipairs(funcargs) do
|
||||
if isptrtype(v["type"]) then
|
||||
if config["sys_no_abi_change"][funcname] then
|
||||
print("WARNING: " .. funcname ..
|
||||
" in syscall_no_abi_change, but pointers args are present")
|
||||
end
|
||||
changes_abi = true
|
||||
goto ptrfound
|
||||
end
|
||||
end
|
||||
::ptrfound::
|
||||
end
|
||||
if config["sys_abi_change"][funcname] then
|
||||
changes_abi = true
|
||||
end
|
||||
if changes_abi then
|
||||
-- argalias should be:
|
||||
-- COMPAT_PREFIX + ABI Prefix + funcname
|
||||
@ -1311,6 +1337,7 @@ elseif config["capenabled"] ~= "" then
|
||||
end
|
||||
process_compat()
|
||||
process_abi_flags()
|
||||
process_syscall_abi_change()
|
||||
process_obsol()
|
||||
process_unimpl()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user