summaryrefslogtreecommitdiffstats
path: root/HACKING
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-04-29 07:17:41 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-04-29 07:17:41 -0700
commit43d7c3ec652ced39f960a91959bbf48efd84e190 (patch)
treea190d5c0745a1027607f5333bd02c4d854ec5211 /HACKING
parenta15ad0c137bcfb00a644cc08476c8c6797939105 (diff)
downloadtxr-43d7c3ec652ced39f960a91959bbf48efd84e190.tar.gz
txr-43d7c3ec652ced39f960a91959bbf48efd84e190.tar.bz2
txr-43d7c3ec652ced39f960a91959bbf48efd84e190.zip
compiler/assembler: bugfix: bignums can't be immediate ops.
* share/txr/stdlib/asm.tl (assembler immediate-fits-type): Do not include bignum types as candidates for immediate operand. We take the sys:bits representation of the object, and that of course is a pointer. This case actually happens on 32 bit platforms because the value that is one less than the most negative fixnum still fits into the fixnum representational range, due to the way two's complement works, but is actually a bignum. Concretely, the value #x-20000000 is a bignum, but its width is 29, which falsely suggests that its representation can fit into 32 bits as a literal. * share/txr/stdlib/compiler.tl (compiler comp-atom): Test for fixnum here rather than integerp, so in the above discussed case, we don't generate a movi instruction.
Diffstat (limited to 'HACKING')
0 files changed, 0 insertions, 0 deletions