|
@@ -645,10 +645,20 @@ unit cg64f32;
|
|
|
tmploclo.init;
|
|
|
tmplochi.init;
|
|
|
splitparaloc64(paraloc,tmploclo,tmplochi);
|
|
|
- { Keep this order of first hi before lo to have
|
|
|
- the correct push order for i386 }
|
|
|
- cg.a_load_reg_cgpara(list,OS_32,reg.reghi,tmplochi);
|
|
|
- cg.a_load_reg_cgpara(list,OS_32,reg.reglo,tmploclo);
|
|
|
+ if target_info.endian=endian_big then
|
|
|
+ begin
|
|
|
+ { Keep this order of first lo before hi to have
|
|
|
+ the correct push order for m68k }
|
|
|
+ cg.a_load_reg_cgpara(list,OS_32,reg.reglo,tmploclo);
|
|
|
+ cg.a_load_reg_cgpara(list,OS_32,reg.reghi,tmplochi);
|
|
|
+ end
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ { Keep this order of first hi before lo to have
|
|
|
+ the correct push order for i386 }
|
|
|
+ cg.a_load_reg_cgpara(list,OS_32,reg.reghi,tmplochi);
|
|
|
+ cg.a_load_reg_cgpara(list,OS_32,reg.reglo,tmploclo);
|
|
|
+ end;
|
|
|
tmploclo.done;
|
|
|
tmplochi.done;
|
|
|
end;
|
|
@@ -661,10 +671,20 @@ unit cg64f32;
|
|
|
tmploclo.init;
|
|
|
tmplochi.init;
|
|
|
splitparaloc64(paraloc,tmploclo,tmplochi);
|
|
|
- { Keep this order of first hi before lo to have
|
|
|
- the correct push order for i386 }
|
|
|
- cg.a_load_const_cgpara(list,OS_32,aint(hi(value)),tmplochi);
|
|
|
- cg.a_load_const_cgpara(list,OS_32,aint(lo(value)),tmploclo);
|
|
|
+ if target_info.endian=endian_big then
|
|
|
+ begin
|
|
|
+ { Keep this order of first lo before hi to have
|
|
|
+ the correct push order for m68k }
|
|
|
+ cg.a_load_const_cgpara(list,OS_32,aint(lo(value)),tmploclo);
|
|
|
+ cg.a_load_const_cgpara(list,OS_32,aint(hi(value)),tmplochi);
|
|
|
+ end
|
|
|
+ else
|
|
|
+ begin
|
|
|
+ { Keep this order of first hi before lo to have
|
|
|
+ the correct push order for i386 }
|
|
|
+ cg.a_load_const_cgpara(list,OS_32,aint(hi(value)),tmplochi);
|
|
|
+ cg.a_load_const_cgpara(list,OS_32,aint(lo(value)),tmploclo);
|
|
|
+ end;
|
|
|
tmploclo.done;
|
|
|
tmplochi.done;
|
|
|
end;
|
|
@@ -681,13 +701,21 @@ unit cg64f32;
|
|
|
tmprefhi:=r;
|
|
|
tmpreflo:=r;
|
|
|
if target_info.endian=endian_big then
|
|
|
- inc(tmpreflo.offset,4)
|
|
|
+ begin
|
|
|
+ { Keep this order of first lo before hi to have
|
|
|
+ the correct push order for m68k }
|
|
|
+ inc(tmpreflo.offset,4);
|
|
|
+ cg.a_load_ref_cgpara(list,OS_32,tmpreflo,tmploclo);
|
|
|
+ cg.a_load_ref_cgpara(list,OS_32,tmprefhi,tmplochi);
|
|
|
+ end
|
|
|
else
|
|
|
- inc(tmprefhi.offset,4);
|
|
|
- { Keep this order of first hi before lo to have
|
|
|
- the correct push order for i386 }
|
|
|
- cg.a_load_ref_cgpara(list,OS_32,tmprefhi,tmplochi);
|
|
|
- cg.a_load_ref_cgpara(list,OS_32,tmpreflo,tmploclo);
|
|
|
+ begin
|
|
|
+ { Keep this order of first hi before lo to have
|
|
|
+ the correct push order for i386 }
|
|
|
+ inc(tmprefhi.offset,4);
|
|
|
+ cg.a_load_ref_cgpara(list,OS_32,tmprefhi,tmplochi);
|
|
|
+ cg.a_load_ref_cgpara(list,OS_32,tmpreflo,tmploclo);
|
|
|
+ end;
|
|
|
tmploclo.done;
|
|
|
tmplochi.done;
|
|
|
end;
|