deleted FORMAT, fixed con_float
This commit is contained in:
		
							parent
							
								
									decfd1ce9c
								
							
						
					
					
						commit
						9e72c25a0f
					
				
					 2 changed files with 11 additions and 7 deletions
				
			
		|  | @ -68,6 +68,11 @@ con_float() { | ||||||
| 		f = -f; | 		f = -f; | ||||||
| 		sign = 1; | 		sign = 1; | ||||||
| 	} | 	} | ||||||
|  | 	if (f == 0) { | ||||||
|  | 		if (argval == 8) fprintf(codefile, ".data2 0, 0\n"); | ||||||
|  | 		fprintf(codefile, ".data2 0, 0\n"); | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
| 	while (f < 0.5) { | 	while (f < 0.5) { | ||||||
| 		f += f; | 		f += f; | ||||||
| 		i --; | 		i --; | ||||||
|  |  | ||||||
|  | @ -56,7 +56,6 @@ EM_PSIZE=2 | ||||||
| EM_BSIZE=SL | EM_BSIZE=SL | ||||||
| 
 | 
 | ||||||
| TIMEFACTOR= 1/300 | TIMEFACTOR= 1/300 | ||||||
| FORMAT="0%lo" |  | ||||||
| 
 | 
 | ||||||
| REGISTERS: | REGISTERS: | ||||||
| r0      = ("r0", 2), REG. | r0      = ("r0", 2), REG. | ||||||
|  | @ -106,7 +105,7 @@ ADDR_EXTERNAL   = {STRING ind;} 2 cost=(2,300)  "$%[ind]" | ||||||
|  * Now mostly addressing modes of target machine        * |  * Now mostly addressing modes of target machine        * | ||||||
|  ********************************************************/ |  ********************************************************/ | ||||||
| 
 | 
 | ||||||
| regdef2 =       {REGISTER reg;} 2 cost=(0,300) "*%[reg]" | regdef2 =       {REGISTER reg;} 2 cost=(0,300) "(%[reg])" | ||||||
| regind2 =       {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])" | regind2 =       {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])" | ||||||
| reginddef2 =    {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])" | reginddef2 =    {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])" | ||||||
| regconst2 =     {REGISTER reg; STRING ind;} 2 | regconst2 =     {REGISTER reg; STRING ind;} 2 | ||||||
|  | @ -116,7 +115,7 @@ regconst2 =     {REGISTER reg; STRING ind;} 2 | ||||||
|  ********************************************************/ |  ********************************************************/ | ||||||
| relative2 =     {STRING ind;} 2 cost=(2,600) "%[ind]" | relative2 =     {STRING ind;} 2 cost=(2,600) "%[ind]" | ||||||
| reldef2 =       {STRING ind;} 2 cost=(2,1050) "*%[ind]" | reldef2 =       {STRING ind;} 2 cost=(2,1050) "*%[ind]" | ||||||
| regdef1 =       {REGISTER reg;} 2 cost=(0,300) "*%[reg]" | regdef1 =       {REGISTER reg;} 2 cost=(0,300) "(%[reg])" | ||||||
| regind1 =       {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])" | regind1 =       {REGISTER reg; STRING ind;} 2 cost=(2,600) "%[ind](%[reg])" | ||||||
| reginddef1 =    {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])" | reginddef1 =    {REGISTER reg; STRING ind;} 2 cost=(2,1050) "*%[ind](%[reg])" | ||||||
| relative1 =     {STRING ind;} 2 cost=(2,600) "%[ind]" | relative1 =     {STRING ind;} 2 cost=(2,600) "%[ind]" | ||||||
|  | @ -136,8 +135,8 @@ ftolong =	{REGISTER reg;} 4 | ||||||
| 
 | 
 | ||||||
| regind4 =       {REGISTER reg; STRING ind; } 4 cost=(2,3630) "%[ind](%[reg])" | regind4 =       {REGISTER reg; STRING ind; } 4 cost=(2,3630) "%[ind](%[reg])" | ||||||
| relative4 =     {STRING ind; } 4 cost=(2,3630) "%[ind]" | relative4 =     {STRING ind; } 4 cost=(2,3630) "%[ind]" | ||||||
| regdef4 =       {REGISTER reg;} 4 cost=(2,3240) "*%[reg]" | regdef4 =       {REGISTER reg;} 4 cost=(2,3240) "(%[reg])" | ||||||
| regdef8 =       {REGISTER reg;} 8 cost=(2,5220) "*%[reg]" | regdef8 =       {REGISTER reg;} 8 cost=(2,5220) "(%[reg])" | ||||||
| relative8 =     {STRING ind; } 8 cost=(2,5610) "%[ind]" | relative8 =     {STRING ind; } 8 cost=(2,5610) "%[ind]" | ||||||
| regind8 =       {REGISTER reg; STRING ind;} 8 cost=(2,5610) "%[ind](%[reg])" | regind8 =       {REGISTER reg; STRING ind;} 8 cost=(2,5610) "%[ind](%[reg])" | ||||||
| 
 | 
 | ||||||
|  | @ -1749,12 +1748,12 @@ lae aar $2==2 && rom(1,3)==8 && rom(1,1)!=0 | SCR_REG | | ||||||
| 			erase(%[1])                             |  | 			erase(%[1])                             |  | ||||||
| 					{regconst2,%[1],tostring((0-8)*rom(1,1))}  | | 					{regconst2,%[1],tostring((0-8)*rom(1,1))}  | | ||||||
| 					adi 2 | | 					adi 2 | | ||||||
| lae aar $2==2 && rom(1,1)==0 | SCR_ODD_REG | | lae aar $2==2 && rom(1,1)==0 && defined(rom(1,3)) | SCR_ODD_REG | | ||||||
| 			"mul $$%(rom(1,3)%),%[1]" | 			"mul $$%(rom(1,3)%),%[1]" | ||||||
| 			erase(%[1])                             |  | 			erase(%[1])                             |  | ||||||
| 					%[1]  | | 					%[1]  | | ||||||
| 					adi 2 | | 					adi 2 | | ||||||
| lae aar $2==2 && defined(rom(1,1)) | SCR_ODD_REG | | lae aar $2==2 && defined(rom(1,3)) | SCR_ODD_REG | | ||||||
| 			"mul $$%(rom(1,3)%),%[1]" | 			"mul $$%(rom(1,3)%),%[1]" | ||||||
| 			erase(%[1])                             |  | 			erase(%[1])                             |  | ||||||
| 					{regconst2,%[1],tostring((0-rom(1,3))*rom(1,1))}  | | 					{regconst2,%[1],tostring((0-rom(1,3))*rom(1,1))}  | | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue