summaryrefslogtreecommitdiff
path: root/libjava/include
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-18 17:38:37 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-18 17:38:37 +0000
commitaea51dc8652f43ae4d72a93ad745651c29fe61fd (patch)
treeebd27b2664b14d776b14efd6fa5e0f6bb6c259d6 /libjava/include
parent3889790c8cb1fa1cd5a5baa07ebb5516f72be31a (diff)
downloadgcc-aea51dc8652f43ae4d72a93ad745651c29fe61fd.tar.gz
Check and skip 67h address size prefix for x32
PR libjava/53973 * include/x86_64-signal.h (CHECK_67H_PREFIX): New. (HANDLE_DIVIDE_OVERFLOW): Check and and skip 67h address size prefix if CHECK_67H_PREFIX is 1. Use ULL suffix for 64-bit integer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/x86_64-signal.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h
index 4bd8a360115..84907c3c3a3 100644
--- a/libjava/include/x86_64-signal.h
+++ b/libjava/include/x86_64-signal.h
@@ -21,6 +21,12 @@ details. */
#define HANDLE_SEGV 1
#define HANDLE_FPE 1
+#ifdef __ILP32__
+# define CHECK_67H_PREFIX 1
+#else
+# define CHECK_67H_PREFIX 0
+#endif
+
#define SIGNAL_HANDLER(_name) \
static void _Jv_##_name (int, siginfo_t *, \
void *_p __attribute__ ((__unused__)))
@@ -47,6 +53,10 @@ do \
\
bool _is_64_bit = false; \
\
+ /* Check and skip 67h address size prefix if needed. */ \
+ if (CHECK_67H_PREFIX && _rip[0] == 0x67) \
+ _rip++; \
+ \
if ((_rip[0] & 0xf0) == 0x40) /* REX byte present. */ \
{ \
unsigned char _rex = _rip[0] & 0x0f; \
@@ -64,10 +74,10 @@ do \
{ \
if (_is_64_bit) \
_min_value_dividend = \
- _gregs[REG_RAX] == (greg_t)0x8000000000000000UL; \
+ _gregs[REG_RAX] == (greg_t)0x8000000000000000ULL; \
else \
_min_value_dividend = \
- (_gregs[REG_RAX] & 0xffffffff) == (greg_t)0x80000000UL; \
+ (_gregs[REG_RAX] & 0xffffffff) == (greg_t)0x80000000ULL; \
} \
\
if (_min_value_dividend) \