Skip to content

Commit

Permalink
fixing Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
arakov committed Jan 30, 2017
1 parent 1abaf32 commit 4757812
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 29 deletions.
2 changes: 1 addition & 1 deletion elenasrc2/elc/codeblocks/elc_lnx32.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Option parameters="-c/home/alex/elena-lang/src30/system/system.project" />
<Option parameters="-c/home/alex/elena-lang/examples/console/helloworld/u_helloworld.project" />
<Compiler>
<Add option="-g" />
</Compiler>
Expand Down
4 changes: 2 additions & 2 deletions elenasrc2/elc/linux32/elc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ void _ELC_::Project :: cleanUp()
// remove module
path.copy(rootPath.c_str());
_loader.nameToPath(ns, path, "nl");
//_wremove(path);
remove(path);

// remove debug module
path.copy(rootPath.c_str());
_loader.nameToPath(ns, path, "dnl");
//_wremove(path);
remove(path);
}
}

Expand Down
6 changes: 3 additions & 3 deletions elenasrc2/elc/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ void Project :: loadPrimitiveCategory(_ConfigFile& config, path_t path)
}
}

void Project :: loadSourceCategory(_ConfigFile& config)
void Project :: loadSourceCategory(_ConfigFile& config, path_t path)
{
_ConfigFile::Nodes nodes;
if (readCategory(config, opSources, nodes)) {
for (_ConfigFile::Nodes::Iterator it = nodes.start(); !it.Eof(); it++) {
if (emptystr((*it).Content())) {
// add path if provided
Path filePath(it.key());
Path filePath(/*path, */it.key());

addSource(filePath.c_str());
}
Expand Down Expand Up @@ -255,7 +255,7 @@ void Project :: loadConfig(_ConfigFile& config, path_t configPath)
loadTargetCategory(config);

// load sources
loadSourceCategory(config);
loadSourceCategory(config, configPath);

// load forwards
loadForwardCategory(config);
Expand Down
4 changes: 2 additions & 2 deletions elenasrc2/elc/project.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Project : public _ProjectManager
bool loadPathOption(_ConfigFile& config, ProjectSetting setting, path_t path);

void loadCategory(_ConfigFile& config, ProjectSetting setting, path_t configPath);
void loadSourceCategory(_ConfigFile& config);
void loadSourceCategory(_ConfigFile& config, path_t path);
void loadPrimitiveCategory(_ConfigFile& config, path_t configPath);
void loadForwardCategory(_ConfigFile& config);
void loadTargetCategory(_ConfigFile& config);
Expand Down Expand Up @@ -162,7 +162,7 @@ class Project : public _ProjectManager

_loader.setRootPath(libPath.c_str());
}

// if package is set we need to set the loader package as well
Path outputPath(StrSetting(opProjectPath), StrSetting(opOutputPath));

Expand Down
38 changes: 19 additions & 19 deletions elenasrc2/tools/asm2bin/amd64assembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ AMD64Assembler::Operand AMD64Assembler :: readPtrOperand(TokenInfo& token, Proce
// return operand;
// }

return OperandType::otUnknown; // !! temporal
return AMD64Helper::otUnknown; // !! temporal
}

AMD64Assembler::Operand AMD64Assembler:: compileOperand(TokenInfo& token, ProcedureInfo& info/*, _Module* binary*/, const char* err)
Expand Down Expand Up @@ -1210,7 +1210,7 @@ void AMD64Assembler :: compileSUB(TokenInfo& token, ProcedureInfo& info, MemoryW
//}
//
//void x86Assembler :: compileSUBSS(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
//{
// // Opcode: F3 0F 5C /r
// // Mnemonic: SUBSS xmm1, xmm2/m32
// // f3 0f 5c ca -- subss xmm1, xmm2
Expand Down Expand Up @@ -2126,7 +2126,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
// // 66 0f e0 ca -- pavgb xmm1, xmm2
// // 66 0f e0 08 -- pavgb xmm1, XMMWORD PTR[eax]
//
// // Opcode: 0F E0 /r
// // Opcode: 0F E0 /r
// // Mnemonic : PAVGB mm1, mm2/m64
// // 0f e0 c8 -- pavgb mm1, mm0
// // 0f e0 08 -- pavgb mm1, QWORD PTR [eax]
Expand Down Expand Up @@ -2156,7 +2156,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
// // 66 0f e3 ca -- pavgw xmm1, xmm2
// // 66 0f e3 08 -- pavgw xmm1, XMMWORD PTR[eax]
//
// // Opcode: 0F E0 /r
// // Opcode: 0F E0 /r
// // Mnemonic : PAVGW mm1, mm2/m64
// // 0f e3 c8 -- pavgw mm1, mm0
// // 0f e3 08 -- pavgw mm1, QWORD PTR [eax]
Expand Down Expand Up @@ -2186,7 +2186,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
// // 66 0f e3 ca -- psadbw xmm1, xmm2
// // 66 0f e3 08 -- psadbw xmm1, XMMWORD PTR[eax]
//
// // Opcode: 0F F6 /r
// // Opcode: 0F F6 /r
// // Mnemonic : psadbw mm1, mm2/m64
// // 0f e3 c8 -- psadbw mm1, mm0
// // 0f e3 08 -- psadbw mm1, QWORD PTR [eax]
Expand All @@ -2209,8 +2209,8 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
// else token.raiseErr("Invalid command (%d)");
//}
//
//void x86Assembler::compilePEXTRW(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
//void x86Assembler::compilePEXTRW(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 66 0F C5 /r ib
// // Mnemonic: pextrw r32, xmm, imm8
// // 66 0f c5 c1 03 -- pextrw eax,xmm1,3
Expand Down Expand Up @@ -2249,7 +2249,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//{
// // Opcode: 0F C4 /r ib
// // Mnemonic: pinsrw mm, r32/m16, imm8
// // 0f c4 c0 03 -- pinsrw mm0, eax, 3
// // 0f c4 c0 03 -- pinsrw mm0, eax, 3
// // 0f c4 08 03 -- pinsrw mm1, WORD PTR [eax], 3
// // 0f c4 c8 03 -- pinsrw mm1, eax, 3
//
Expand Down Expand Up @@ -2287,7 +2287,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePMAXSW(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F EE /r
// // Opcode: 0F EE /r
// // Mnemonic : pmaxsw mm1, mm2/m64
// // 0f ee c8 -- pmaxsw mm1, mm0
// // 0f ee 08 -- pmaxsw mm1, QWORD PTR [eax]
Expand Down Expand Up @@ -2317,7 +2317,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePMAXUB(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F DE /r
// // Opcode: 0F DE /r
// // Mnemonic : pmaxub mm1, mm2/m64
// // 0f de c8 -- pmaxub mm1, mm0
// // 0f de 08 -- pmaxub mm1, QWORD PTR [eax]
Expand Down Expand Up @@ -2347,7 +2347,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePMINSW(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F EA /r
// // Opcode: 0F EA /r
// // Mnemonic : pminsw mm1, mm2/m64
// // 0f ea c8 -- pminsw mm1, mm0
// // 0f ea 08 -- pminsw mm1, QWORD PTR [eax]
Expand Down Expand Up @@ -2377,7 +2377,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePMINUB(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F DA /r
// // Opcode: 0F DA /r
// // Mnemonic : pminub mm1, mm2/m64
// // 0f da c8 -- pminub mm1, mm0
// // 0f da 08 -- pminub mm1, QWORD PTR [eax]
Expand Down Expand Up @@ -2407,7 +2407,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePMOVMSKB(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F D7 /r
// // Opcode: 0F D7 /r
// // Mnemonic: pmovmskb r32, mm
// // 0f d7 c0 -- pmovmskb eax, mm0
//
Expand Down Expand Up @@ -2435,7 +2435,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePMULHUW(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F E4 /r
// // Opcode: 0F E4 /r
// // Mnemonic: pmulhuw mm1, mm2/m64
// // 0f e4 c1 -- pmulhuw mm0, mm1
// // 0f e4 00 -- pmulhuw mm0, QWORD PTR [eax]
Expand Down Expand Up @@ -2465,7 +2465,7 @@ void AMD64Assembler :: compileRET(TokenInfo& token, ProcedureInfo& info, MemoryW
//
//void x86Assembler::compilePSHUFW(TokenInfo& token, ProcedureInfo& info, MemoryWriter* code)
//{
// // Opcode: 0F 70 /r ib
// // Opcode: 0F 70 /r ib
// // Mnemonic: pshufw mm1, mm2/m64, imm8
// // 0f 70 c1 32 -- pshufw mm0, mm1, 50
// // 0f 70 00 32 -- pshufw mm0, QWORD PTR [eax], 50
Expand Down Expand Up @@ -3277,7 +3277,7 @@ void AMD64Assembler :: compileCALL(TokenInfo& token, ProcedureInfo& info, Memory
// // f3 0f c2 ca 00 -- cmpss xmm1, xmm2, 0 -- this instruction is the same of: CMPEQSS xmm1, xmm2
// // f3 0f c2 ca 01 -- cmpss xmm1, xmm2, 1 -- this instruction is the same of: CMPLTSS xmm1, xmm2
// // f3 0f c2 ca 02 -- cmpss xmm1, xmm2, 2 -- this instruction is the same of: CMPLESS xmm1, xmm2
// // f3 0f c2 ca 03 -- cmpss xmm1, xmm2, 3 -- this instruction is the same of: CMPUNORDSS xmm1, xmm2
// // f3 0f c2 ca 03 -- cmpss xmm1, xmm2, 3 -- this instruction is the same of: CMPUNORDSS xmm1, xmm2
// // f3 0f c2 ca 04 -- cmpss xmm1, xmm2, 4 -- this instruction is the same of: CMPNEQSS xmm1, xmm2
// // f3 0f c2 ca 05 -- cmpss xmm1, xmm2, 5 -- this instruction is the same of: CMPNLTSS xmm1, xmm2
// // f3 0f c2 ca 06 -- cmpss xmm1, xmm2, 6 -- this instruction is the same of: CMPNLESS xmm1, xmm2
Expand Down Expand Up @@ -3309,7 +3309,7 @@ void AMD64Assembler :: compileCALL(TokenInfo& token, ProcedureInfo& info, Memory
// // 0f c2 ca 00 -- cmpps xmm1, xmm2, 0 -- this instruction is the same of: CMPEQPS xmm1, xmm2
// // 0f c2 ca 01 -- cmpps xmm1, xmm2, 1 -- this instruction is the same of: CMPLTPS xmm1, xmm2
// // 0f c2 ca 02 -- cmpps xmm1, xmm2, 2 -- this instruction is the same of: CMPLEPS xmm1, xmm2
// // 0f c2 ca 03 -- cmpps xmm1, xmm2, 3 -- this instruction is the same of: CMPUNORDPS xmm1, xmm2
// // 0f c2 ca 03 -- cmpps xmm1, xmm2, 3 -- this instruction is the same of: CMPUNORDPS xmm1, xmm2
// // 0f c2 ca 04 -- cmpps xmm1, xmm2, 4 -- this instruction is the same of: CMPNEQPS xmm1, xmm2
// // 0f c2 ca 05 -- cmpps xmm1, xmm2, 5 -- this instruction is the same of: CMPNLTPS xmm1, xmm2
// // 0f c2 ca 06 -- cmpps xmm1, xmm2, 6 -- this instruction is the same of: CMPNLEPS xmm1, xmm2
Expand Down Expand Up @@ -4189,7 +4189,7 @@ bool AMD64Assembler :: compileCommandS(TokenInfo& token, ProcedureInfo& info, Me
// prefix.clear();
// return true;
// }
//
//
// // SSE instructions
// else if (token.check("xorps")) {
// compileXORPS(token, info, &writer);
Expand Down Expand Up @@ -4368,7 +4368,7 @@ void AMD64Assembler :: compile(TextReader* source, path_t outputPath)
}
else if (token.check("inline")) {
compileProcedure(token, &binary, false, false);

token.read();
}
// else if (token.check("structure")) {
Expand Down
4 changes: 4 additions & 0 deletions elenasrc2/tools/asm2bin/codeblocks/asm2bin_lnx.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
<Option link="1" />
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="../../../engine/amd64helper.cpp" />
<Unit filename="../../../engine/amd64helper.h" />
<Unit filename="../../../engine/bytecode.cpp" />
<Unit filename="../../../engine/bytecode.h" />
<Unit filename="../../../engine/elena.h">
Expand All @@ -111,6 +113,8 @@
<Unit filename="../../../engine/x86helper.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="../amd64assembler.cpp" />
<Unit filename="../amd64assembler.h" />
<Unit filename="../asm2binx.cpp" />
<Unit filename="../assembler.h">
<Option compile="1" />
Expand Down
Empty file modified rebuild_examples.script
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions src30/system/lnx32_app.l
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@

// --- startUp ---

#class StartUpEvents
#class $StartUpEvents
{
#field theFinializeEvent.

#method set &onAppEnd:aHandle
[
($nil == theFinializeEvent)
? [ theFinializeEvent := aHandle. ]
! [ theFinializeEvent := Function1Group new &args:theFinializeEvent:aHandle. ].
! [ theFinializeEvent := Function1Group new &args:(theFinializeEvent,aHandle). ].
]

#method $onStop : arg
Expand Down

0 comments on commit 4757812

Please sign in to comment.