π
<-
Chat plein-écran
[^]

Nouveaux travaux sur un compilateur C pour (e)Z80 via LLVM…

Nouveautés, projets, mises à jour.

Re: Nouveaux travaux sur un compilateur C pour (e)Z80 via LL

Unread postby Adriweb » 03 May 2020, 06:38

Si vous voulez voir 5h de streaming où Jacob travaille sur LLVM, c'est dispo sur Twitch (il était en live hier): https://www.twitch.tv/videos/608767782 :P
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 57.1%
 
Posts: 13317
Images: 1093
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
Class: (ingénieur)
Twitter: adriweb
GitHub: adriweb

Re: Nouveaux travaux sur un compilateur C pour (e)Z80 via LL

Unread postby Adriweb » 27 Dec 2020, 17:21

Quelques années plus tard, et après de
nombreuses
heures sur la création/amélioration/débuggage du compilateur (enfin, le backend llvm), linker, et autres outils nécessaires à la toolchain, mais aussi la réécriture d'un certain nombre d'includes standard et des fonctions associées....
La toolchain C/C++ pour CE est sortie en v9.0, basée donc sur LLVM pour le compilateur, qui remplace donc ZDS !

Félicitations à tous les contributeurs, et évidemment à Jacobly en particulier !

The major upgrade from ZDS to LLVM


The toolchain is from now on based on LLVM, an open-source retargetable compiler infrastructure, and @jacobly0 created an (e)z80 backend!
This is a major milestone as it allows the CE toolchain to move away from using the legacy Zilog ZDS compiler, which is closed-source, proprietary, only worked on Windows, and contained numerous bugs.
Thanks to LLVM, later standards of the C and C++ languages are supported (you're not stuck with C89 anymore!), code optimization actually works, and the compiler is able to run natively across multiple platforms. The fact that it is open-source and community-maintained means that bugs can actually be fixed and improvements/feedback can come from anyone.

Note
: No STL is provided for C++ source code (i.e. no std::string, no std::vector, etc.). Currently only language support is offered.


Updating your projects for this new toolchain version


In programs you build with this new toolchain, you should notice performance or speed improvements, depending on the optimization level you choose ... or even both :)

But the massive internal changes in the toolchain
do
mean that some programs might not compile right away anymore.
In fact, first, after installing the new toolchain, you'll have to update your projects' makefile. It's only a few lines, and a template makefile can be found here.

Regarding potential source code related migration, don't worry, it shouldn't be too difficult to fix your code. Here are some differences:
  • Old-style inline assembly will most likely not work, you'd have to write it like the compiler outputs it, in the format fasmg-ez80 expects. Update any assembly source modules with the guide described here.
  • Many new errors and warnings may be generated as the compiler is able to better infer. These should be fixed, and programs should compile without any warnings.
  • If your program was using 64-bit types (for instance long long), it may not build (link, more specifically) anymore. In fact, the ZDS compiler even made those 32-bit. If there's enough justified demand for actually supporting 64-bit types properly, we may work on it.
  • The convimg project has been updated to support a new YAML format that is easier for beginners and tooling. The previous toolchain release (v8.8) also used a YAML format, however some slight modifications were made in order to make it standard-compliant. Example convimg.yaml conversion files can be found in the examples.


Other changes and improvements


You can find the a more detailed list of changes (and a link to the commits) in the changelog file, but here are the other important changes in addition to the compiler change:

  • Lots of cleanup and improvements to the standard includes and headers in general, made possible by the compiler change mentioned above.
  • New
    fileioc
    function: ti_SetGCBehavior to set routines to run before and after a garbage collect would be triggered.
  • New
    keypadc
    defines: many keypad key defines corresponding to the TI-83 Premium CE keypad were added for easier coding.
  • New
    usb.h
    function: usb_BatteryCharging to check if the battery is currently charging.
  • Revamped v/s/printf functions, now available if needed thanks to a light third-party library, see docs.
  • New: fileioc-powered (by default) implementation for file IO functions, see docs.
  • New C++ header-only "library" for easily manipulating "TI real" numbers (see this PR), making some math operations easier. See examples.
  • abort() doesn't generate code that would make CEmu open its debugger anymore - you can use the specific debug functions for that now.
  • Documentation improved and revamped. Available on online here, which replaces the repo's wiki.

----------

Let's thank once again @jacobly0 for his spectacular work (years in the making), as well as everybody who contributed in one way or another, to this release 🥂

Happy coding!


Une news sera prochainement écrite :)
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 57.1%
 
Posts: 13317
Images: 1093
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
Class: (ingénieur)
Twitter: adriweb
GitHub: adriweb

Re: Nouveaux travaux sur un compilateur C pour (e)Z80 via LL

Unread postby Epharius » 27 Dec 2020, 23:10

Félicitation à tous, c'est un travail énorme pour un gain énorme !
Le projet Geometry Dash est terminé ! N'hésitez pas à aller jeter un coup d’œil au topic du projet ! Vous pouvez le télécharger ici.

Unis par la flèche sacrée de cupidon :favorite:
Image
User avatar
EphariusPremium
Niveau 15: CC (Chevalier des Calculatrices)
Niveau 15: CC (Chevalier des Calculatrices)
Level up: 90%
 
Posts: 1033
Images: 4
Joined: 08 Dec 2014, 17:38
Gender: Male
Calculator(s):
Class: ENSIMAG

Previous

Return to Actualités

Who is online

Users browsing this forum: No registered users and 6 guests

-
Search
-
Social
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Découvre les nouvelles fonctionnalités en Python de l'OS 5.2 pour les Nspire CX II
Découvre les nouvelles fonctionnalités en Python de l'OS 5.5 pour la 83PCE/84+C-T Python Edition
Omega, le fork étendant les capacités de ta NumWorks, même en mode examen !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
496 utilisateurs:
>471 invités
>19 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)

-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)