From f161a5867dbc4058181d597e2019f03625945e14 Mon Sep 17 00:00:00 2001 From: carl Date: Mon, 25 Mar 2019 00:13:56 +0800 Subject: [PATCH] Add function prototypes. --- mach/s2650/as/mach1.c | 6 ++++++ mach/s2650/as/mach5.c | 31 ++++++++++++------------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/mach/s2650/as/mach1.c b/mach/s2650/as/mach1.c index 45b838ab2..f6667aed3 100644 --- a/mach/s2650/as/mach1.c +++ b/mach/s2650/as/mach1.c @@ -22,3 +22,9 @@ extern expr_t par_exp; extern unsigned p_indirect; extern int p_indexed; + +void page(void); +void pag2(void); +void rela(expr_t exp,int ind); +void absoa(expr_t exp, int ix, unsigned int ind); +void absob(expr_t exp, unsigned int ind); diff --git a/mach/s2650/as/mach5.c b/mach/s2650/as/mach5.c index d77662555..8a74101e6 100644 --- a/mach/s2650/as/mach5.c +++ b/mach/s2650/as/mach5.c @@ -12,22 +12,20 @@ #define MASK1 0x1FFF #define MASK2 0x1FFE -page() - { +void page(void) +{ if(((DOTVAL - 1) & MASK1) == MASK1) serror("page violation"); - } +} -pag2() - { +void pag2(void) +{ if(((DOTVAL - 1) & MASK1) >= MASK2) serror("page violation"); - } +} -rela(exp,ind) -expr_t exp; -int ind; - { +void rela(expr_t exp,int ind) +{ int c, d; page(); if(pass == PASS_3){ @@ -58,11 +56,8 @@ int ind; emit1(low7(c) | ind); } -absoa(exp, ix, ind) -expr_t exp; -int ix; -unsigned ind; - { +void absoa(expr_t exp, int ix, unsigned int ind) +{ pag2(); #ifdef ASLD if(pass == PASS_3 && (exp.val & MASK) != (DOTVAL & MASK)) @@ -74,10 +69,8 @@ unsigned ind; emit2(low13(exp.val) | ind | ix); } -absob(exp, ind) -expr_t exp; -unsigned ind; - { +void absob(expr_t exp, unsigned int ind) +{ pag2(); #ifdef ASLD if (exp.val < 0)