Skip to content

Commit

Permalink
killl __CHECKER__ and associated macros
Browse files Browse the repository at this point in the history
  • Loading branch information
autc04 committed Nov 19, 2017
1 parent 9cac2f0 commit c832553
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src/dcconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace Executor
EXTRA_CLEANUP(); \
}

#if defined(i386) && !defined(__CHECKER__)
#if defined(i386)

/* Override some of the common conversion cases with inline assembly
* hand-scheduled for the Pentium.
Expand Down
2 changes: 1 addition & 1 deletion src/fileCreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ A4(PRIVATE, OSErr, PBCreateForD, ParmBlkPtr, pb, BOOLEAN, a,
{
GUEST<LONGINT> swapped_dir;

TRANSFER_ASSIGN(newparam.fileParam, pb->fileParam);
newparam.fileParam = pb->fileParam;
memset(&newparam.fileParam.ioFlFndrInfo, 0,
sizeof(newparam.fileParam.ioFlFndrInfo));
memset(&newparam.fileParam.ioFlCrDat, 0,
Expand Down
2 changes: 0 additions & 2 deletions src/float4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ P_SAVED0D1A0A1_2(PUBLIC pascal trap, void, ROMlib_Fsetenv, INTEGER *,
: "g"(fpcr), "g"(fpsr));
}
#elif defined(i386)
#if !defined(__CHECKER__)
{
unsigned short fcw, fsw;
i387_env_t i387_env;
Expand Down Expand Up @@ -303,7 +302,6 @@ P_SAVED0D1A0A1_2(PUBLIC pascal trap, void, ROMlib_Fsetenv, INTEGER *,
:
: "m"(i387_env));
}
#endif
#elif defined(__alpha) || defined(powerpc) || defined(__ppc__) || defined(__x86_64)
#warning ROMlib_Fsetenv not implemented!
signal(SIGFPE, SIG_IGN);
Expand Down
54 changes: 0 additions & 54 deletions src/include/rsys/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,58 +78,4 @@
#define TICKX(str) CLC(TICK(str))
#endif

#if defined(__CHECKER__)
#include <checker.h>

#define BLOCK(body) \
do \
{ \
body \
} while(false)

#define TRANSFER_ASSIGN(dst, src) \
BLOCK({ \
gui_assert(sizeof(dst) == sizeof(src)); \
chkr_update_stack_seg; \
chkr_memcpy_transfer(&(dst), &(src), sizeof(dst)); \
})

#define memcpy_transfer(dst, src, size) \
BLOCK({ \
chkr_update_stack_seg; \
chkr_memcpy_transfer(dst, src, size); \
})

#define memmove_transfer(dst, src, size) \
BLOCK({ \
chkr_update_stack_seg; \
chkr_memmove_transfer(dst, src, size); \
})

#define check_bitmap(bitmap, perm) \
BLOCK({ \
chkr_update_stack_seg; \
chkr_setup_stack_trace_info(); \
chkr_check_addr(BITMAP_BASEADDR(bitmap), \
(RECT_HEIGHT(&BITMAP_BOUNDS(bitmap)) \
* BITMAP_ROWBYTES(bitmap)), \
perm); \
})

#else

/* dummy values, will be ignored */
#define CHKR_RO -1
#define CHKR_WO -1
#define CHKR_RW -1

#define TRANSFER_ASSIGN(dst, src) \
((dst) = (src))
#define memcpy_transfer(dst, src, size) \
memcpy(dst, src, size);
#define memmove_transfer(dst, src, size) \
memmove(dst, src, size);
#define check_bitmap(pixmap, perm)
#endif

#endif /* !_MACROS_H_ */
4 changes: 0 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1736,11 +1736,7 @@ int main(int argc, char **argv)
#if defined(SYN68K)
/* Set up syn68k. */
initialize_68k_emulator(vdriver_system_busy,
#if defined(__CHECKER__)
false,
#else
use_native_code_p,
#endif
(uint32 *)SYN68K_TO_US(0),
#if defined(USE_BIOS_TIMER)
dos_int_flag.rm_segment * 16
Expand Down
2 changes: 1 addition & 1 deletion src/mman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ BlockMove_and_possibly_flush_cache(Ptr src, Ptr dst, Size cnt,
if(!src)
src = (Ptr)SYN68K_TO_US(0);

memmove_transfer(dst, src, cnt);
memmove(dst, src, cnt);
if(flush_p)
ROMlib_destroy_blocks(US_TO_SYN68K(dst), cnt, true);
}
Expand Down

0 comments on commit c832553

Please sign in to comment.