[GHC] #1052: NCG doesn't realise shift instructions trash
shifted input?
GHC
trac at galois.com
Fri Dec 15 04:47:43 EST 2006
#1052: NCG doesn't realise shift instructions trash shifted input?
----------------------------+-----------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.8
Component: Compiler (NCG) | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: arith011 | Architecture: x86_64 (amd64)
Os: Linux |
----------------------------+-----------------------------------------------
Comment (by simonmar):
I think I see the bug:
{{{
shift_code rep instr x y{-amount-} = do
(x_reg, x_code) <- getNonClobberedReg x
y_code <- getAnyReg y
let
code = x_code `appOL`
y_code ecx `snocOL`
instr (OpReg ecx) (OpReg x_reg)
-- in
return (Fixed rep x_reg code)
}}}
If getNonClobberedReg returns a Fixed reg, this code generates a shift
instruction that modifies the Fixed reg, which is wrong.
However, I can't reproduce the bug locally, arith011 isn't failing in our
nightly builds. Any idea why that might be?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1052>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list