From 5dc75a92a33a4731052609bd43e39b413b9ac094 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 28 May 2012 14:00:02 +0000 Subject: [PATCH] * don't write size suffix for popcnt on Darwin, its assembler doesn't support it (fixes webtbs/tw13186) git-svn-id: trunk@21412 - --- compiler/x86/agx86att.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/x86/agx86att.pas b/compiler/x86/agx86att.pas index 55b2a949f2..57c48663e6 100644 --- a/compiler/x86/agx86att.pas +++ b/compiler/x86/agx86att.pas @@ -51,6 +51,8 @@ interface procedure WriteReference(var ref : treference); procedure WriteOper(const o:toper); procedure WriteOper_jmp(const o:toper); + protected + fskipPopcountSuffix: boolean; public procedure WriteInstruction(hp: tai);override; end; @@ -86,6 +88,8 @@ interface begin inherited create(smart); InstrWriter := Tx86InstrWriter.create(self); + { Apple's assembler does not support a size suffix for popcount } + Tx86InstrWriter(InstrWriter).fskipPopcountSuffix := true; end; {**************************************************************************** @@ -287,6 +291,8 @@ interface (op<>A_FNSTCW) and (op<>A_FSTCW) and (op<>A_FLDCW) and + (not fskipPopcountSuffix or + (op<>A_POPCNT)) and not( (taicpu(hp).ops<>0) and (taicpu(hp).oper[0]^.typ=top_reg) and