From 085689af600cd6c565cfda52960c80e9963e4d4c Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 23 May 2007 12:03:42 +0000 Subject: [PATCH] + support for unaligned stores * avoid some unnecessary unaligned load sequences git-svn-id: trunk@7427 - --- compiler/sparc/cgcpu.pas | 41 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/compiler/sparc/cgcpu.pas b/compiler/sparc/cgcpu.pas index ef043a8ed5..c846bc3ed7 100644 --- a/compiler/sparc/cgcpu.pas +++ b/compiler/sparc/cgcpu.pas @@ -482,21 +482,29 @@ implementation begin if (TCGSize2Size[fromsize] >= TCGSize2Size[tosize]) then fromsize := tosize; - case fromsize of - { signed integer registers } - OS_8, - OS_S8: - Op:=A_STB; - OS_16, - OS_S16: - Op:=A_STH; - OS_32, - OS_S32: - Op:=A_ST; - else - InternalError(2002122100); - end; - handle_load_store(list,true,op,reg,ref); + if (ref.alignment<>0) and + (ref.alignment= TCGSize2Size[tosize]) then fromsize := tosize; - if Ref.alignment<>0 then + if (ref.alignment<>0) and + (ref.alignment