| 1825 | } |
| 1826 | |
| 1827 | expr expr::sext(unsigned amount) const { |
| 1828 | C(); |
| 1829 | if (amount == 0) |
| 1830 | return *this; |
| 1831 | |
| 1832 | expr e; |
| 1833 | if (isSignExt(e)) |
| 1834 | return e.sext((bits() - e.bits()) + amount); |
| 1835 | |
| 1836 | if (isNegative().isFalse()) |
| 1837 | return zext(amount); |
| 1838 | |
| 1839 | return simplify_const(Z3_mk_sign_ext(ctx(), amount, ast()), *this); |
| 1840 | } |
| 1841 | |
| 1842 | expr expr::zext(unsigned amount) const { |
| 1843 | if (amount == 0) |
no test coverage detected