mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 01:08:36 +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,
|
globals,systems,
|
||||||
aasmbase,
|
aasmbase,
|
||||||
cgutils,
|
cgutils,
|
||||||
|
{$ifdef I8086}
|
||||||
|
cpuinfo,
|
||||||
|
{$endif I8086}
|
||||||
cpubase,aasmcpu;
|
cpubase,aasmcpu;
|
||||||
|
|
||||||
{ thlcgx86 }
|
{ thlcgx86 }
|
||||||
@ -104,6 +107,12 @@ implementation
|
|||||||
const
|
const
|
||||||
bit_set_clr_instr: array[boolean] of tasmop = (A_BTR,A_BTS);
|
bit_set_clr_instr: array[boolean] of tasmop = (A_BTR,A_BTS);
|
||||||
begin
|
begin
|
||||||
|
{$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));
|
list.concat(taicpu.op_reg_reg(bit_set_clr_instr[doset],S_NO,bitnumber,dest));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user