Use the correct callClobberedRegs on Windows/x64 (#8834)
authorSimon Marlow <marlowsd@gmail.com>
Mon, 24 Mar 2014 14:36:16 +0000 (14:36 +0000)
committerAustin Seipp <austin@well-typed.com>
Thu, 27 Mar 2014 20:59:23 +0000 (15:59 -0500)
Signed-off-by: Austin Seipp <austin@well-typed.com>
compiler/nativeGen/X86/Regs.hs

index b5139c9..127a811 100644 (file)
@@ -403,6 +403,9 @@ callClobberedRegs       :: Platform -> [Reg]
 -- caller-saves registers
 callClobberedRegs platform
  | target32Bit platform = [eax,ecx,edx] ++ map regSingle (floatregnos platform)
+ | platformOS platform == OSMinGW32
+   = [rax,rcx,rdx,r8,r9,r10,r11]
+   ++ map regSingle (floatregnos platform)
  | otherwise
     -- all xmm regs are caller-saves
     -- caller-saves registers