- {
- operand *opr = operandFromValue (args);
- operand *opl;
- symbol *sym = OP_SYMBOL (opr);
- iCode *ic;
-
- /* we will use it after all optimizations
- and before liveRange calculation */
- if (!sym->addrtaken && !IS_VOLATILE (sym->etype))
- {
-
- if ((IN_FARSPACE (SPEC_OCLS (sym->etype)) && !TARGET_IS_HC08) &&
- options.stackAuto == 0 &&
- (!(options.model == MODEL_FLAT24)) )
- {
- }
- else
- {
- opl = newiTempOperand (args->type, 0);
- sym->reqv = opl;
- sym->reqv->key = sym->key;
- OP_SYMBOL (sym->reqv)->key = sym->key;
- OP_SYMBOL (sym->reqv)->isreqv = 1;
- OP_SYMBOL (sym->reqv)->islocal = 0;
- SPIL_LOC (sym->reqv) = sym;
- }
- }
-
- ic = newiCode (RECEIVE, NULL, NULL);
- ic->argreg = SPEC_ARGREG(args->etype);
- if (first) {
- currFunc->recvSize = getSize (sym->type);
- first = 0;
- }
- IC_RESULT (ic) = opr;
-
- /* misuse of parmBytes (normally used for functions)
- * to save estimated stack position of this argument.
- * Normally this should be zero for RECEIVE iCodes.
- * No idea if this causes side effects on other ports. - dw
- */
- ic->parmBytes = paramByteCounter;
-
- /* what stack position do we have? */
- paramByteCounter += getSize (sym->type);
-
- ADDTOCHAIN (ic);
- }
+ {
+ operand *opr = operandFromValue (args);
+ operand *opl;
+ symbol *sym = OP_SYMBOL (opr);
+ iCode *ic;
+
+ /* we will use it after all optimizations
+ and before liveRange calculation */
+ if (!sym->addrtaken && !IS_VOLATILE (sym->etype))
+ {
+
+ if ((IN_FARSPACE (SPEC_OCLS (sym->etype)) && !TARGET_IS_HC08) &&
+ options.stackAuto == 0 &&
+ (!(options.model == MODEL_FLAT24)) )
+ {
+ }
+ else
+ {
+ opl = newiTempOperand (args->type, 0);
+ sym->reqv = opl;
+ sym->reqv->key = sym->key;
+ OP_SYMBOL (sym->reqv)->key = sym->key;
+ OP_SYMBOL (sym->reqv)->isreqv = 1;
+ OP_SYMBOL (sym->reqv)->islocal = 0;
+ SPIL_LOC (sym->reqv) = sym;
+ }
+ }
+
+ ic = newiCode (RECEIVE, func, NULL);
+ ic->argreg = SPEC_ARGREG(args->etype);
+ if (ic->argreg == 1) {
+ currFunc->recvSize = getSize (sym->type);
+ }
+ IC_RESULT (ic) = opr;
+
+ /* misuse of parmBytes (normally used for functions)
+ * to save estimated stack position of this argument.
+ * Normally this should be zero for RECEIVE iCodes.
+ * No idea if this causes side effects on other ports. - dw
+ */
+ ic->parmBytes = paramByteCounter;
+
+ /* what stack position do we have? */
+ paramByteCounter += getSize (sym->type);
+
+ ADDTOCHAIN (ic);
+ }