2016-09-28 14:42:24 +00:00
|
|
|
From ff48b3e3fd90e0328921f5e86460aba3ff217002 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Peter Trommler <ptrommler@acm.org>
|
|
|
|
Date: Mon, 25 Jan 2016 20:32:44 +0100
|
|
|
|
Subject: [PATCH] PPC/CodeGen: fix lwa instruction generation
|
|
|
|
|
|
|
|
---
|
|
|
|
compiler/nativeGen/PPC/CodeGen.hs | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
2017-02-22 20:36:57 +00:00
|
|
|
Index: ghc-8.0.2/compiler/nativeGen/PPC/CodeGen.hs
|
2016-09-28 14:42:24 +00:00
|
|
|
===================================================================
|
2017-02-22 20:36:57 +00:00
|
|
|
--- ghc-8.0.2.orig/compiler/nativeGen/PPC/CodeGen.hs
|
|
|
|
+++ ghc-8.0.2/compiler/nativeGen/PPC/CodeGen.hs
|
|
|
|
@@ -466,7 +466,7 @@ getRegister' _ (CmmMachOp (MO_SS_Conv W1
|
|
|
|
return (Any II64 (\dst -> addr_code `snocOL` LA II16 dst addr))
|
2016-09-28 14:42:24 +00:00
|
|
|
|
2017-02-22 20:36:57 +00:00
|
|
|
getRegister' _ (CmmMachOp (MO_UU_Conv W32 W64) [CmmLoad mem _]) = do
|
2016-09-28 14:42:24 +00:00
|
|
|
- Amode addr addr_code <- getAmode D mem
|
|
|
|
+ Amode addr addr_code <- getAmode DS mem -- lwa is DS-form
|
2017-02-22 20:36:57 +00:00
|
|
|
return (Any II64 (\dst -> addr_code `snocOL` LD II32 dst addr))
|
2016-09-28 14:42:24 +00:00
|
|
|
|
2017-02-22 20:36:57 +00:00
|
|
|
getRegister' _ (CmmMachOp (MO_SS_Conv W32 W64) [CmmLoad mem _]) = do
|