mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
engine: add __restrict__ compiler attribute
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
@@ -67,6 +67,26 @@
|
||||
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* BAL_RESTRICT:
|
||||
* Tells the compiler that a pointer does not alias any other pointer in
|
||||
* current scope.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
|
||||
#define BAL_RESTRICT __restrict__
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
|
||||
#define BAL_RESTRICT __restrict
|
||||
|
||||
#else
|
||||
|
||||
#define BAL_RESTRICT
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* BALLISTIC_ATTRIBUTES_H */
|
||||
|
||||
/*** end of file ***/
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bal_instruction_t *instructions;
|
||||
bal_bit_width_t *ssa_bit_widths;
|
||||
bal_source_variable_t *source_variables;
|
||||
bal_instruction_t *BAL_RESTRICT instructions;
|
||||
bal_bit_width_t *BAL_RESTRICT ssa_bit_widths;
|
||||
bal_source_variable_t *BAL_RESTRICT source_variables;
|
||||
size_t instruction_count;
|
||||
} bal_translation_context_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user