* changed remaining "getregister32" calls to "getregisterint"

This commit is contained in:
Jonas Maebe 2001-12-31 09:53:15 +00:00
parent d45517d97d
commit dc912b6358
6 changed files with 56 additions and 38 deletions

View File

@ -885,7 +885,7 @@ implementation
end
else if (lexlevel>(tprocdef(procdefinition).parast.symtablelevel)) then
begin
hregister:=getregister32;
hregister:=getregisterint;
new(r);
reset_reference(r^);
r^.offset:=procinfo^.framepointer_offset;
@ -1593,7 +1593,10 @@ begin
end.
{
$Log$
Revision 1.39 2001-12-29 15:32:13 jonas
Revision 1.40 2001-12-31 09:53:15 jonas
* changed remaining "getregister32" calls to "getregisterint"
Revision 1.39 2001/12/29 15:32:13 jonas
* powerpc/cgcpu.pas compiles :)
* several powerpc-related fixes
* cpuasm unit is now based on common tainst unit

View File

@ -119,7 +119,7 @@ begin
{ free the registers of right }
del_reference(right.location.reference);
{ get register for the char }
hreg := reg32toreg8(getregister32);
hreg := reg32toreg8(getregisterint);
emit_ref_reg(A_MOV,S_B,
newreference(right.location.reference),hreg);
{ I don't think a temp char exists, but it won't hurt (JM) }
@ -128,7 +128,7 @@ begin
else hreg := right.location.register;
{ load the current string length }
lengthreg := getregister32;
lengthreg := getregisterint;
emit_ref_reg(A_MOVZX,S_BL,newreference(left.location.reference),lengthreg);
{ do we have to check the length ? }
@ -248,7 +248,10 @@ end.
{
$Log$
Revision 1.5 2001-08-26 13:37:00 florian
Revision 1.6 2001-12-31 09:53:15 jonas
* changed remaining "getregister32" calls to "getregisterint"
Revision 1.5 2001/08/26 13:37:00 florian
* some cg reorganisation
* some PPC updates

View File

@ -408,7 +408,7 @@ implementation
begin
{ We have to load the value into a register because
btl does not accept values only refs or regs (PFV) }
hr2:=getregister32;
hr2:=getregisterint;
emit_const_reg(A_MOV,S_L,
right.location.reference.offset,hr2);
emit_reg_reg(A_BT,S_L,hr,hr2);
@ -436,7 +436,7 @@ implementation
{ Is this treated in firstpass ?? }
if left.nodetype=ordconstn then
begin
hr:=getregister32;
hr:=getregisterint;
left.location.loc:=LOC_REGISTER;
left.location.register:=hr;
emit_const_reg(A_MOV,S_L,
@ -456,7 +456,7 @@ implementation
emitlab(l);
{ We have to load the value into a register because
btl does not accept values only refs or regs (PFV) }
hr2:=getregister32;
hr2:=getregisterint;
emit_const_reg(A_MOV,S_L,right.location.reference.offset,hr2);
emit_reg_reg(A_BT,S_L,hr,hr2);
ungetregister32(hr2);
@ -483,12 +483,12 @@ implementation
emitjmp(C_NONE,l2);
emitlab(l);
del_reference(left.location.reference);
hr:=getregister32;
hr:=getregisterint;
emit_ref_reg(A_MOV,S_L,
newreference(left.location.reference),hr);
{ We have to load the value into a register because
btl does not accept values only refs or regs (PFV) }
hr2:=getregister32;
hr2:=getregisterint;
emit_const_reg(A_MOV,S_L,
right.location.reference.offset,hr2);
emit_reg_reg(A_BT,S_L,hr,hr2);
@ -922,7 +922,7 @@ implementation
end;
LOC_CREGISTER:
begin
hregister:=getregister32;
hregister:=getregisterint;
case opsize of
S_B:
hregister:=reg32toreg8(hregister);
@ -945,7 +945,7 @@ implementation
LOC_MEM,LOC_REFERENCE:
begin
del_reference(left.location.reference);
hregister:=getregister32;
hregister:=getregisterint;
case opsize of
S_B:
hregister:=reg32toreg8(hregister);
@ -1092,7 +1092,10 @@ begin
end.
{
$Log$
Revision 1.18 2001-12-03 21:48:43 peter
Revision 1.19 2001-12-31 09:53:15 jonas
* changed remaining "getregister32" calls to "getregisterint"
Revision 1.18 2001/12/03 21:48:43 peter
* freemem change to value parameter
* torddef low/high range changed to int64

View File

@ -55,7 +55,7 @@ interface
{$ifdef TEMPREGDEBUG}
procedure testregisters32;
{$endif TEMPREGDEBUG}
function getregister32 : tregister;
function getregisterint : tregister;
function getaddressregister: tregister;
procedure ungetregister32(r : tregister);
{ tries to allocate the passed register, if possible }
@ -539,7 +539,7 @@ implementation
end;
{$endif TEMPREGDEBUG}
function getregister32 : tregister;
function getregisterint : tregister;
begin
if usablereg32=0 then
internalerror(10);
@ -556,7 +556,7 @@ implementation
begin
unused:=unused-[R_EAX];
usedinproc:=usedinproc or ($80 shr byte(R_EAX));
getregister32:=R_EAX;
getregisterint:=R_EAX;
{$ifdef TEMPREGDEBUG}
reg_user[R_EAX]:=curptree^;
{$endif TEMPREGDEBUG}
@ -566,7 +566,7 @@ implementation
begin
unused:=unused-[R_EDX];
usedinproc:=usedinproc or ($80 shr byte(R_EDX));
getregister32:=R_EDX;
getregisterint:=R_EDX;
{$ifdef TEMPREGDEBUG}
reg_user[R_EDX]:=curptree^;
{$endif TEMPREGDEBUG}
@ -576,7 +576,7 @@ implementation
begin
unused:=unused-[R_EBX];
usedinproc:=usedinproc or ($80 shr byte(R_EBX));
getregister32:=R_EBX;
getregisterint:=R_EBX;
{$ifdef TEMPREGDEBUG}
reg_user[R_EBX]:=curptree^;
{$endif TEMPREGDEBUG}
@ -586,7 +586,7 @@ implementation
begin
unused:=unused-[R_ECX];
usedinproc:=usedinproc or ($80 shr byte(R_ECX));
getregister32:=R_ECX;
getregisterint:=R_ECX;
{$ifdef TEMPREGDEBUG}
reg_user[R_ECX]:=curptree^;
{$endif TEMPREGDEBUG}
@ -602,7 +602,7 @@ implementation
function getaddressregister: tregister;
begin
getaddressregister := getregister32;
getaddressregister := getregisterint;
end;
function getexplicitregister32(r : tregister) : tregister;
@ -631,7 +631,7 @@ implementation
{$endif TEMPREGDEBUG}
end
else
getexplicitregister32:=getregister32;
getexplicitregister32:=getregisterint;
end;
procedure cleartempgen;
@ -690,7 +690,10 @@ begin
end.
{
$Log$
Revision 1.7 2001-12-29 15:29:59 jonas
Revision 1.8 2001-12-31 09:53:16 jonas
* changed remaining "getregister32" calls to "getregisterint"
Revision 1.7 2001/12/29 15:29:59 jonas
* powerpc/cgcpu.pas compiles :)
* several powerpc-related fixes
* cpuasm unit is now based on common tainst unit

View File

@ -76,7 +76,7 @@ interface
begin
inc(left.location.reference.offset);
del_reference(left.location.reference);
location.register:=getregister32;
location.register:=getregisterint;
cg.a_loadaddress_ref_reg(exprasmlist,left.location.reference,
location.register);
end;
@ -87,13 +87,13 @@ interface
begin
reset_reference(hr);
hr.symbol:=newasmsymbol('FPC_EMPTYCHAR');
location.register:=getregister32;
location.register:=getregisterint;
cg.a_loadaddress_ref_reg(exprasmlist,hr,location.register);
end
else
begin
del_reference(left.location.reference);
location.register:=getregister32;
location.register:=getregisterint;
cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,
location.register);
end;
@ -110,13 +110,13 @@ interface
begin
reset_reference(hr);
hr.symbol:=newasmsymbol('FPC_EMPTYCHAR');
location.register:=getregister32;
location.register:=getregisterint;
cg.a_loadaddress_ref_reg(exprasmlist,hr,location.register);
end
else
begin
del_reference(left.location.reference);
location.register:=getregister32;
location.register:=getregisterint;
{$warning Todo: convert widestrings to ascii when typecasting them to pchars}
cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,
location.register);
@ -154,7 +154,7 @@ interface
del_reference(left.location.reference);
clear_location(location);
location.loc:=LOC_REGISTER;
location.register:=getregister32;
location.register:=getregisterint;
cg.a_loadaddress_ref_reg(exprasmlist,left.location.reference,
location.register);
end;
@ -171,14 +171,14 @@ interface
location.reference.base:=left.location.register;
LOC_CREGISTER :
begin
location.reference.base:=getregister32;
location.reference.base:=getregisterint;
cg.a_load_reg_reg(exprasmlist,OS_32,left.location.register,
location.reference.base);
end
else
begin
del_reference(left.location.reference);
location.reference.base:=getregister32;
location.reference.base:=getregisterint;
cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,
location.reference.base);
end;
@ -248,7 +248,7 @@ interface
clear_location(location);
location.loc:=LOC_REGISTER;
del_reference(left.location.reference);
location.register:=getregister32;
location.register:=getregisterint;
cg.a_loadaddress_ref_reg(exprasmlist,left.location.reference,
location.register);
end;
@ -282,7 +282,7 @@ interface
clear_location(location);
location.loc:=LOC_REGISTER;
del_location(left.location);
location.register:=getregister32;
location.register:=getregisterint;
{ size of the boolean we're converting }
opsize := def_cgsize(left.resulttype.def);
{ size of the destination }
@ -359,7 +359,7 @@ interface
LOC_MEM,LOC_REFERENCE:
begin
del_reference(left.location.reference);
location.register:=getregister32;
location.register:=getregisterint;
cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,
location.register);
end;
@ -383,13 +383,13 @@ interface
LOC_REFERENCE:
begin
del_reference(left.location.reference);
hreg:=getregister32;
hreg:=getregisterint;
cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,
hreg);
end;
LOC_CREGISTER:
begin
hreg:=getregister32;
hreg:=getregisterint;
cg.a_load_reg_reg(exprasmlist,OS_32,left.location.register,
hreg);
end;
@ -422,7 +422,10 @@ end.
{
$Log$
Revision 1.3 2001-10-04 14:33:28 jonas
Revision 1.4 2001-12-31 09:53:15 jonas
* changed remaining "getregister32" calls to "getregisterint"
Revision 1.3 2001/10/04 14:33:28 jonas
* fixed range check errors
Revision 1.2 2001/09/30 16:16:28 jonas

View File

@ -93,7 +93,7 @@ implementation
procedure tcgloadvmtnode.pass_2;
begin
location.register:=getregister32;
location.register:=getregisterint;
cg.a_load_sym_ofs_reg(exprasmlist,
newasmsymbol(tobjectdef(tclassrefdef(resulttype.def).pointertype.def).vmt_mangledname),
0,location.register);
@ -444,7 +444,10 @@ begin
end.
{
$Log$
Revision 1.2 2001-11-02 22:58:02 peter
Revision 1.3 2001-12-31 09:53:15 jonas
* changed remaining "getregister32" calls to "getregisterint"
Revision 1.2 2001/11/02 22:58:02 peter
* procsym definition rewrite
Revision 1.1 2001/09/30 16:17:17 jonas