mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-20 15:49:37 +01:00
* fixed in-code for big endian systems and smallsets < 4 bytes
(fixes tbs/tb0219 on big endian systems after r14177) git-svn-id: trunk@14206 -
This commit is contained in:
parent
b732012438
commit
749e791768
@ -390,11 +390,19 @@ implementation
|
|||||||
{ load left in register }
|
{ load left in register }
|
||||||
location_force_reg(current_asmdata.CurrAsmList,left.location,location.size,true);
|
location_force_reg(current_asmdata.CurrAsmList,left.location,location.size,true);
|
||||||
register_maybe_adjust_setbase(current_asmdata.CurrAsmList,left.location,setbase);
|
register_maybe_adjust_setbase(current_asmdata.CurrAsmList,left.location,setbase);
|
||||||
location_force_reg(current_asmdata.CurrAsmList,right.location,opsize,true);
|
{ emit bit test operation -- warning: do not use
|
||||||
{ emit bit test operation }
|
location_force_reg() to force a set into a register, except
|
||||||
cg.a_bit_test_reg_reg_reg(current_asmdata.CurrAsmList,
|
to a register of the same size as the set. The reason is
|
||||||
left.location.size,right.location.size,location.size,
|
that on big endian systems, this would require moving the
|
||||||
left.location.register,right.location.register,location.register);
|
set to the most significant part of the new register,
|
||||||
|
and location_force_register can't do that (it does not
|
||||||
|
know the type).
|
||||||
|
|
||||||
|
a_bit_test_reg_loc_reg() properly takes into account the
|
||||||
|
size of the set to adjust the register index to test }
|
||||||
|
cg.a_bit_test_reg_loc_reg(current_asmdata.CurrAsmList,
|
||||||
|
left.location.size,location.size,
|
||||||
|
left.location.register,right.location,location.register);
|
||||||
|
|
||||||
{ now zero the result if left > nr_of_bits_in_right_register }
|
{ now zero the result if left > nr_of_bits_in_right_register }
|
||||||
hr := cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
hr := cg.getintregister(current_asmdata.CurrAsmList,location.size);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user