* src/vm/jit/arm/codegen.c: Fixed use of uninitialized variable.
authorStefan Ring <stefan@complang.tuwien.ac.at>
Fri, 14 Oct 2011 21:20:34 +0000 (23:20 +0200)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Fri, 14 Oct 2011 21:20:34 +0000 (23:20 +0200)
src/vm/jit/arm/codegen.c

index bffb32709fe744278351f9f969c090375a8ab0b7..f96ee749c441bcf2d081eb4fab84f6121053786f 100644 (file)
@@ -248,6 +248,7 @@ void codegen_emit_instruction(jitdata* jd, instruction* iptr)
 {
        varinfo*            var;
        builtintable_entry* bte;
 {
        varinfo*            var;
        builtintable_entry* bte;
+       methoddesc*         md;
        methodinfo*         lm;             // Local methodinfo for ICMD_INVOKE*.
        unresolved_method*  um;
        fieldinfo*          fi;
        methodinfo*         lm;             // Local methodinfo for ICMD_INVOKE*.
        unresolved_method*  um;
        fieldinfo*          fi;
@@ -1693,6 +1694,7 @@ void codegen_emit_instruction(jitdata* jd, instruction* iptr)
 
                case ICMD_BUILTIN:
                        bte = iptr->sx.s23.s3.bte;
 
                case ICMD_BUILTIN:
                        bte = iptr->sx.s23.s3.bte;
+                       md = bte->md;
                        if (bte->stub == NULL) {
                                disp = dseg_add_functionptr(cd, bte->fp);
                        } else {
                        if (bte->stub == NULL) {
                                disp = dseg_add_functionptr(cd, bte->fp);
                        } else {
@@ -1707,6 +1709,8 @@ void codegen_emit_instruction(jitdata* jd, instruction* iptr)
                        M_MOV(REG_PC, REG_PV);
 
 #if !defined(__SOFTFP__)
                        M_MOV(REG_PC, REG_PV);
 
 #if !defined(__SOFTFP__)
+                       d = md->returntype.type;
+
                        /* TODO: this is only a hack, since we use R0/R1 for float
                           return!  this depends on gcc; it is independent from
                           our ENABLE_SOFTFLOAT define */
                        /* TODO: this is only a hack, since we use R0/R1 for float
                           return!  this depends on gcc; it is independent from
                           our ENABLE_SOFTFLOAT define */