some fixes
This commit is contained in:
parent
8c9c04b549
commit
7e0c59d59a
3 changed files with 16 additions and 10 deletions
|
@ -413,6 +413,11 @@ C_dvf
|
||||||
"add sp,8".
|
"add sp,8".
|
||||||
default ==> arg_error("C_dvf", $1).
|
default ==> arg_error("C_dvf", $1).
|
||||||
|
|
||||||
|
C_ngf
|
||||||
|
$1 == 4 ==> "call .ngf4".
|
||||||
|
$1 == 8 ==> "call .ngf8".
|
||||||
|
default ==> arg_error("C_ngf", $1).
|
||||||
|
|
||||||
C_fif
|
C_fif
|
||||||
$1 == 4 ==> C_lor((arith)1);
|
$1 == 4 ==> C_lor((arith)1);
|
||||||
"call .fif4";
|
"call .fif4";
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
EMHOME = ../../..
|
EMHOME = ../../..
|
||||||
CEG = $(EMHOME)/lib/ceg/util
|
CEG = $(EMHOME)/lib/ceg/util
|
||||||
|
OBJ = obj
|
||||||
|
|
||||||
all:
|
all:
|
||||||
make -f $(CEG)/make_obj
|
make -f $(CEG)/make_asobj "OBJ="$(OBJ)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
make -f $(CEG)/make_obj install
|
make -f $(CEG)/make_asobj "OBJ="$(OBJ) install
|
||||||
|
|
||||||
cmp:
|
cmp:
|
||||||
-make -f $(CEG)/make_obj cmp
|
-make -f $(CEG)/make_asobj "OBJ="$(OBJ) cmp
|
||||||
|
|
||||||
pr:
|
pr:
|
||||||
@pr Makefile EM_table mach.h mach.c as_table as.h as.c
|
@pr Makefile EM_table mach.h mach.c as_table as.h as.c
|
||||||
|
@ -18,8 +19,8 @@ opr:
|
||||||
|
|
||||||
# total cleanup
|
# total cleanup
|
||||||
clean:
|
clean:
|
||||||
make -f $(CEG)/make_obj clean
|
make -f $(CEG)/make_asobj "OBJ="$(OBJ) clean
|
||||||
|
|
||||||
# only remove ce, ceg, and back directories
|
# only remove ce, ceg, and back directories
|
||||||
dclean:
|
dclean:
|
||||||
make -f $(CEG)/make_obj dclean
|
make -f $(CEG)/make_asobj "OBJ="$(OBJ) dclean
|
||||||
|
|
|
@ -68,11 +68,11 @@ struct t_operand *op;
|
||||||
* expr(reg) -> IS_MEM
|
* expr(reg) -> IS_MEM
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
char *ptr, *index();
|
char *ptr, *strindex();
|
||||||
|
|
||||||
op->type = UNKNOWN;
|
op->type = UNKNOWN;
|
||||||
if ( *last( str) == RIGHT) {
|
if ( *last( str) == RIGHT) {
|
||||||
ptr = index( str, LEFT);
|
ptr = strindex( str, LEFT);
|
||||||
*last( str) = '\0';
|
*last( str) = '\0';
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
if ( is_reg( ptr+1, op)) {
|
if ( is_reg( ptr+1, op)) {
|
||||||
|
@ -184,10 +184,10 @@ set_label( str, op)
|
||||||
char *str;
|
char *str;
|
||||||
struct t_operand *op;
|
struct t_operand *op;
|
||||||
{
|
{
|
||||||
char *ptr, *index(), *sprint();
|
char *ptr, *strindex(), *sprint();
|
||||||
static char buf[256];
|
static char buf[256];
|
||||||
|
|
||||||
ptr = index( str, '+');
|
ptr = strindex( str, '+');
|
||||||
|
|
||||||
if ( ptr == 0)
|
if ( ptr == 0)
|
||||||
op->off = "0";
|
op->off = "0";
|
||||||
|
@ -204,7 +204,7 @@ struct t_operand *op;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
op->type = IS_LABEL;
|
op->type = IS_LABEL;
|
||||||
if ( index( str, DOLLAR) != 0)
|
if ( strindex( str, DOLLAR) != 0)
|
||||||
op->lab = str;
|
op->lab = str;
|
||||||
else
|
else
|
||||||
/* nood oplossing */
|
/* nood oplossing */
|
||||||
|
|
Loading…
Reference in a new issue