mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 21:09:07 +02:00
* don't write size suffix for popcnt on Darwin, its assembler doesn't
support it (fixes webtbs/tw13186) git-svn-id: trunk@21412 -
This commit is contained in:
parent
7bdbb3448e
commit
5dc75a92a3
@ -51,6 +51,8 @@ interface
|
|||||||
procedure WriteReference(var ref : treference);
|
procedure WriteReference(var ref : treference);
|
||||||
procedure WriteOper(const o:toper);
|
procedure WriteOper(const o:toper);
|
||||||
procedure WriteOper_jmp(const o:toper);
|
procedure WriteOper_jmp(const o:toper);
|
||||||
|
protected
|
||||||
|
fskipPopcountSuffix: boolean;
|
||||||
public
|
public
|
||||||
procedure WriteInstruction(hp: tai);override;
|
procedure WriteInstruction(hp: tai);override;
|
||||||
end;
|
end;
|
||||||
@ -86,6 +88,8 @@ interface
|
|||||||
begin
|
begin
|
||||||
inherited create(smart);
|
inherited create(smart);
|
||||||
InstrWriter := Tx86InstrWriter.create(self);
|
InstrWriter := Tx86InstrWriter.create(self);
|
||||||
|
{ Apple's assembler does not support a size suffix for popcount }
|
||||||
|
Tx86InstrWriter(InstrWriter).fskipPopcountSuffix := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -287,6 +291,8 @@ interface
|
|||||||
(op<>A_FNSTCW) and
|
(op<>A_FNSTCW) and
|
||||||
(op<>A_FSTCW) and
|
(op<>A_FSTCW) and
|
||||||
(op<>A_FLDCW) and
|
(op<>A_FLDCW) and
|
||||||
|
(not fskipPopcountSuffix or
|
||||||
|
(op<>A_POPCNT)) and
|
||||||
not(
|
not(
|
||||||
(taicpu(hp).ops<>0) and
|
(taicpu(hp).ops<>0) and
|
||||||
(taicpu(hp).oper[0]^.typ=top_reg) and
|
(taicpu(hp).oper[0]^.typ=top_reg) and
|
||||||
|
Loading…
Reference in New Issue
Block a user