Commit 9d5b51ff by Andrew Haley Committed by Andrew Haley

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.

From-SVN: r120672
parent e69bf64b
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.
2007-01-10 Tom Tromey <tromey@redhat.com> 2007-01-10 Tom Tromey <tromey@redhat.com>
* gnu/gcj/xlib/*.h: New files. * gnu/gcj/xlib/*.h: New files.
......
...@@ -29,9 +29,8 @@ static void _Jv_##_name (int, siginfo_t *, \ ...@@ -29,9 +29,8 @@ static void _Jv_##_name (int, siginfo_t *, \
do \ do \
{ \ { \
struct ucontext *_uc = (struct ucontext *)_p; \ struct ucontext *_uc = (struct ucontext *)_p; \
volatile struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext; \ gregset_t &_gregs = _uc->uc_mcontext.gregs; \
\ unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \
register unsigned char *_rip = (unsigned char *)_sc->rip; \
\ \
/* According to the JVM spec, "if the dividend is the negative \ /* According to the JVM spec, "if the dividend is the negative \
* integer of largest possible magnitude for the type and the \ * integer of largest possible magnitude for the type and the \
...@@ -64,15 +63,17 @@ do \ ...@@ -64,15 +63,17 @@ do \
if (((_modrm >> 3) & 7) == 7) \ if (((_modrm >> 3) & 7) == 7) \
{ \ { \
if (_is_64_bit) \ if (_is_64_bit) \
_min_value_dividend = (_sc->rax == 0x8000000000000000L); \ _min_value_dividend = \
_gregs[REG_RAX] == (greg_t)0x8000000000000000UL; \
else \ else \
_min_value_dividend = ((_sc->rax & 0xffffffff) == 0x80000000); \ _min_value_dividend = \
(_gregs[REG_RAX] & 0xffffffff) == (greg_t)0x80000000UL; \
} \ } \
\ \
if (_min_value_dividend) \ if (_min_value_dividend) \
{ \ { \
unsigned char _rm = _modrm & 7; \ unsigned char _rm = _modrm & 7; \
_sc->rdx = 0; /* the remainder is zero */ \ _gregs[REG_RDX] = 0; /* the remainder is zero */ \
switch (_modrm >> 6) \ switch (_modrm >> 6) \
{ \ { \
case 0: /* register indirect */ \ case 0: /* register indirect */ \
...@@ -95,7 +96,7 @@ do \ ...@@ -95,7 +96,7 @@ do \
break; \ break; \
} \ } \
_rip += 2; \ _rip += 2; \
_sc->rip = (unsigned long)_rip; \ _gregs[REG_RIP] = (greg_t)_rip; \
return; \ return; \
} \ } \
} \ } \
......
...@@ -87,7 +87,7 @@ static java::lang::OutOfMemoryError *no_memory; ...@@ -87,7 +87,7 @@ static java::lang::OutOfMemoryError *no_memory;
// Number of bytes in largest array object we create. This could be // Number of bytes in largest array object we create. This could be
// increased to the largest size_t value, so long as the appropriate // increased to the largest size_t value, so long as the appropriate
// functions are changed to take a size_t argument instead of jint. // functions are changed to take a size_t argument instead of jint.
#define MAX_OBJECT_SIZE ((1<<31) - 1) #define MAX_OBJECT_SIZE (((size_t)1<<31) - 1)
// Properties set at compile time. // Properties set at compile time.
const char **_Jv_Compiler_Properties = NULL; const char **_Jv_Compiler_Properties = NULL;
...@@ -104,7 +104,8 @@ int _Jv_argc; ...@@ -104,7 +104,8 @@ int _Jv_argc;
// Debugging options // Debugging options
static bool remoteDebug = false; static bool remoteDebug = false;
static char *jdwpOptions = ""; static char defaultJdwpOptions[] = "";
static char *jdwpOptions = defaultJdwpOptions;
// Argument support. // Argument support.
int int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment