mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 16:29:48 +02:00
* user xor reg,reg to zero out registers in the i8086 optimized 64-bit shl code
git-svn-id: trunk@32061 -
This commit is contained in:
parent
6ece867305
commit
ff5eed1c00
@ -431,17 +431,17 @@ implementation
|
||||
if nodetype=shln then
|
||||
begin
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_16,OS_16,hreg64lo,GetNextReg(hreg64hi));
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,hreg64lo);
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,GetNextReg(hreg64lo));
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,hreg64hi);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,hreg64lo,hreg64lo);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,GetNextReg(hreg64lo),GetNextReg(hreg64lo));
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,hreg64hi,hreg64hi);
|
||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_16,v-48,GetNextReg(hreg64hi));
|
||||
end
|
||||
else
|
||||
begin
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_16,OS_16,GetNextReg(hreg64hi),hreg64lo);
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,GetNextReg(hreg64hi));
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,hreg64hi);
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,GetNextReg(hreg64lo));
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,GetNextReg(hreg64hi),GetNextReg(hreg64hi));
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,hreg64hi,hreg64hi);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,GetNextReg(hreg64lo),GetNextReg(hreg64lo));
|
||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHR,OS_16,v-48,hreg64lo);
|
||||
end;
|
||||
end
|
||||
@ -453,16 +453,16 @@ implementation
|
||||
begin
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_16,OS_16,hreg64lo,hreg64hi);
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_16,OS_16,GetNextReg(hreg64lo),GetNextReg(hreg64hi));
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,hreg64lo);
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,GetNextReg(hreg64lo));
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,hreg64lo,hreg64lo);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,GetNextReg(hreg64lo),GetNextReg(hreg64lo));
|
||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHL,OS_32,v-32,hreg64hi);
|
||||
end
|
||||
else
|
||||
begin
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_16,OS_16,hreg64hi,hreg64lo);
|
||||
cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_16,OS_16,GetNextReg(hreg64hi),GetNextReg(hreg64lo));
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,hreg64hi);
|
||||
cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_16,0,GetNextReg(hreg64hi));
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,hreg64hi,hreg64hi);
|
||||
cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_16,GetNextReg(hreg64hi),GetNextReg(hreg64hi));
|
||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SHR,OS_32,v-32,hreg64lo);
|
||||
end;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user