From 2dd0d0f81b58cd0e8be298f343b5229a649e3ffc Mon Sep 17 00:00:00 2001 From: carl Date: Mon, 25 Mar 2019 00:10:32 +0800 Subject: [PATCH] Add function prototypes. --- mach/6805/as/mach1.c | 2 ++ mach/6805/as/mach4.c | 5 ++++- mach/6805/as/mach5.c | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mach/6805/as/mach1.c b/mach/6805/as/mach1.c index 59e4829ed..2a5893ea8 100644 --- a/mach/6805/as/mach1.c +++ b/mach/6805/as/mach1.c @@ -11,3 +11,5 @@ extern int opt_cmos; #define fitj(z) ((unsigned)z + 0x80 <= 0xFF) + +void branch(register int opc,expr_t exp,expr_t cell); diff --git a/mach/6805/as/mach4.c b/mach/6805/as/mach4.c index c4019440b..0e906bb2a 100644 --- a/mach/6805/as/mach4.c +++ b/mach/6805/as/mach4.c @@ -31,7 +31,10 @@ operation { emit1($1);} | BRANCH expr - { branch($1,$2);} + { + /* Empty expression */ + struct expr_t expr = {0,0}; + branch($1,$2,expr);} | BBRANCH bitexp ',' expr8 ',' expr { diff --git a/mach/6805/as/mach5.c b/mach/6805/as/mach5.c index 630d25aab..223bdbf3d 100644 --- a/mach/6805/as/mach5.c +++ b/mach/6805/as/mach5.c @@ -9,8 +9,9 @@ */ /* VARARGS2 */ -branch(opc,exp,cell) register opc; expr_t cell; expr_t exp; { - register sm, dist; +void branch(register int opc,expr_t exp,expr_t cell) +{ + register int sm, dist; int saving; dist = exp.val - (DOTVAL + 2);