DontBelieveMe / helix

"Compiler Optimisation Techniques" - BSc Computer Science Final Year Project (Sheffield Hallam University)
2 stars 0 forks source link

Add Zero & Sign Extension Instructions #12

Closed DontBelieveMe closed 2 years ago

DontBelieveMe commented 2 years ago

Would be a CompareInsn with the printed form of zext (for zero extension) and sext (for sign extension). Necessary to correctly & fully implement #10

DontBelieveMe commented 2 years ago

Clang helps us out here by inserting (implicit) cast nodes in the AST to deal with integer promotion rules so we should be able to dumb these sext/zext instructions from there and shouldn't need to deal with the complex integer promotion rules ourselves.

Will need to somehow mark up return values though (llvm uses function attributes I think)