This breaks all machines because the declared return type void disagrees with the implicit return type int (when I compile mach.c with clang). Unbreak i386, i80, i86, m68020, powerpc, vc4 by adding the return types to mach.c. We don't build any other machines; they are broken since commita46ee91(May 19, 2013) declared void prolog() and commitfd91851(Nov 10, 2016) declared void mes(), with both declarations in mach/proto/ncg/fillem.c. Also fix mach/vc4/ncg/mach.c where type full is long, so fprintf() must use "%ld" not "%d" to print full nlocals.
		
			
				
	
	
		
			45 lines
		
	
	
	
		
			942 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
	
		
			942 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
 | |
|  * See the copyright notice in the ACK home directory, in the file "Copyright".
 | |
|  */
 | |
| /* $Id$ */
 | |
| 
 | |
| struct regvar {
 | |
| 	struct regvar  *rv_next;
 | |
| 	long		rv_off;
 | |
| 	int		rv_size;
 | |
| 	int		rv_type;
 | |
| 	int		rv_score;
 | |
| 	int		rv_reg;
 | |
| };
 | |
| 
 | |
| struct regassigned {
 | |
| 	struct regvar  *ra_rv;
 | |
| 	int		ra_score;
 | |
| };
 | |
| 
 | |
| extern int nregvar[];
 | |
| extern struct regassigned *regassigned[];
 | |
| 
 | |
| struct regvar *linkreg(long, int, int, int);
 | |
| void tryreg(struct regvar *, int);
 | |
| void fixregvars(int);
 | |
| int isregvar(long);
 | |
| #ifdef REGLAP
 | |
| int isregvar_size(long, int);
 | |
| #endif
 | |
| int isregtyp(long);
 | |
| void unlinkregs(void);
 | |
| 
 | |
| #ifdef REGLAP
 | |
| #define PICK_REGVAR(off, size) isregvar_size(off, size)
 | |
| #else
 | |
| #define PICK_REGVAR(off, size) isregvar(off)
 | |
| #endif
 | |
| 
 | |
| /* machine dependent */
 | |
| int regscore(long, int, int, int, int);
 | |
| void i_regsave(void);
 | |
| void regsave(const char *, long, int);
 | |
| void f_regsave(void);
 | |
| void regreturn(void);
 |