Changed some identifier names (ANSI C, Ultrix ...)

This commit is contained in:
ceriel 1991-02-20 09:51:07 +00:00
parent bb31795d33
commit 87385c49e4
3 changed files with 21 additions and 20 deletions

View file

@ -10,7 +10,7 @@
/* Een constraint-function */ /* Een constraint-function */
const( arg) cst( arg)
struct t_operand *arg; struct t_operand *arg;
{ {
return( arg->type == CONST); return( arg->type == CONST);
@ -22,12 +22,12 @@ struct t_operand *arg;
/* decode_operand() recognizes the follwing assembly-argumnets: /* decode_operand() recognizes the follwing assembly-argumnets:
$const : CONST $cst : CONST
register : REGISTER register : REGISTER
-(register) : AUTO_DEC -(register) : AUTO_DEC
(register)+ : AUTO_INC (register)+ : AUTO_INC
(register) : REG_DEF (register) : REG_DEF
index(register) : IND_REG indx(register) : IND_REG
label+offset : LABEL label+offset : LABEL
label[b|f] : L_ILB label[b|f] : L_ILB
*/ */
@ -69,7 +69,7 @@ register struct t_operand *op;
if ( arg[0] == '~' ) { if ( arg[0] == '~' ) {
op->type = CONST; op->type = CONST;
op->const = arg+1; op->cst = arg+1;
} }
else if ( is_reg( arg, &(op->num)) ) { else if ( is_reg( arg, &(op->num)) ) {
op->type = REGISTER; op->type = REGISTER;
@ -97,7 +97,7 @@ register struct t_operand *op;
op->type = IND_REG; op->type = IND_REG;
arg = ind( ind_buf[ n_index], arg); arg = ind( ind_buf[ n_index], arg);
if ( is_reg( arg+1, &(op->num))) if ( is_reg( arg+1, &(op->num)))
op->index = ind_buf[ n_index]; op->indx = ind_buf[ n_index];
else else
fprint( STDERR, "unknown argtype %s\n", arg); fprint( STDERR, "unknown argtype %s\n", arg);
} }
@ -214,19 +214,19 @@ register struct t_operand *op;
{ {
switch( op->type) { switch( op->type) {
case CONST : case CONST :
if (isdigit(op->const[0])) { if (isdigit(op->cst[0])) {
long l, atol(); long l, atol();
l = atol(op->const); l = atol(op->cst);
if (fit_6bits(l)) { if (fit_6bits(l)) {
@text1(%$(op->const)); @text1(%$(op->cst));
} }
else { else {
@text1( 0x8f); @text1( 0x8f);
@text4( %$(op->const)); @text4( %$(op->cst));
} }
} }
else { else {
@__as_const(%$(op->const)); @__as_const(%$(op->cst));
} }
break; break;
case REGISTER: @text1( %d(0x50 | op->num)); case REGISTER: @text1( %d(0x50 | op->num));
@ -238,22 +238,22 @@ register struct t_operand *op;
case AUTO_INC : @text1( %d(0x80 | op->num)); case AUTO_INC : @text1( %d(0x80 | op->num));
break; break;
case IND_REG : case IND_REG :
if (isdigit(op->index[0])) { if (isdigit(op->indx[0])) {
long l, atol(); long l, atol();
l = atol(op->index); l = atol(op->indx);
if (fit_byte(l)) { if (fit_byte(l)) {
@text1( %d(0xa0 | op->num)); @text1( %d(0xa0 | op->num));
@text1( %$(op->index)); @text1( %$(op->indx));
} else if (fit_word(l)) { } else if (fit_word(l)) {
@text1( %d(0xc0 | op->num)); @text1( %d(0xc0 | op->num));
@text2( %$(op->index)); @text2( %$(op->indx));
} else { } else {
@text1( %d(0xe0 | op->num)); @text1( %d(0xe0 | op->num));
@text4( %$(op->index)); @text4( %$(op->indx));
} }
} }
else { else {
@__as_indexed(%$(op->index) , %d(op->num)); @__as_indexed(%$(op->indx) , %d(op->num));
} }
break; break;
case LABEL : @text1( 0xef); case LABEL : @text1( 0xef);

View file

@ -21,7 +21,8 @@
struct t_operand { struct t_operand {
int type, num; 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) #define fit_6bits(val) ((unsigned long)(val) < 64)

View file

@ -107,9 +107,9 @@ br l_ilb ==>
@text1( 0x11); @text1( 0x11);
gen_operand( l_ilb). gen_operand( l_ilb).
calls n : const , pro ==> calls n : cst , pro ==>
@text1( 0xfb); @text1( 0xfb);
@text1( %$(n->const)); @text1( %$(n->cst));
gen_operand( pro). gen_operand( pro).
clrl src ==> clrl src ==>
@ -217,7 +217,7 @@ movl src, dst ==>
gen_operand( src); gen_operand( src);
gen_operand( dst). gen_operand( dst).
movq src : const, dst ==> movq src : cst, dst ==>
@text1( 0x7d); @text1( 0x7d);
gen_operand( src); gen_operand( src);
@text4( 0); @text4( 0);