From 683de5ada206cc142cee8716aedb99de41067239 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 23 May 2007 14:05:27 +0000 Subject: [PATCH] * don't destroy source register when performing division of signed number by constant power of two git-svn-id: trunk@7431 - --- compiler/sparc/ncpumat.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/sparc/ncpumat.pas b/compiler/sparc/ncpumat.pas index 3fcaeaee7c..1ef36f8162 100644 --- a/compiler/sparc/ncpumat.pas +++ b/compiler/sparc/ncpumat.pas @@ -107,8 +107,8 @@ implementation { if signed, tmpreg=right value-1, otherwise 0 } cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_AND,OS_INT,tordconstnode(right).value-1,tmpreg); { add to the left value } - cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_ADD,OS_INT,tmpreg,numerator); - cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SAR,OS_INT,aword(power),numerator,resultreg); + cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_ADD,OS_INT,numerator,tmpreg); + cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SAR,OS_INT,aword(power),tmpreg,resultreg); end else cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SHR,OS_INT,aword(power),numerator,resultreg);