diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-23 11:23:27 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-23 11:23:27 +0000 |
| commit | 493bc653b5762514dac8c8941d6564ccf5bb8528 (patch) | |
| tree | df03d4119aa12d4edc3ddd92853d1084f259ac9e /src/check_decl.cpp | |
| parent | 3d209798c9aff4a0ebd135536234022620c9e650 (diff) | |
Add `@(no_red_zone)` for procedures
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 45d741532..6f8caff98 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -826,6 +826,14 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) { } e->Procedure.optimization_mode = cast(ProcedureOptimizationMode)ac.optimization_mode; + if (ac.no_red_zone) { + if (!is_arch_wasm()) { + e->Procedure.no_red_zone = true; + } else { + error(e->token, "@(no_red_zone) is not supported on this target architecture"); + } + } + if (ac.objc_name.len || ac.objc_is_class_method || ac.objc_type) { if (ac.objc_name.len == 0 && ac.objc_is_class_method) { error(e->token, "@(objc_name) is required with @(objc_is_class_method)"); |