QBE as an easy-to-embed library
https://c9x.me/git/qbe.git
The casting to uint32_t made the code for comparing two signed words invalid. Interestingly, this can be fixed by casting to int32_t instead. Because sign extension is monotonic, all the unsigned comparisons remain valid. CVC4 can even check that for us: x, y : BITVECTOR(32); QUERY BVLT(SX(x, 64), SX(y, 64)) <=> BVLT(x, y); QUERY BVLE(SX(x, 64), SX(y, 64)) <=> BVLE(x, y); QUERY BVGT(SX(x, 64), SX(y, 64)) <=> BVGT(x, y); QUERY BVGE(SX(x, 64), SX(y, 64)) <=> BVGE(x, y); |
||
---|---|---|
doc | ||
minic | ||
test | ||
tools | ||
.gitignore | ||
.tag | ||
all.h | ||
copy.c | ||
emit.c | ||
fold.c | ||
isel.c | ||
LICENSE | ||
live.c | ||
main.c | ||
Makefile | ||
mem.c | ||
parse.c | ||
README | ||
rega.c | ||
spill.c | ||
ssa.c | ||
sysv.c | ||
util.c |
QBE - Backend Compiler http://c9x.me/compile/ doc/ Documentation. minic/ An example C frontend for QBE. tools/ Miscellaneous tools (testing). test/ Unit tests. The LICENSE file applies to all files distributed. - Compilation Invoke GNU make in this directory to create the executable file obj/qbe. On some systems (BSD) you might have to use 'gmake' instead of 'make'.