* src/vm/jit/powerpc/md.c (md_get_method_patch_address): Return NULL
authoredwin <none@none>
Thu, 7 Dec 2006 22:45:09 +0000 (22:45 +0000)
committeredwin <none@none>
Thu, 7 Dec 2006 22:45:09 +0000 (22:45 +0000)
if no mptr was specified and the call is dynamically dispatched.
* src/vm/jit/sparc64/md.c: Likewise.
* src/vm/jit/alpha/md.c: Likewise.
* src/vm/jit/mips/md.c: Likewise.
* src/vm/jit/i386/md.c: Likewise.
* src/vm/jit/powerpc64/md.c: Likewise.
* src/vm/jit/x86_64/md.c: Likewise.

src/vm/jit/alpha/md.c
src/vm/jit/i386/md.c
src/vm/jit/mips/md.c
src/vm/jit/powerpc/md.c
src/vm/jit/powerpc64/md.c
src/vm/jit/sparc64/md.c
src/vm/jit/x86_64/md.c

index e6e94bccc7d6f012d174f0092a3c2ac1efdf289e..621f336d9b0c38cb7e5497c5be9b1ca21aef76b5 100644 (file)
@@ -30,7 +30,7 @@
             Christian Thalinger
             Edwin Steiner
 
-   $Id: md.c 5948 2006-11-11 16:56:48Z twisti $
+   $Id: md.c 6140 2006-12-07 22:45:09Z edwin $
 
 */
 
@@ -223,6 +223,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
                if ((mcode >> 16) == 0xa77c) {
                        /* in this case we use the passed method pointer */
 
+                       /* return NULL if no mptr was specified (used for replacement) */
+
+                       if (mptr == NULL)
+                               return NULL;
+
                        pa = mptr + offset;
 
                } else {
index ee91233b3abc39f744bc1f5d48995dd7b6f12796..47a9ddf6a1db1fee4a2ba24cc5d857cf98b8e019 100644 (file)
@@ -27,7 +27,7 @@
    Authors: Christian Thalinger
             Edwin Steiner
 
-   $Id: md.c 5962 2006-11-12 13:39:50Z edwin $
+   $Id: md.c 6140 2006-12-07 22:45:09Z edwin $
 
 */
 
@@ -159,6 +159,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
        else if (mcode == 0xd2) {
                /* INVOKEVIRTUAL/INTERFACE */
 
+               /* return NULL if no mptr was specified (used for replacement) */
+
+               if (mptr == NULL)
+                       return NULL;
+
                /* Get the offset from the instruction (the offset address is
                   4-bytes before the call instruction). */
 
index 1af596c33e6346c1967fccaf69bd1abc770fbeed..a9657b29b76f8a804b2b83c381e5c7706f4b4ea4 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: md.c 5929 2006-11-06 17:13:40Z twisti $
+   $Id: md.c 6140 2006-12-07 22:45:09Z edwin $
 
 */
 
@@ -209,6 +209,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
 #endif
                        /* in this case we use the passed method pointer */
 
+                       /* return NULL if no mptr was specified (used for replacement) */
+
+                       if (mptr == NULL)
+                               return NULL;
+
                        pa = mptr + offset;
                }
                else {
index 8489e223712dfed16d01c252584084dd5b18d304..c7c3057378b66470f86c42156f423133ddeb3507 100644 (file)
@@ -27,7 +27,7 @@
    Authors: Christian Thalinger
             Edwin Steiner
 
-   $Id: md.c 5942 2006-11-09 10:52:34Z twisti $
+   $Id: md.c 6140 2006-12-07 22:45:09Z edwin $
 
 */
 
@@ -211,6 +211,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
                } else if ((mcode >> 16) == 0x81ac) {
                        /* in this case we use the passed method pointer */
 
+                       /* return NULL if no mptr was specified (used for replacement) */
+
+                       if (mptr == NULL)
+                               return NULL;
+
                        pa = mptr + offset;
 
                } else {
index 54207d22ec0ca45b68c3f9163ca4aa04655da7fe..9be78bda852e8765d6fc952a1ac3169ece88f1b4 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: md.c 5940 2006-11-09 09:59:28Z tbfg $
+   $Id: md.c 6140 2006-12-07 22:45:09Z edwin $
 
 */
 
@@ -199,6 +199,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
                } else if ((mcode >> 16) == 0xe9cc) { 
                        /* in this case we use the passed method pointer */
 
+                       /* return NULL if no mptr was specified (used for replacement) */
+
+                       if (mptr == NULL)
+                               return NULL;
+
                        pa = mptr + offset;
 
                } else {
index f4f356d406dd40045018d231ae7cf4552bd99b67..d01a4d83fbfe3a6638b34a39d76275878d4fd2e9 100644 (file)
@@ -274,6 +274,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
                if (mcode_masked == 0x0602c5) {
                        /* in this case we use the passed method pointer */
 
+                       /* return NULL if no mptr was specified (used for replacement) */
+
+                       if (mptr == NULL)
+                               return NULL;
+
                        pa = mptr + offset;
 
                } else {
index 05972fb8ef4a166bd8d46ca2d66e669d7306ff27..24bde0f70bbc5e192137b8024823885819dd30e3 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: md.c 5944 2006-11-10 12:32:01Z twisti $
+   $Id: md.c 6140 2006-12-07 22:45:09Z edwin $
 
 */
 
@@ -291,6 +291,11 @@ u1 *md_get_method_patch_address(u1 *ra, stackframeinfo *sfi, u1 *mptr)
        else if (mcode == 0xd3) {
                /* INVOKEVIRTUAL/INTERFACE */
 
+               /* return NULL if no mptr was specified (used for replacement) */
+
+               if (mptr == NULL)
+                       return NULL;
+
                /* Get the offset from the instruction (the offset address is
                   4-bytes before the call instruction). */