[GHC] #9346: AtomicPrimOps tests failing on 32-bit x86
GHC
ghc-devs at haskell.org
Tue Jul 22 11:35:34 UTC 2014
#9346: AtomicPrimOps tests failing on 32-bit x86
-------------------------------------+-------------------------------------
Reporter: niklasl | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Differential Revisions: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple | Test Case:
Difficulty: Unknown | Blocking:
Blocked By: |
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by tibbe):
The `mov` instruction doesn't support a lock prefix. From: "Intel® 64 and
IA-32 ArchitecturesSoftware Developer’s Manual":
> The LOCK prefix can be prepended only to the following instructions and
only to those forms of the instructions where the destination operand is a
memory operand: ADD, ADC, AND, BTC, BTR, BTS, CMPXCHG, CMPXCH8B, DEC, INC,
NEG, NOT, OR, SBB, SUB, XOR, XADD, and XCHG. If the LOCK prefix is used
with one of these instructions and the source operand is a memory operand,
an undefined opcode exception (#UD) may be generated. An undefined opcode
exception will also be generated if the LOCK prefix is used with any
instruction not in the above list. The XCHG instruction always asserts the
LOCK# signal regardless of the presence or absence of the LOCK prefix
However, I cannot see a place where we're adding one in the x86 codegen:
https://github.com/ghc/ghc/blob/master/compiler/nativeGen/X86/CodeGen.hs
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9346#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list