Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7596 2007-03-28 21:05:53Z twisti $
-
*/
#include "config.h"
+
+#include <stdint.h>
+
#include "vm/types.h"
#include "vm/jit/i386/codegen.h"
*******************************************************************************/
-java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra)
+java_object_t *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra)
{
stackframeinfo sfi;
u1 *xpc;
- java_objectheader *o;
+ java_object_t *o;
functionptr f;
bool result;
- java_objectheader *e;
+ java_handle_t *e;
/* define the patcher function */
/* get stuff from the stack */
xpc = (u1 *) *((ptrint *) (sp + 6 * 4));
- o = (java_objectheader *) *((ptrint *) (sp + 4 * 4));
+ o = (java_object_t *) *((ptrint *) (sp + 4 * 4));
f = (functionptr) *((ptrint *) (sp + 0 * 4));
/* calculate and set the new return address */
/* patch the field value's address */
- *((ptrint *) (ra + 1)) = (ptrint) &(fi->value);
+ *((intptr_t *) (ra + 1)) = (intptr_t) fi->value;
return true;
}
*((ptrint *) (ra + 7 + 4)) = (ptrint) c;
- /* patch new function address */
-
- *((ptrint *) (ra + 7 + 8 + 2 + 3 + 4 + 1)) =
- (ptrint) BUILTIN_multianewarray;
-
return true;
}