Fixing arm instructions
This commit is contained in:
parent
5bd793e07e
commit
b09a06d07a
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
|||||||
compiler/config.mk
|
compiler/config.mk
|
||||||
|
compiler/build/
|
||||||
|
compiler/generated/
|
||||||
|
ifcc-test-output/
|
||||||
|
|||||||
@ -22,7 +22,11 @@ antlrcpp::Any CodeGenVisitor::visitReturn_stmt(ifccParser::Return_stmtContext *c
|
|||||||
{
|
{
|
||||||
int retval = stoi(ctx->CONST()->getText());
|
int retval = stoi(ctx->CONST()->getText());
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
std::cout << " mov w0, #"<<retval<<"\n" ;
|
||||||
|
#else
|
||||||
std::cout << " movl $"<<retval<<", %eax\n" ;
|
std::cout << " movl $"<<retval<<", %eax\n" ;
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
# these values work with the "install-antlr.sh" script provided for the PLD
|
|
||||||
ANTLRJAR=../antlr/jar/antlr-4.9.2-complete.jar
|
|
||||||
ANTLRINC=../antlr/include
|
|
||||||
ANTLRLIB=../antlr/lib/libantlr4-runtime.a
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
ANTLRJAR=/home/$(USER)/antlr4-install/antlr-4.13.2-complete.jar
|
|
||||||
ANTLRINC=/usr/local/include/antlr4-runtime/
|
|
||||||
ANTLRLIB=/usr/local/lib/libantlr4-runtime.a
|
|
||||||
3
compiler/config.example.mk
Normal file
3
compiler/config.example.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ANTLRJAR=$(shell brew --prefix antlr)/antlr-4.13.2-complete.jar
|
||||||
|
ANTLRINC=$(shell brew --prefix antlr4-cpp-runtime)/include/antlr4-runtime
|
||||||
|
ANTLRLIB=$(shell brew --prefix antlr4-cpp-runtime)/lib/libantlr4-runtime.a
|
||||||
Loading…
x
Reference in New Issue
Block a user