f0rki / mapping-high-level-constructs-to-llvm-ir

A guide that explains how high level programming language constructs are mapped to the LLVM intermediate language.
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io
Other
599 stars 62 forks source link

Classes section: i32 type for size_t #55

Open marcauberer opened 1 year ago

marcauberer commented 1 year ago

Hi, first of all thanks for the helpful documentation! The section about classes has a little flaw: it used the i32 type instead of i64 like most compilers will emit nowadays. Was a little confused about this at first.

Best, Marc

archfrog commented 1 year ago

It was written more than a decade ago, hence the 32-bit types. But I think you're right, the types and samples should probably be updated. I'll see if I can find some time soon :-) I don't know what to do with the setjmp example, though, as the divinely inspired people who made a 64-bit version of setjmp only gave it a 32-bit argument so it sort of breaks everything.