mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 20:44:37 +03:00
[Doc] Added CONTRIBUTING.md and issue templates; updated docs
This commit is contained in:
42
.github/ISSUE_TEMPLATE/01_bug_report.yml
vendored
Normal file
42
.github/ISSUE_TEMPLATE/01_bug_report.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: File a bug report
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before you hit the submit button:
|
||||||
|
* Please see our [Contribution Guidelines](https://github.com/asmjit/asmjit/blob/master/CONTRIBUTING.md).
|
||||||
|
* Make sure that you use a recent AsmJit (master branch) before filing a bug report.
|
||||||
|
* Make sure that you use logging and error handling features to collect as much information as possible, if applicable.
|
||||||
|
- type: textarea
|
||||||
|
id: issue-description
|
||||||
|
attributes:
|
||||||
|
label: Issue Description
|
||||||
|
description: Please share a clear and concise description of the issue and optionally provide reproducibility information and output from AsmJit's logger.
|
||||||
|
placeholder: Description
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: operating-system
|
||||||
|
attributes:
|
||||||
|
label: Operating System
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Not specified / possibly all
|
||||||
|
- Windows
|
||||||
|
- Linux
|
||||||
|
- Mac
|
||||||
|
- Android
|
||||||
|
- Other
|
||||||
|
- type: dropdown
|
||||||
|
id: target-architecture
|
||||||
|
attributes:
|
||||||
|
label: Architecture
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Not specified
|
||||||
|
- X86 / X86_64
|
||||||
|
- AArch32
|
||||||
|
- AArch64
|
||||||
|
- RISC-V
|
||||||
|
- Other
|
||||||
18
.github/ISSUE_TEMPLATE/02_feature_request.yml
vendored
Normal file
18
.github/ISSUE_TEMPLATE/02_feature_request.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Feature Request
|
||||||
|
description: Request a new feature or enhancement
|
||||||
|
labels: [enhancement]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before you hit the submit button:
|
||||||
|
* Please see our [Contribution Guidelines](https://github.com/asmjit/asmjit/blob/master/CONTRIBUTING.md).
|
||||||
|
* Make sure that you use a recent AsmJit (master branch) before filing a feature request.
|
||||||
|
- type: textarea
|
||||||
|
id: issue-description
|
||||||
|
attributes:
|
||||||
|
label: Issue Description
|
||||||
|
description: Please share a clear and concise description of a new feature or enhancement.
|
||||||
|
placeholder: Description
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
18
.github/ISSUE_TEMPLATE/03_help_question.yml
vendored
Normal file
18
.github/ISSUE_TEMPLATE/03_help_question.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Help & Questions
|
||||||
|
description: Ask a question or get help
|
||||||
|
labels: [question]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before you hit the submit button:
|
||||||
|
* Please see our [Contribution Guidelines](https://github.com/asmjit/asmjit/blob/master/CONTRIBUTING.md).
|
||||||
|
* [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) is usually faster to get answers.
|
||||||
|
* If you need a help, please include as much information as possible to make it clear what the intend is.
|
||||||
|
- type: textarea
|
||||||
|
id: issue-description
|
||||||
|
attributes:
|
||||||
|
label: Details
|
||||||
|
description: The description of the problem or question.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
11
.github/ISSUE_TEMPLATE/99_other_issues.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/99_other_issues.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: Other Issues
|
||||||
|
description: Something that doesn't fit the other categories
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
id: issue-description
|
||||||
|
attributes:
|
||||||
|
label: Issue Description
|
||||||
|
description: Please share a clear and concise description of the issue.
|
||||||
|
placeholder: Description
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
100
CONTRIBUTING.md
Normal file
100
CONTRIBUTING.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
## How to Contribute to AsmJit
|
||||||
|
|
||||||
|
### Did you find a bug or something isn't working as expected?
|
||||||
|
|
||||||
|
* Please use [Issues](https://github.com/asmjit/asmjit/issues) page to report bugs or create a [pull request](https://github.com/asmjit/asmjit/pulls) if you have already fixed it.
|
||||||
|
|
||||||
|
* Make sure that when a bug is reported it provides as much information as possible to make it easy to either reproduce it locally or to at least guess where the problem could be. AsmJit is a low-level tool, which makes it very easy to emit code that would crash or not work as intended. Always use AsmJit's [Logging](https://asmjit.com/doc/group__asmjit__logging.html) and [Error Handling](https://asmjit.com/doc/group__asmjit__error__handling.html) features first to analyze whether there is not a simple to catch bug in your own code.
|
||||||
|
|
||||||
|
* Don't be afraid to ask for help if you don't know how to solve a particular problem or in case it's unclear how to do it. The community would help if the problem is well described and has a solution. In general we always try to at least improve the documentation in case it doesn't provide enough information and users must ask for help.
|
||||||
|
|
||||||
|
### Asking questions
|
||||||
|
|
||||||
|
* We prefer GitHub issues to be used for reporting bugs or feature requests, but it's still okay to do that. Consider joining our [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) to ask questions; it has an active community that can quickly.
|
||||||
|
|
||||||
|
### Suggesting feature requests
|
||||||
|
|
||||||
|
* It's very likely that when using AsmJit you have found something that AsmJit doesn't provide and it would be handy to have it built-in. The [Issues](https://github.com/asmjit/asmjit/issues) page can be used to submit feature requests, but please keep in mind that AsmJit is a relatively small project and not all requested features will be accepted, especially if they are non-trivial, time consuming to implement, or the scope of the feature doesn't match AsmJit goals.
|
||||||
|
|
||||||
|
* If you have already implemented the feature you are suggesting, please open a [pull request](https://github.com/asmjit/asmjit/pulls).
|
||||||
|
|
||||||
|
* Ports (requesting new AsmJit backends) can be reported as feature requests, but only by people that are willing to work on them as creating new ports takes a lot of time.
|
||||||
|
|
||||||
|
### Suggesting a documentation enhancement
|
||||||
|
|
||||||
|
* [AsmJit's documentation](https://asmjit.com/doc/index.html) is auto-generated from source code, so if you would like to improve it just open a [pull request](https://github.com/asmjit/asmjit/pulls) with your changes. The documentation uses [Doxygen](https://www.doxygen.nl/) as a front-end, so please use `\ref`, etc... to create links in documentation when necessary.
|
||||||
|
|
||||||
|
### Suggesting a website content enhancement
|
||||||
|
|
||||||
|
* [AsmJit's website](https://asmjit.com) is also generated, but not from public sources at the moment. If you did find an issue on the website you can either use contact on the [support page](https://asmjit.com/support.html) or just discuss the change in our [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im). Alternatively, opening a regular issue is also okay.
|
||||||
|
|
||||||
|
|
||||||
|
## Coding Style & Consistency
|
||||||
|
|
||||||
|
* If you decide to open a pull request, make sure that the code you submit uses the same convention as the rest of the code. We prefer keeping the code consistent.
|
||||||
|
|
||||||
|
* [.editorconfig](./.editorconfig) should help with basic settings.
|
||||||
|
|
||||||
|
* Initially, AsmJit coding style was based on Google C++ Style Guide, but it has diverged from it.
|
||||||
|
|
||||||
|
* Include guards use `<PATH_TO_SRC>_H_INCLUDED` format.
|
||||||
|
|
||||||
|
* `asmjit` namespace must be open by `ASMJIT_BEGIN_NAMESPACE` and closed by `ASMJIT_END_NAMESPACE`
|
||||||
|
|
||||||
|
* `asmjit::xxx` (backend specific) nested namespace must be open by `ASMJIT_BEGIN_SUB_NAMESPACE(xxx)` and closed by `ASMJIT_END_SUB_NAMESPACE`.
|
||||||
|
|
||||||
|
* Opening bracket is on the same line, like `struct Something {`, `if (condition) {`, etc...
|
||||||
|
|
||||||
|
* The code uses a soft limit of 120 characters per line (including documentation), but it's not enforced and it's okay to use more when it makes sense (for example defining tables, etc...).
|
||||||
|
|
||||||
|
* Since AsmJit doesn't use Exceptions nor RTTI the code cannot use containers provided by the C++ standard library as they use exception handling by design. In general, we try to only use a bare minimum from the C++ standard library to make it viable to use AsmJit even in C code bases where JIT complier is implemented in C++ ([Erlang](https://www.erlang.org/) can be seen as a great example).
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
* AsmJit uses a minimalist unit testing framework to write unit tests to avoid third-party dependencies.
|
||||||
|
|
||||||
|
* At the moment tests are in the same file as the implementation and are only compiled when `ASMJIT_TEST` macro is defined.
|
||||||
|
|
||||||
|
* Use `-DASMJIT_TEST=1` when invoking [CMake](https://cmake.org/) to compile AsmJit tests.
|
||||||
|
|
||||||
|
* Unit tests are compiled to a single `asmjit_test_unit[.exe]` executable.
|
||||||
|
|
||||||
|
* Other tests have their own executables based on what is tested.
|
||||||
|
|
||||||
|
* Always add assembler tests when adding new instructions, see [asmjit_test_assembler_x64.cpp](./test/asmjit_test_assembler_x64.cpp) and [asmjit_test_assembler_a64.cpp](./test/asmjit_test_assembler_a64.cpp) for more details.
|
||||||
|
|
||||||
|
## Pull Request Messages
|
||||||
|
|
||||||
|
* If a change fixes a bug the message should should start with `[bug]`.
|
||||||
|
|
||||||
|
* If a change fixes or enhances documentation it should start with `[doc]`.
|
||||||
|
|
||||||
|
* If a change fixes or enhances our CI it should start with `[ci]`.
|
||||||
|
|
||||||
|
* If a change breaks ABI it must start with `[abi]`.
|
||||||
|
|
||||||
|
* Otherwise there is no suggested prefix.
|
||||||
|
|
||||||
|
## ABI Changes
|
||||||
|
|
||||||
|
* ABI changes happen, but they are usually accumulated and committed within a short time window to not break it often. In general we prefer to break ABI once a year, or once 6 months if there is something that has a high priority. There are no hard rules though.
|
||||||
|
|
||||||
|
* AsmJit uses an `inline namespace`, which should make it impossible to link to AsmJit library that is ABI incompatible. When ABI break happens AsmJit version and ABI namespace is changed, see [asmjit/core/api-config.h](./src/asmjit/core/api-config.h) for more details.
|
||||||
|
|
||||||
|
* What is an ABI break?
|
||||||
|
|
||||||
|
* Modifying a public struct/class in a way that its functionality is altered and/or its size is changed
|
||||||
|
|
||||||
|
* Adding/removing virtual functions to/from classes, respectively
|
||||||
|
|
||||||
|
* Changing a signature of a public function or a class member function.
|
||||||
|
|
||||||
|
* Changing the value of an enum or global constant (for example instructions are now sorted by name, so adding a new instruction is an ABI break)
|
||||||
|
|
||||||
|
* Possibly more, but these were the most common...
|
||||||
|
|
||||||
|
* What is not ABI break?
|
||||||
|
|
||||||
|
* Extending the functionality by using reserved members of a struct/class
|
||||||
|
|
||||||
|
* Changing anything that is internal and that doesn't leak to public headers
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2008-2020 The AsmJit Authors
|
Copyright (c) 2008-2024 The AsmJit Authors
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
44
README.md
44
README.md
@@ -5,7 +5,7 @@ AsmJit is a lightweight library for machine code generation written in C++ langu
|
|||||||
|
|
||||||
* [Official Home Page (asmjit.com)](https://asmjit.com)
|
* [Official Home Page (asmjit.com)](https://asmjit.com)
|
||||||
* [Official Repository (asmjit/asmjit)](https://github.com/asmjit/asmjit)
|
* [Official Repository (asmjit/asmjit)](https://github.com/asmjit/asmjit)
|
||||||
* [Public Chat Channel](https://gitter.im/asmjit/asmjit)
|
* [Public Chat Channel](https://app.gitter.im/#/room/#asmjit:gitter.im)
|
||||||
* [Zlib License](./LICENSE.md)
|
* [Zlib License](./LICENSE.md)
|
||||||
|
|
||||||
See [asmjit.com](https://asmjit.com) page for more details, examples, and documentation.
|
See [asmjit.com](https://asmjit.com) page for more details, examples, and documentation.
|
||||||
@@ -16,38 +16,42 @@ Documentation
|
|||||||
* [Documentation Index](https://asmjit.com/doc/index.html)
|
* [Documentation Index](https://asmjit.com/doc/index.html)
|
||||||
* [Build Instructions](https://asmjit.com/doc/group__asmjit__build.html)
|
* [Build Instructions](https://asmjit.com/doc/group__asmjit__build.html)
|
||||||
|
|
||||||
|
Contributing
|
||||||
|
------------
|
||||||
|
|
||||||
|
* See [CONTRIBUTING](./CONTRIBUTING.md) page for more details
|
||||||
|
|
||||||
Breaking Changes
|
Breaking Changes
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
Breaking the API is sometimes inevitable, what to do?
|
Breaking the API is sometimes inevitable, what to do?
|
||||||
|
|
||||||
* See [Breaking Changes Guide](https://asmjit.com/doc/group__asmjit__breaking__changes.html), which is now part of AsmJit documentation.
|
* See [Breaking Changes Guide](https://asmjit.com/doc/group__asmjit__breaking__changes.html), which is now part of AsmJit documentation
|
||||||
* See asmjit tests, they always compile and provide implementation of many use-cases:
|
* See asmjit tests, they always compile and provide implementation of many use-cases:
|
||||||
* [asmjit_test_emitters.cpp](./test/asmjit_test_emitters.cpp) - Tests that demonstrate the purpose of emitters.
|
* [asmjit_test_emitters.cpp](./test/asmjit_test_emitters.cpp) - Tests that demonstrate the purpose of emitters
|
||||||
* [asmjit_test_assembler_x86.cpp](./test/asmjit_test_assembler_x86.cpp) - Tests targeting AsmJit's Assembler (x86/x64).
|
* [asmjit_test_assembler_x86.cpp](./test/asmjit_test_assembler_x86.cpp) - Tests targeting AsmJit's Assembler (x86/x64)
|
||||||
* [asmjit_test_compiler_x86.cpp](./test/asmjit_test_compiler_x86.cpp) - Tests targeting AsmJit's Compiler (x86/x64).
|
* [asmjit_test_compiler_x86.cpp](./test/asmjit_test_compiler_x86.cpp) - Tests targeting AsmJit's Compiler (x86/x64)
|
||||||
* [asmjit_test_instinfo.cpp](./test/asmjit_test_instinfo.cpp) - Tests that query instruction information.
|
* [asmjit_test_instinfo.cpp](./test/asmjit_test_instinfo.cpp) - Tests that query instruction information
|
||||||
* [asmjit_test_x86_sections.cpp](./test/asmjit_test_x86_sections.cpp) - Multiple sections test.
|
* [asmjit_test_x86_sections.cpp](./test/asmjit_test_x86_sections.cpp) - Multiple sections test.
|
||||||
* Visit our [Official Chat](https://gitter.im/asmjit/asmjit) if you need a quick help.
|
* Visit our [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) if you need a quick help
|
||||||
|
|
||||||
Project Organization
|
Project Organization
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
* **`/`** - Project root.
|
* **`/`** - Project root
|
||||||
* **src** - Source code.
|
* **src** - Source code
|
||||||
* **asmjit** - Source code and headers (always point include path in here).
|
* **asmjit** - Source code and headers (always point include path in here)
|
||||||
* **core** - Core API, backend independent except relocations.
|
* **core** - Core API, backend independent except relocations
|
||||||
* **arm** - ARM specific API, used only by ARM and AArch64 backends.
|
* **arm** - ARM specific API, used only by ARM and AArch64 backends
|
||||||
* **x86** - X86 specific API, used only by X86 and X64 backends.
|
* **x86** - X86 specific API, used only by X86 and X64 backends
|
||||||
* **test** - Unit and integration tests (don't embed in your project).
|
* **test** - Unit and integration tests (don't embed in your project)
|
||||||
* **tools** - Tools used for configuring, documenting, and generating files.
|
* **tools** - Tools used for configuring, documenting, and generating files
|
||||||
|
|
||||||
TODO
|
Ports
|
||||||
----
|
-----
|
||||||
|
|
||||||
* [ ] Ports:
|
* [ ] 32-bit ARM/Thumb port (work in progress)
|
||||||
* [ ] 32-bit ARM/Thumb port.
|
* [ ] RISC-V port (not in progress, help welcome)
|
||||||
* [ ] RISC-V port.
|
|
||||||
|
|
||||||
Support
|
Support
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// SPDX-License-Identifier: Zlib
|
// SPDX-License-Identifier: Zlib
|
||||||
// Official GitHub Repository: https://github.com/asmjit/asmjit
|
// Official GitHub Repository: https://github.com/asmjit/asmjit
|
||||||
//
|
//
|
||||||
// Copyright (c) 2008-2021 The AsmJit Authors
|
// Copyright (c) 2008-2024 The AsmJit Authors
|
||||||
//
|
//
|
||||||
// This software is provided 'as-is', without any express or implied
|
// This software is provided 'as-is', without any express or implied
|
||||||
// warranty. In no event will the authors be held liable for any damages
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ namespace asmjit {
|
|||||||
//!
|
//!
|
||||||
//! Useful tips before you start:
|
//! Useful tips before you start:
|
||||||
//!
|
//!
|
||||||
//! - Visit our [Public Gitter Channel](https://gitter.im/asmjit/asmjit) if you need a quick help.
|
//! - Visit our [Public Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) if you need a quick help.
|
||||||
//!
|
//!
|
||||||
//! - Build AsmJit with `ASMJIT_NO_DEPRECATED` macro defined to make sure that you are not using deprecated
|
//! - Build AsmJit with `ASMJIT_NO_DEPRECATED` macro defined to make sure that you are not using deprecated
|
||||||
//! functionality at all. Deprecated functions are decorated with `ASMJIT_DEPRECATED()` macro, but sometimes
|
//! functionality at all. Deprecated functions are decorated with `ASMJIT_DEPRECATED()` macro, but sometimes
|
||||||
|
|||||||
Reference in New Issue
Block a user