Merge pull request #87 from davidgiven/dtrg-travis
Get clang working on travis.
This commit is contained in:
		
						commit
						b8cb840c12
					
				
					 6 changed files with 47 additions and 37 deletions
				
			
		| 
						 | 
				
			
			@ -20,5 +20,5 @@ matrix:
 | 
			
		|||
git:
 | 
			
		||||
    depth: 10
 | 
			
		||||
script:
 | 
			
		||||
    - make PREFIX=/tmp/acki +ack
 | 
			
		||||
    - make CC=$CC PREFIX=/tmp/acki +ack
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										5
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -22,9 +22,9 @@ PREFIX = $(INSDIR)
 | 
			
		|||
 | 
			
		||||
BUILDDIR = $(ACK_TEMP_DIR)/ack-build
 | 
			
		||||
 | 
			
		||||
# What build flags do you want to use?
 | 
			
		||||
# What build flags do you want to use for native code?
 | 
			
		||||
 | 
			
		||||
CFLAGS = -g
 | 
			
		||||
CFLAGS = -g -O -Wno-return-type
 | 
			
		||||
LDFLAGS = 
 | 
			
		||||
 | 
			
		||||
# Various commands.
 | 
			
		||||
| 
						 | 
				
			
			@ -120,6 +120,7 @@ $(build-file): first/ackbuilder.lua Makefile $(lua-files) $(our-lua)
 | 
			
		|||
		PREFIX=$(PREFIX) \
 | 
			
		||||
		AR=$(AR) \
 | 
			
		||||
		CC=$(CC) \
 | 
			
		||||
		CFLAGS="$(CFLAGS)" \
 | 
			
		||||
		> $(build-file)
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
vars.cflags = {
 | 
			
		||||
	"-g", "-O"
 | 
			
		||||
	"$(CFLAGS)"
 | 
			
		||||
}
 | 
			
		||||
vars.ackcflags = {
 | 
			
		||||
	"-O6"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -237,7 +237,6 @@ float_cst(str, sz, buf)
 | 
			
		|||
#endif /* USE_FLT */
 | 
			
		||||
 | 
			
		||||
#ifdef CODE_GENERATOR
 | 
			
		||||
void
 | 
			
		||||
con_float()
 | 
			
		||||
{
 | 
			
		||||
	char buf[8];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,8 +27,10 @@ int maxindex;
 | 
			
		|||
int regclass[NREGS];
 | 
			
		||||
struct perm* perms;
 | 
			
		||||
 | 
			
		||||
struct perm *
 | 
			
		||||
tuples(regls,nregneeded) rl_p *regls; {
 | 
			
		||||
void permute(int index);
 | 
			
		||||
 | 
			
		||||
struct perm* tuples(rl_p* regls, int nregneeded)
 | 
			
		||||
{
 | 
			
		||||
	int class = 0;
 | 
			
		||||
	register i, j;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -36,13 +38,16 @@ tuples(regls,nregneeded) rl_p *regls; {
 | 
			
		|||
	 * First compute equivalence classes of registers.
 | 
			
		||||
	 */
 | 
			
		||||
 | 
			
		||||
	for (i=0;i<NREGS;i++) {
 | 
			
		||||
	for (i = 0; i < NREGS; i++)
 | 
			
		||||
	{
 | 
			
		||||
		regclass[i] = class ++;
 | 
			
		||||
		if (getrefcount(i, FALSE) == 0) {
 | 
			
		||||
			for (j=0;j<i;j++) {
 | 
			
		||||
				if (eqregclass(i,j) &&
 | 
			
		||||
				    eqtoken(&machregs[i].r_contents,
 | 
			
		||||
					    &machregs[j].r_contents)) {
 | 
			
		||||
		if (getrefcount(i, FALSE) == 0)
 | 
			
		||||
		{
 | 
			
		||||
			for (j = 0; j < i; j++)
 | 
			
		||||
			{
 | 
			
		||||
				if (eqregclass(i, j) && eqtoken(&machregs[i].r_contents,
 | 
			
		||||
				                            &machregs[j].r_contents))
 | 
			
		||||
				{
 | 
			
		||||
					regclass[i] = regclass[j];
 | 
			
		||||
					break;
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			@ -61,20 +66,22 @@ tuples(regls,nregneeded) rl_p *regls; {
 | 
			
		|||
	return (perms);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
permute(index) {
 | 
			
		||||
void permute(int index)
 | 
			
		||||
{
 | 
			
		||||
	register struct perm* pp;
 | 
			
		||||
	register rl_p rlp;
 | 
			
		||||
	register i, j;
 | 
			
		||||
 | 
			
		||||
	if (index == maxindex) {
 | 
			
		||||
		for (pp=perms; pp != 0; pp=pp->p_next) {
 | 
			
		||||
	if (index == maxindex)
 | 
			
		||||
	{
 | 
			
		||||
		for (pp = perms; pp != 0; pp = pp->p_next)
 | 
			
		||||
		{
 | 
			
		||||
			for (i = 0; i < maxindex; i++)
 | 
			
		||||
				if (regclass[rar[i]] != regclass[pp->p_rar[i]])
 | 
			
		||||
					goto diff;
 | 
			
		||||
			for (i = 0; i < maxindex; i++)
 | 
			
		||||
				for (j = 0; j < i; j++)
 | 
			
		||||
					if (clash(rar[i],rar[j]) !=
 | 
			
		||||
					    clash(pp->p_rar[i],pp->p_rar[j]))
 | 
			
		||||
					if (clash(rar[i], rar[j]) != clash(pp->p_rar[i], pp->p_rar[j]))
 | 
			
		||||
						goto diff;
 | 
			
		||||
			return;
 | 
			
		||||
		diff:;
 | 
			
		||||
| 
						 | 
				
			
			@ -84,9 +91,12 @@ permute(index) {
 | 
			
		|||
		for (i = 0; i < maxindex; i++)
 | 
			
		||||
			pp->p_rar[i] = rar[i];
 | 
			
		||||
		perms = pp;
 | 
			
		||||
	} else {
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		rlp = lar[index];
 | 
			
		||||
		for (i=rlp->rl_n-1; i>=0; i--) {
 | 
			
		||||
		for (i = rlp->rl_n - 1; i >= 0; i--)
 | 
			
		||||
		{
 | 
			
		||||
			rar[index] = rlp->rl_list[i];
 | 
			
		||||
			permute(index + 1);
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,7 +83,7 @@ extern short em_ptyp[];
 | 
			
		|||
/* machine dependent */
 | 
			
		||||
void con_part(int, word);
 | 
			
		||||
void con_mult(word);
 | 
			
		||||
void con_float(void);
 | 
			
		||||
int con_float(void); /* actually returns void, but need K&R C compatibility */
 | 
			
		||||
void prolog(full nlocals);
 | 
			
		||||
void mes(word);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue