jacobly0 / llvm-project

This fork of the canonical git mirror of the LLVM subversion repository adds (e)Z80 targets. Please refer to the wiki for important build instructions.
https://github.com/jacobly0/llvm-project/wiki
123 stars 15 forks source link

crash when using -Os flag at link step #33

Closed parisseb closed 1 year ago

parisseb commented 1 year ago

While trying to port a light version of KhiCAS to the ti83/84, I get a 3M binary, and that's too large to load on the calc/emulator. This is much larger than what I get on monochrom Casio with the same code (2M on the Casio). The reason is that the ez80 version is compiled with -Oz, while the Casio version is compiled with -Os. But trying to compile with -Os fails at link step, with the following error: fatal error: error in backend: unable to legalize instruction: %83:_(s48) = G_LSHR %81:_, %84:_(s8) (in function: sdk_init) The source code is available here (but I believe it it reproducible with a much smaller source) https://www-fourier.univ-grenoble-alpes.fr/~parisse/ti/khicas.tgz Any hope to fix this? Thanks!

mateoconlechuga commented 1 year ago

I believe this is a duplicate of #12