summaryrefslogtreecommitdiff
path: root/libjava/include
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-11 13:54:49 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-11 13:54:49 +0000
commita1fefa1d0661268691bd31ede4852d7699448262 (patch)
tree5fc380aa4ccb171608a6812ecebb5e079cf0f3f9 /libjava/include
parentd45318b3f91ca785bfca5d465288dea73ed0aa26 (diff)
downloadgcc-a1fefa1d0661268691bd31ede4852d7699448262.tar.gz
2007-01-11 Andrew Haley <aph@redhat.com>
* prims.cc (jdwpOptions) Fix deprecated cast from char[] constant to char*. * include/x86_64-signal.h (HANDLE_DIVIDE_OVERFLOW): Rewrite to fix aliasing violation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/x86_64-signal.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h
index 479be3ff898..ede92a482f4 100644
--- a/libjava/include/x86_64-signal.h
+++ b/libjava/include/x86_64-signal.h
@@ -29,9 +29,8 @@ static void _Jv_##_name (int, siginfo_t *, \
do \
{ \
struct ucontext *_uc = (struct ucontext *)_p; \
- volatile struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext; \
- \
- register unsigned char *_rip = (unsigned char *)_sc->rip; \
+ gregset_t &_gregs = _uc->uc_mcontext.gregs; \
+ unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \
\
/* According to the JVM spec, "if the dividend is the negative \
* integer of largest possible magnitude for the type and the \
@@ -64,15 +63,17 @@ do \
if (((_modrm >> 3) & 7) == 7) \
{ \
if (_is_64_bit) \
- _min_value_dividend = (_sc->rax == 0x8000000000000000L); \
+ _min_value_dividend = \
+ _gregs[REG_RAX] == (greg_t)0x8000000000000000UL; \
else \
- _min_value_dividend = ((_sc->rax & 0xffffffff) == 0x80000000); \
+ _min_value_dividend = \
+ (_gregs[REG_RAX] & 0xffffffff) == (greg_t)0x80000000UL; \
} \
\
if (_min_value_dividend) \
{ \
unsigned char _rm = _modrm & 7; \
- _sc->rdx = 0; /* the remainder is zero */ \
+ _gregs[REG_RDX] = 0; /* the remainder is zero */ \
switch (_modrm >> 6) \
{ \
case 0: /* register indirect */ \
@@ -95,7 +96,7 @@ do \
break; \
} \
_rip += 2; \
- _sc->rip = (unsigned long)_rip; \
+ _gregs[REG_RIP] = (greg_t)_rip; \
return; \
} \
} \