From bf40237a171ffc0ef4d0915ef9e9193a73661e7b Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 3 Feb 2010 20:32:18 +1300 Subject: [PATCH] vm: always check call sites when installing PICs, not just when FACTOR_DEBUG is on, since the check is cheap and saves debugging time when compiler is changed --- vm/cpu-ppc.hpp | 2 -- vm/cpu-x86.hpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/vm/cpu-ppc.hpp b/vm/cpu-ppc.hpp index cd98d6a6ab..d284cbce78 100644 --- a/vm/cpu-ppc.hpp +++ b/vm/cpu-ppc.hpp @@ -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; diff --git a/vm/cpu-x86.hpp b/vm/cpu-x86.hpp index 97e5a20305..5f9fa15740 100644 --- a/vm/cpu-x86.hpp +++ b/vm/cpu-x86.hpp @@ -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)