projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better font
[dosdemo]
/
src
/
util.h
diff --git
a/src/util.h
b/src/util.h
index
6d200b7
..
6d869eb
100644
(file)
--- a/
src/util.h
+++ b/
src/util.h
@@
-5,12
+5,15
@@
#ifdef __GNUC__
#define INLINE __inline
#ifdef __GNUC__
#define INLINE __inline
+#define PACKED __attribute__((packed))
#elif defined(__WATCOMC__)
#define INLINE __inline
#elif defined(__WATCOMC__)
#define INLINE __inline
+#define PACKED
#else
#define INLINE
#else
#define INLINE
+#define PACKED
#endif
/* fast conversion of double -> 32bit int
#endif
/* fast conversion of double -> 32bit int
@@
-43,6
+46,9
@@
void perf_end(void);
"sub eax, [perf_start_count]" \
"mov [perf_interval_count], eax" \
modify [eax ebx ecx edx];
"sub eax, [perf_start_count]" \
"mov [perf_interval_count], eax" \
modify [eax ebx ecx edx];
+
+void debug_break(void);
+#pragma aux debug_break = "int 3";
#endif
#ifdef __GNUC__
#endif
#ifdef __GNUC__
@@
-63,6
+69,9
@@
void perf_end(void);
: "=m"(perf_interval_count) \
: "m"(perf_start_count) \
: "%eax", "%ebx", "%ecx", "%edx")
: "=m"(perf_interval_count) \
: "m"(perf_start_count) \
: "%eax", "%ebx", "%ecx", "%edx")
+
+#define debug_break() \
+ asm volatile ("int $3")
#endif
#ifdef _MSC_VER
#endif
#ifdef _MSC_VER
@@
-86,6
+95,11
@@
void perf_end(void);
mov [perf_interval_count], eax \
} \
} while(0)
mov [perf_interval_count], eax \
} \
} while(0)
+
+#define debug_break() \
+ do { \
+ __asm { int 3 } \
+ } while(0)
#endif
#endif /* UTIL_H_ */
#endif
#endif /* UTIL_H_ */