diff --git a/compiler/x86/hlcgx86.pas b/compiler/x86/hlcgx86.pas index 92525af185..04ffc1aeb3 100644 --- a/compiler/x86/hlcgx86.pas +++ b/compiler/x86/hlcgx86.pas @@ -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;