mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 00:29:19 +02:00
* Inserted explicit typecasts in order to prevent range check errors at some places where signed and unsigned types are assigned to each other (mostly MIPS-specific, but one was necessary in generic code).
git-svn-id: trunk@28379 -
This commit is contained in:
parent
d368032132
commit
f1d1fd4f24
@ -1236,7 +1236,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if reg in (rg[R_FPUREGISTER].used_in_proc-paramanager.get_volatile_registers_fpu(pocall_stdcall)) then
|
if reg in (rg[R_FPUREGISTER].used_in_proc-paramanager.get_volatile_registers_fpu(pocall_stdcall)) then
|
||||||
begin
|
begin
|
||||||
fmask:=fmask or (1 shl ord(reg));
|
fmask:=fmask or (longword(1) shl ord(reg));
|
||||||
href.offset:=nextoffset;
|
href.offset:=nextoffset;
|
||||||
lastfpuoffset:=nextoffset;
|
lastfpuoffset:=nextoffset;
|
||||||
helplist.concat(taicpu.op_reg_ref(A_SWC1,newreg(R_FPUREGISTER,reg,R_SUBFS),href));
|
helplist.concat(taicpu.op_reg_ref(A_SWC1,newreg(R_FPUREGISTER,reg,R_SUBFS),href));
|
||||||
@ -1266,7 +1266,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if reg in saveregs then
|
if reg in saveregs then
|
||||||
begin
|
begin
|
||||||
mask:=mask or (1 shl ord(reg));
|
mask:=mask or (longword(1) shl ord(reg));
|
||||||
href.offset:=nextoffset;
|
href.offset:=nextoffset;
|
||||||
lastintoffset:=nextoffset;
|
lastintoffset:=nextoffset;
|
||||||
if (reg=RS_FRAME_POINTER_REG) then
|
if (reg=RS_FRAME_POINTER_REG) then
|
||||||
@ -1282,8 +1282,8 @@ begin
|
|||||||
//list.concat(Taicpu.Op_reg_reg_const(A_ADDIU,NR_FRAME_POINTER_REG,NR_STACK_POINTER_REG,current_procinfo.para_stack_size));
|
//list.concat(Taicpu.Op_reg_reg_const(A_ADDIU,NR_FRAME_POINTER_REG,NR_STACK_POINTER_REG,current_procinfo.para_stack_size));
|
||||||
list.concat(Taicpu.op_none(A_P_SET_NOMIPS16));
|
list.concat(Taicpu.op_none(A_P_SET_NOMIPS16));
|
||||||
list.concat(Taicpu.op_reg_const_reg(A_P_FRAME,current_procinfo.framepointer,LocalSize,NR_R31));
|
list.concat(Taicpu.op_reg_const_reg(A_P_FRAME,current_procinfo.framepointer,LocalSize,NR_R31));
|
||||||
list.concat(Taicpu.op_const_const(A_P_MASK,mask,-(LocalSize-lastintoffset)));
|
list.concat(Taicpu.op_const_const(A_P_MASK,aint(mask),-(LocalSize-lastintoffset)));
|
||||||
list.concat(Taicpu.op_const_const(A_P_FMASK,Fmask,-(LocalSize-lastfpuoffset)));
|
list.concat(Taicpu.op_const_const(A_P_FMASK,aint(Fmask),-(LocalSize-lastfpuoffset)));
|
||||||
list.concat(Taicpu.op_none(A_P_SET_NOREORDER));
|
list.concat(Taicpu.op_none(A_P_SET_NOREORDER));
|
||||||
if (cs_create_pic in current_settings.moduleswitches) and
|
if (cs_create_pic in current_settings.moduleswitches) and
|
||||||
(pi_needs_got in current_procinfo.flags) then
|
(pi_needs_got in current_procinfo.flags) then
|
||||||
|
@ -471,7 +471,7 @@ implementation
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
location.value:=swapendian(Pcardinal(value_set)^);
|
location.value:=aint(swapendian(Pcardinal(value_set)^));
|
||||||
location.value:=aint(
|
location.value:=aint(
|
||||||
reverse_byte (location.value and $ff) or
|
reverse_byte (location.value and $ff) or
|
||||||
(reverse_byte((location.value shr 8) and $ff) shl 8) or
|
(reverse_byte((location.value shr 8) and $ff) shl 8) or
|
||||||
|
Loading…
Reference in New Issue
Block a user