Closed Rot127 closed 8 months ago
The instruction a2_roundsat compiles onlye every second time successful. Otherwise it fails with `GCC extended expressions without expression are not implemented.
a2_roundsat
syntax:
'{ size8s_t tmp; uint64_t __a = ((uint64_t)(RssV)); uint64_t __b = ((uint64_t)(0x080000000ULL)); uint64_t __sum = __a + __b; uint64_t __xor = __a ^ __b; const uint64_t __mask = 0x8000000000000000ULL; if (__xor & __mask) { tmp = __sum; } else if ((__a ^ __sum) & __mask) { if (__sum & __mask) { tmp = 0x7FFFFFFFFFFFFFFFLL; HEX_REG_ALIAS_USR_NEW = ((REGFIELD(RF_WIDTH, HEX_REG_FIELD_USR_OVF)) ? deposit64(HEX_REG_ALIAS_USR_NEW, (REGFIELD(RF_OFFSET, HEX_REG_FIELD_USR_OVF)), (REGFIELD(RF_WIDTH, HEX_REG_FIELD_USR_OVF)), ((1))) : HEX_REG_ALIAS_USR_NEW); } else { tmp = 0x8000000000000000LL; HEX_REG_ALIAS_USR_NEW = ((REGFIELD(RF_WIDTH, HEX_REG_FIELD_USR_OVF)) ? deposit64(HEX_REG_ALIAS_USR_NEW, (REGFIELD(RF_OFFSET, HEX_REG_FIELD_USR_OVF)), (REGFIELD(RF_WIDTH, HEX_REG_FIELD_USR_OVF)), ((1))) : HEX_REG_ALIAS_USR_NEW); } } else { tmp = __sum; } ; RdV = ((int64_t)((int32_t)((tmp >> ((1) * 32)) & 0x0ffffffffLL))); }'
Ambiguity in grammar?
Shoudl be fixed with https://github.com/Rot127/rzil-compiler/commit/6bd902ed65b88727e1b979ddfbf1805caa5e670f
The ambiguity is still there. The gcc compounds and normal compound statements get confused and non reproducable builds are the result.
The instruction
a2_roundsat
compiles onlye every second time successful. Otherwise it fails with `GCC extended expressions without expression are not implemented.syntax:
Ambiguity in grammar?