]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: always check call sites when installing PICs, not just when FACTOR_DEBUG is on...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 3 Feb 2010 07:32:18 +0000 (20:32 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 3 Feb 2010 10:11:34 +0000 (23:11 +1300)
vm/cpu-ppc.hpp
vm/cpu-x86.hpp

index cd98d6a6ab553c7b90733416a89c5d43418d4969..d284cbce78e4c7f6f7bb7b267a3ad13249413437 100644 (file)
@@ -14,13 +14,11 @@ static const fixnum xt_tail_pic_offset = 4;
 
 inline static void check_call_site(cell return_address)
 {
-#ifdef FACTOR_DEBUG
        cell insn = *(cell *)return_address;
        /* Check that absolute bit is 0 */
        assert((insn & 0x2) == 0x0);
        /* Check that instruction is branch */
        assert((insn >> 26) == 0x12);
-#endif
 }
 
 static const cell b_mask = 0x3fffffc;
index 97e5a203059a221ac973ebdc3c6327e80da3b7a9..5f9fa15740d1e89ecca66a4a439bc25f00c2a5c5 100644 (file)
@@ -27,10 +27,8 @@ inline static unsigned char call_site_opcode(cell return_address)
 
 inline static void check_call_site(cell return_address)
 {
-#ifdef FACTOR_DEBUG
        unsigned char opcode = call_site_opcode(return_address);
        assert(opcode == call_opcode || opcode == jmp_opcode);
-#endif
 }
 
 inline static void *get_call_target(cell return_address)