rizinorg / rz-rzilcompiler

C to RZIL Compiler to extend the Rizin Hexagon plugin.
4 stars 2 forks source link

[Hexagon] Implicit number conversions #7

Closed Rot127 closed 2 years ago

Rot127 commented 2 years ago

There is no well defined type conversion implemented. Most operations simply check if the bit width of both operands match. But since we parse C code we should follow the conversion rules from https://en.cppreference.com/w/cpp/language/implicit_conversion#Numeric_conversions or some standard.

Implement Chapter 6.3.1.8 Usual arithmetic conversions in https://open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf