Changes: Christian Ullrich
- $Id: md-abi.c 4357 2006-01-22 23:33:38Z twisti $
+ $Id: md-abi.c 5114 2006-07-12 14:53:28Z twisti $
*/
#include "vm/descriptor.h"
#include "vm/global.h"
+#include "vm/jit/abi.h"
/* register descripton array **************************************************/
md->memuse = stacksize;
}
+
/* md_return_alloc *************************************************************
- Precolor the Java Stackelement containing the Return Value. Since mips
- has a dedicated return register (not an reused arg or reserved reg), this
- is striaghtforward possible, as long, as this stackelement does not have to
- survive a method invokation (SAVEDVAR)
-
---- in
-m: Methodinfo of current method
-return_type: Return Type of the Method (TYPE_INT.. TYPE_ADR)
- TYPE_VOID is not allowed!
-stackslot: Java Stackslot to contain the Return Value
-
---- out
-if precoloring was possible:
-stackslot->varkind =ARGVAR
- ->varnum =-1
- ->flags =0
- ->regoff =[REG_RESULT, REG_FRESULT]
-
+ Precolor the Java Stackelement containing the Return Value. Since
+ mips has a dedicated return register (not an reused arg or reserved
+ reg), this is striaghtforward possible, as long, as this
+ stackelement does not have to survive a method invokation
+ (SAVEDVAR)
+
+ --- in
+ m: Methodinfo of current method
+ return_type: Return Type of the Method (TYPE_INT.. TYPE_ADR)
+ TYPE_VOID is not allowed!
+ stackslot: Java Stackslot to contain the Return Value
+
+ --- out
+ if precoloring was possible:
+ stackslot->varkind =ARGVAR
+ ->varnum =-1
+ ->flags =0
+ ->regoff =[REG_RESULT, REG_FRESULT]
*******************************************************************************/
-void md_return_alloc(methodinfo *m, registerdata *rd, s4 return_type,
- stackptr stackslot) {
- /* Only precolor the stackslot, if it is not a SAVEDVAR <-> has not */
- /* to survive method invokations */
+
+void md_return_alloc(jitdata *jd, stackptr stackslot)
+{
+ methodinfo *m;
+ methoddesc *md;
+
+ /* get required compiler data */
+
+ m = jd->m;
+
+ md = m->parseddesc;
+
+ /* Only precolor the stackslot, if it is not a SAVEDVAR <-> has
+ not to survive method invokations. */
+
if (!(stackslot->flags & SAVEDVAR)) {
stackslot->varkind = ARGVAR;
- stackslot->varnum = -1;
- stackslot->flags = 0;
- if ( IS_INT_LNG_TYPE(return_type) ) {
+ stackslot->varnum = -1;
+ stackslot->flags = 0;
+
+ if (IS_INT_LNG_TYPE(md->returntype.type))
stackslot->regoff = REG_RESULT;
- } else { /* float/double */
+ else
stackslot->regoff = REG_FRESULT;
- }
}
}
+
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where