From ee04be4c5ad34ee4806f5761c26644b6d60ca2c3 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Thu, 22 Jan 2015 17:44:45 -0800 Subject: [PATCH] Clarify pointers returning from functions --- src/toolsrc/parse.c | 4 +++- src/toolsrc/sb.pla | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/toolsrc/parse.c b/src/toolsrc/parse.c index 5ea5780..7bdc57c 100755 --- a/src/toolsrc/parse.c +++ b/src/toolsrc/parse.c @@ -692,7 +692,9 @@ int parse_value(int rvalue) { if (type & PTR_TYPE) { - if (type & LOCAL_TYPE) + if (type & FUNC_TYPE) + emit_call(value, ref_type); + else if (type & LOCAL_TYPE) (type & BYTE_TYPE) ? emit_llb(value + ref_offset) : emit_llw(value + ref_offset); else (type & BYTE_TYPE) ? emit_lab(value, ref_offset, ref_type) : emit_law(value, ref_offset, ref_type); diff --git a/src/toolsrc/sb.pla b/src/toolsrc/sb.pla index 2634989..eb18bf4 100644 --- a/src/toolsrc/sb.pla +++ b/src/toolsrc/sb.pla @@ -3406,7 +3406,9 @@ def parse_value(rvalue) emit_const(value) elsif type & ADDR_TYPE if type & PTR_TYPE - if type & LOCAL_TYPE + if type & FUNC_TYPE + emit_call(value) + elsif type & LOCAL_TYPE if type & BYTE_TYPE emit_llb(value + ref_offset) else