History log of /haiku/src/tools/gensyscalls/gensyscallinfos.cpp
Revision Date Author Comments
# ab3c8bea 05-Apr-2022 David Karoly <karolyd577@gmail.com>

gensyscalls: alignment fixup for ARM

ARM ABI has different alignment requirements based on parameter size:
* parameters not larger than 4 bytes are aligned on 4 bytes
* parameters larger than 4 bytes are aligned on 8 bytes

see:
Procedure Call Standard for the Arm Architecture
sections 5.1, Fundamental Data Types
and 6.5, Parameter Passing

Therefore the following changes are introduced in gensyscalls tool:
* new optional define SYSCALL_LONG_PARAMETER_ALIGNMENT_TYPE is introduced
* it's defined only on ARM
* on other architectures it takes on the value of SYSCALL_PARAMETER_ALIGNMENT_TYPE as a default
* constants kLongParameterAlignmentType and kLongParameterAlignmentSize are introduced
* Syscall::AddParameter uses this value for aligning parameters larger than 4 bytes

Change-Id: I7e766e0ea9d07001643e813722b462b1f044921a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5112
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 1a7208e0 14-Oct-2020 Murai Takashi <tmurai01@gmail.com>

tools/gensyscalls: Fix -Wformat-security

Change-Id: Ib114ca218c103a0642b864a658696a3bab81b9d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3329
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# a63a6eb9 21-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V1022 throwing exceptions by pointer

Change-Id: I0767da0be63a2955cc370ee81dc921cdf101285e
Reviewed-on: https://review.haiku-os.org/c/1638
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 59d6284b 27-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the way the syscall infos are generated. We no longer include the
preprocessed <syscalls.h> header in sources compiled for the build platform.
Instead we're generating macros for the return type and parameter type sizes
via the CreateAsmStructOffsetsHeader rule (no template magic anymore) and
thus get a clear separation of host and target code, resulting in better
portability (although surprisingly enough the build already worked on 64 bit
hosts).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34323 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0dfceb2b 27-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34319 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cbd4dd19 24-Feb-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Added missing headers. Fixes the build on
certain Linux distributions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24109 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ae56893 27-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Reworked the way how the gensyscalls stuff finds out about
the sizes and alignments of syscall parameters. It no longer
generates and compiles functions with the same signature as the
syscalls. This simply doesn't generally work for cross-compilation.
Instead we provide a bit of architecture-specific code that knows
how things work for the target architecture.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ee524c98 10-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

We now also store the names of syscall parameters. This is used for strace. Well, not yet, but it would make a nice extension. :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11338 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 15f030fd 11-Sep-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Now lines starting with "# <number>" are skipped. This should fix problems when using a gcc 3.x preprocessor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8917 a95241bf-73f2-0310-859d-f6bbb57e9c96


# efd87ab8 28-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Had to change the mechanism for automatically generating most of the
boring syscall stuff. It has two phases now: The first one
(gensyscallinfos) parses syscalls.h and generates a source file containing
all the required information. This file is compiled and linked to
gensyscalls, which generates the actual output files.
Added to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8697 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 59d6284b7b7c1d099ff0fb785f9aaf27c13ef54b 27-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the way the syscall infos are generated. We no longer include the
preprocessed <syscalls.h> header in sources compiled for the build platform.
Instead we're generating macros for the return type and parameter type sizes
via the CreateAsmStructOffsetsHeader rule (no template magic anymore) and
thus get a clear separation of host and target code, resulting in better
portability (although surprisingly enough the build already worked on 64 bit
hosts).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34323 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0dfceb2b8af9cd27312407bf35879ae38980a664 27-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34319 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cbd4dd196d0cd91c36b94fe9691356af21247682 24-Feb-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Vasilis Kaoutsis: Added missing headers. Fixes the build on
certain Linux distributions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24109 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ae568931fcac7deb9f1e6ff4e47213fbfe4029b 27-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Reworked the way how the gensyscalls stuff finds out about
the sizes and alignments of syscall parameters. It no longer
generates and compiles functions with the same signature as the
syscalls. This simply doesn't generally work for cross-compilation.
Instead we provide a bit of architecture-specific code that knows
how things work for the target architecture.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ee524c9864087071259c84eae8291fa98dcd614c 10-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

We now also store the names of syscall parameters. This is used for strace. Well, not yet, but it would make a nice extension. :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11338 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 15f030fd168ddc8af7c82f0a41894dcd04723405 11-Sep-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Now lines starting with "# <number>" are skipped. This should fix problems when using a gcc 3.x preprocessor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8917 a95241bf-73f2-0310-859d-f6bbb57e9c96


# efd87ab8df79399cac98d888ab3f36d3f33c34ed 28-Aug-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

Had to change the mechanism for automatically generating most of the
boring syscall stuff. It has two phases now: The first one
(gensyscallinfos) parses syscalls.h and generates a source file containing
all the required information. This file is compiled and linked to
gensyscalls, which generates the actual output files.
Added to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8697 a95241bf-73f2-0310-859d-f6bbb57e9c96