From: Maarten B. <sou...@ds...> - 2006-09-28 09:06:06
|
Philipp, This is already an icode: RIGHT_OP. AFAIK it can handle both signed and unsigned shifts. I don't know why it only converts div to shift for an unsigned left operand. Try removing IS_UNSIGNED(letype) from the check in geniCodeDivision() in SDCCicode.c. Run regression tests if possible to see they all pass and also have a look at the bytes and clock ticks to see if it really is an improvement. Maarten > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I'd like to add a new token: SRA, arithmetic shift right. > This token would be emitted in geniCodeDivision in SDCCicode.c > I'm trying to implement #1307995: Use shifts instead of division for > divisions with signed left operands. > Does that mean that I have to write code generation for this token for > every port in gen.c? > Is there a way to handle this token only in one port for now and then > gradually add it to other ports? > > Philipp > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFFGvHcbtUV+xsoLpoRAgG/AKDMzE9fKtPUhbgPVtPinDvA2Zr0zgCbBNB/ > ETfuzQd2uzn73cj2u66FF5g=3D > =3DG8qT > -----END PGP SIGNATURE----- |