remove rpn module

This commit is contained in:
corey 2023-11-10 06:08:26 -06:00
parent 7b72e87df5
commit 6947204eea
2 changed files with 3 additions and 8 deletions

View File

@ -4,7 +4,7 @@
CFLAGS= -Wfatal-errors -Wall -Wextra
LDFLAGS= -s -no-pie -z noexecstack
NASMFLAGS=-Fdwarf -felf64
OBJS= str.o tok.o vec.o lex.o pnode.o reg.o mem.o state.o err.o x86_64.o run.o ir.o rpn.o gen.o
OBJS= str.o tok.o vec.o lex.o pnode.o reg.o mem.o state.o err.o x86_64.o run.o ir.o gen.o
LIB= libpar.a
TESTS_x86_64= $(notdir $(basename $(shell find tests/x86_64/ -name '*.par')))
PAR= ./par

View File

@ -3,11 +3,6 @@
#include"x86_64.h"
#include"state.h"
/*TODO:
* We have to handle child nodes within the switch
* statement. This is so that prologs/epilogs can be
* closed around dependent nodes appropriately.
*****/
void gen_x86_64_prolog(PNode*pn,FILE*file,size_t stacksize);
void gen_x86_64_epilog(PNode*pn,FILE*file);
void gen_x86_64_eval(PNode*pn,FILE*file);
@ -233,7 +228,7 @@ void gen_x86_64_prolog(PNode*pn,FILE*file,size_t stacksize)
return;
}
fprintf(file,"\tpush rbp ; prolog\n");
fprintf(file,"\tpush rbp\n");
fprintf(file,"\tmov rbp,rsp\n");
fprintf(file,"\tsub rsp,%lu\n",stacksize);
}
@ -252,7 +247,7 @@ void gen_x86_64_epilog(PNode*pn,FILE*file)
return;
}
fprintf(file,"\tmov rsp,rbp ; epilog\n");
fprintf(file,"\tmov rsp,rbp\n");
fprintf(file,"\tpop rbp\n");
}