adapted to no longer need an as.h file
This commit is contained in:
parent
945cceccb5
commit
8ae2077591
1 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
#include "em_decl.h"
|
#include "em_decl.h"
|
||||||
#include "as.h"
|
|
||||||
|
|
||||||
/* This file contains the assemble routine that generates assembly code.
|
/* This file contains the assemble routine that generates assembly code.
|
||||||
* As 'str' is in assembly format this is a easy job. Only operands
|
* As 'str' is in assembly format this is a easy job. Only operands
|
||||||
|
@ -32,8 +31,9 @@ char *str;
|
||||||
else {
|
else {
|
||||||
nr = atoi( str+1) - 1;
|
nr = atoi( str+1) - 1;
|
||||||
*b_ptr = '\0';
|
*b_ptr = '\0';
|
||||||
out( "%s%s\", %s);", buf,
|
out( "%s%s\", %s%s);", buf,
|
||||||
arg_format( nr),
|
arg_format( nr),
|
||||||
|
C_instr_info->arg_type[nr] == ARITH ? "(long)" : "",
|
||||||
C_instr_info->arg_conv[nr]);
|
C_instr_info->arg_conv[nr]);
|
||||||
out( "fprint( codefile,\"");
|
out( "fprint( codefile,\"");
|
||||||
b_ptr = buf;
|
b_ptr = buf;
|
||||||
|
@ -53,8 +53,9 @@ char *arg_format( nr)
|
||||||
int nr;
|
int nr;
|
||||||
{
|
{
|
||||||
switch ( C_instr_info->arg_type[nr]) {
|
switch ( C_instr_info->arg_type[nr]) {
|
||||||
case ARITH : return( ARITH_FMT);
|
case ARITH : return( "%ld");
|
||||||
case STRING: return( "%s");
|
case STRING: return( "%s");
|
||||||
case INT : return( INT_FMT);
|
case INT : return( "%d");
|
||||||
}
|
}
|
||||||
|
/*NOTREACHED*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue