! Copyright (C) 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. IN: compiler-backend USING: assembler compiler errors kernel math math-internals memory namespaces words ; : literal-overflow #! If the src operand is a literal. ! Untag the operand. over tag-bits SAR tag-bits neg shift ; : computed-overflow #! If the src operand is a register. ! Untag both operands. 2dup tag-bits SAR tag-bits SAR ; : simple-overflow ( dest src inv word -- ) #! If the previous arithmetic operation overflowed, then we #! turn the result into a bignum and leave it in EAX. >r >r