summaryrefslogtreecommitdiff
path: root/powerpc/Asmgen.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-11-01 16:51:47 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-11-01 16:51:47 +0000
commit3ccc93675292bf9a44ac0d7111d3f44981e1f56d (patch)
tree2879f37d1625e035f21134bc2307fce427531ce4 /powerpc/Asmgen.v
parent033aa0555a209fa3e825b1eeb8a5fc00ff8163e3 (diff)
Preliminary support for small data area in PowerPC port.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1163 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/Asmgen.v')
-rw-r--r--powerpc/Asmgen.v7
1 files changed, 5 insertions, 2 deletions
diff --git a/powerpc/Asmgen.v b/powerpc/Asmgen.v
index 5c37a57..05381ea 100644
--- a/powerpc/Asmgen.v
+++ b/powerpc/Asmgen.v
@@ -395,8 +395,11 @@ Definition transl_load_store
| Aindexed2, a1 :: a2 :: nil =>
mk2 (ireg_of a1) (ireg_of a2) :: k
| Aglobal symb ofs, nil =>
- Paddis GPR12 GPR0 (Csymbol_high symb ofs) ::
- mk1 (Csymbol_low symb ofs) GPR12 :: k
+ if symbol_is_small_data symb ofs then
+ mk1 (Csymbol_sda symb ofs) GPR13 :: k
+ else
+ Paddis GPR12 GPR0 (Csymbol_high symb ofs) ::
+ mk1 (Csymbol_low symb ofs) GPR12 :: k
| Abased symb ofs, a1 :: nil =>
if ireg_eq (ireg_of a1) GPR0 then
Pmr GPR12 (ireg_of a1) ::