mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 18:18:26 +02:00
Fix generation of i8086 CPU code, as BTR/BTS instructions require at least 386 CPU
This commit is contained in:
parent
ac150e58c8
commit
9056ab8025
@ -52,6 +52,9 @@ implementation
|
||||
globals,systems,
|
||||
aasmbase,
|
||||
cgutils,
|
||||
{$ifdef I8086}
|
||||
cpuinfo,
|
||||
{$endif I8086}
|
||||
cpubase,aasmcpu;
|
||||
|
||||
{ thlcgx86 }
|
||||
@ -104,7 +107,13 @@ implementation
|
||||
const
|
||||
bit_set_clr_instr: array[boolean] of tasmop = (A_BTR,A_BTS);
|
||||
begin
|
||||
list.concat(taicpu.op_reg_reg(bit_set_clr_instr[doset],S_NO,bitnumber,dest));
|
||||
{$ifdef I8086}
|
||||
{ BTR/BTS is only supportd by 80386 CPU or later }
|
||||
if current_settings.cputype < cpu_386 then
|
||||
inherited
|
||||
else
|
||||
{$endif I8086}
|
||||
list.concat(taicpu.op_reg_reg(bit_set_clr_instr[doset],S_NO,bitnumber,dest));
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user