Changed some identifier names (ANSI C, Ultrix ...)
This commit is contained in:
		
							parent
							
								
									bb31795d33
								
							
						
					
					
						commit
						87385c49e4
					
				
					 3 changed files with 21 additions and 20 deletions
				
			
		|  | @ -10,7 +10,7 @@ | |||
| 
 | ||||
| /* Een constraint-function */ | ||||
| 
 | ||||
| const( arg) | ||||
| cst( arg) | ||||
| struct t_operand *arg; | ||||
| { | ||||
| 	return( arg->type == CONST); | ||||
|  | @ -22,12 +22,12 @@ struct t_operand *arg; | |||
| 
 | ||||
| /*    decode_operand() recognizes the follwing assembly-argumnets:
 | ||||
|   | ||||
| 	$const   		: CONST | ||||
| 	$cst 	  		: CONST | ||||
| 	register		: REGISTER | ||||
| 	-(register)		: AUTO_DEC | ||||
| 	(register)+		: AUTO_INC | ||||
|         (register)		: REG_DEF | ||||
| 	index(register)         : IND_REG | ||||
| 	indx(register)          : IND_REG | ||||
| 	label+offset		: LABEL | ||||
| 	label[b|f]		: L_ILB | ||||
|  */ | ||||
|  | @ -69,7 +69,7 @@ register struct t_operand *op; | |||
| 
 | ||||
| 	if  ( arg[0] == '~' ) { | ||||
| 		op->type = CONST; | ||||
| 		op->const = arg+1; | ||||
| 		op->cst = arg+1; | ||||
| 	} | ||||
| 	else if ( is_reg( arg, &(op->num)) ) { | ||||
| 		op->type = REGISTER; | ||||
|  | @ -97,7 +97,7 @@ register struct t_operand *op; | |||
| 			op->type = IND_REG; | ||||
| 			arg = ind( ind_buf[ n_index], arg); | ||||
| 			if ( is_reg( arg+1, &(op->num))) | ||||
| 				op->index = ind_buf[ n_index]; | ||||
| 				op->indx = ind_buf[ n_index]; | ||||
| 			else | ||||
| 				fprint( STDERR, "unknown argtype %s\n", arg); | ||||
| 		} | ||||
|  | @ -214,19 +214,19 @@ register struct t_operand *op; | |||
| { | ||||
| 	switch( op->type) { | ||||
| 		case CONST : | ||||
| 				if (isdigit(op->const[0])) { | ||||
| 				if (isdigit(op->cst[0])) { | ||||
| 					long l, atol(); | ||||
| 					l = atol(op->const); | ||||
| 					l = atol(op->cst); | ||||
| 					if (fit_6bits(l)) { | ||||
| 						@text1(%$(op->const)); | ||||
| 						@text1(%$(op->cst)); | ||||
| 					} | ||||
| 					else { | ||||
| 						@text1( 0x8f); | ||||
| 						@text4( %$(op->const)); | ||||
| 						@text4( %$(op->cst)); | ||||
| 					} | ||||
| 				} | ||||
| 				else { | ||||
| 					@__as_const(%$(op->const)); | ||||
| 					@__as_const(%$(op->cst)); | ||||
| 				} | ||||
| 				break; | ||||
| 		case REGISTER: 	@text1( %d(0x50 | op->num)); | ||||
|  | @ -238,22 +238,22 @@ register struct t_operand *op; | |||
| 		case AUTO_INC : @text1( %d(0x80 | op->num)); | ||||
| 			  	break; | ||||
| 		case IND_REG : | ||||
| 				if (isdigit(op->index[0])) { | ||||
| 				if (isdigit(op->indx[0])) { | ||||
| 					long l, atol(); | ||||
| 					l = atol(op->index); | ||||
| 					l = atol(op->indx); | ||||
| 					if (fit_byte(l)) { | ||||
| 						@text1( %d(0xa0 | op->num)); | ||||
| 			  			@text1( %$(op->index)); | ||||
| 			  			@text1( %$(op->indx)); | ||||
| 					} else if (fit_word(l)) { | ||||
| 						@text1( %d(0xc0 | op->num)); | ||||
| 			  			@text2( %$(op->index)); | ||||
| 			  			@text2( %$(op->indx)); | ||||
| 					} else { | ||||
| 						@text1( %d(0xe0 | op->num)); | ||||
| 			  			@text4( %$(op->index)); | ||||
| 			  			@text4( %$(op->indx)); | ||||
| 					} | ||||
| 				} | ||||
| 				else { | ||||
| 					@__as_indexed(%$(op->index) , %d(op->num)); | ||||
| 					@__as_indexed(%$(op->indx) , %d(op->num)); | ||||
| 				} | ||||
| 				break; | ||||
| 		case LABEL : 	@text1( 0xef); | ||||
|  |  | |||
|  | @ -21,7 +21,8 @@ | |||
| 
 | ||||
| struct t_operand { | ||||
| 		int type, num; | ||||
| 		char *lab, *index, *const, *offset; | ||||
| 		char *lab, *indx, *cst, *offset; | ||||
| 		/* Changed names of identifiers "index" and "const" */ | ||||
| 	}; | ||||
| 
 | ||||
| #define fit_6bits(val)		((unsigned long)(val) < 64) | ||||
|  |  | |||
|  | @ -107,9 +107,9 @@ br 	l_ilb		==> | |||
| 			@text1( 0x11); | ||||
| 			gen_operand( l_ilb). | ||||
| 
 | ||||
| calls	n : const , pro	==> | ||||
| calls	n : cst , pro	==> | ||||
| 			@text1( 0xfb); | ||||
| 			@text1( %$(n->const)); | ||||
| 			@text1( %$(n->cst)); | ||||
| 			gen_operand( pro). | ||||
| 
 | ||||
| clrl 	src		==> | ||||
|  | @ -217,7 +217,7 @@ movl	src, dst	==> | |||
| 			gen_operand( src); | ||||
| 			gen_operand( dst). | ||||
| 
 | ||||
| movq	src : const, dst	==> | ||||
| movq	src : cst, dst	==> | ||||
| 			@text1( 0x7d); | ||||
| 			gen_operand( src); | ||||
| 			@text4( 0); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue