* fail with an internal compiler error in case an atomic WebAssembly instruction

is generated, while WebAssembly multithreading is disabled
This commit is contained in:
Nikolay Nikolov 2024-07-07 14:49:02 +03:00
parent fd74c26707
commit 35701f8fa2

View File

@ -147,6 +147,8 @@ uses
taicpu = class(tai_cpu_abstract_sym)
is_br_generated_by_goto: boolean;
constructor Create(op : tasmop);override;
constructor op_none(op : tasmop);
constructor op_reg(op : tasmop;_op1 : tregister);
@ -1910,6 +1912,14 @@ uses
taicpu Constructors
*****************************************************************************}
constructor taicpu.Create(op: tasmop);
begin
inherited Create(op);
if not (ts_wasm_threads in current_settings.targetswitches) and is_atomic_op(op) then
internalerror(2024070701);
end;
constructor taicpu.op_none(op : tasmop);
begin
inherited create(op);