bebbo / gcc

Bebbo's gcc-6-branch for m68k-amigaos
GNU General Public License v2.0
33 stars 11 forks source link

move.l -> moveq + lsl #232

Closed erique closed 2 months ago

erique commented 2 months ago

Have you considered the -Os optimization changing move.l #V,dN to moveq.l #V>>n,dN + lsl.w #n,dN, for values where V>>n would fit into 7 bits?

http://franke.ms/cex/z/KeWToj

could instead be represented as

  moveq #66,d0
  lsl.w #3,d0

(similar to 68080 moviw.l, but with restrictions)

bebbo commented 2 months ago

Have you considered the -Os optimization changing move.l #V,dN to moveq.l #V>>n,dN + lsl.w #n,dN, for values where V>>n would fit into 7 bits?

http://franke.ms/cex/z/KeWToj

could instead be represented as

  moveq #66,d0
  lsl.w #3,d0

(similar to 68080 moviw.l, but with restrictions)

there is no plan to add this feature.