Skip to content

Commit

Permalink
Merge pull request #674 from ELENA-LANG/develop
Browse files Browse the repository at this point in the history
Iteration28 (#673)
  • Loading branch information
arakov authored Jul 19, 2024
2 parents bcfe302 + 0b5daf2 commit 6a457b6
Show file tree
Hide file tree
Showing 61 changed files with 999 additions and 320 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

BUILD_TAG: 6.2.1
BUILD_TAG: 6.2.2

permissions:
contents: read
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
## ELENA 6.3.0

- ELENA
- [ADDED] key-value expression
- [ADDED] #265 : Support enumeration list
- [ADDED] self attribute
- [ADDED] new operator $size

- ELC
- [FIXED] private constructor must be called directly
- [FIXED] accessing static fields inside a structure
- [FIXED] ppc64le : decoratorTest()

- VM

- RT

- API
- [ADDED] reusing PermVectorTable after windows are closed

- SAMPLES

- Tools
- [ADDED] #658 : new project LDBG - ELENA Debugger Adapter

- IDE

- Misc

## ELENA 6.2.0
*25.06.2024*

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.1
6.2.2
9 changes: 9 additions & 0 deletions asm/aarch64/core60.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,15 @@ inline %89h

end

// ; movn (when n < 0)
inline %989h

movz x9, __n16lo_1
movk x9, __n16hi_1, lsl #16
sxtw x9, w9

end

// ; loaddp
inline %8Ah

Expand Down
41 changes: 37 additions & 4 deletions asm/amd64/core60_win_client.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ define INVOKER 10001h

define CORE_SINGLE_CONTENT 2000Bh

define tt_stack_frame 0010h
define tt_stack_root 0028h

// INVOKER(function, arg)
// INVOKER(function, arg)
procedure % INVOKER

Expand All @@ -22,6 +22,11 @@ procedure % INVOKER
push r14
push r15

// ; check if it is a nested call
mov rsi, [data : %CORE_SINGLE_CONTENT + tt_stack_root]
test rsi, rsi
jnz labNested

// ; declare new frame
xor rdi, rdi
mov rax, rcx
Expand All @@ -30,14 +35,42 @@ procedure % INVOKER
mov rbp, rsp // ; FrameHeader

mov [data : %CORE_SINGLE_CONTENT + tt_stack_root], rsp
mov [data : %CORE_SINGLE_CONTENT + tt_stack_frame], rsp

push 0
push r8 // ; arg
// ; allocate shadow stack
sub rsp, 20h
mov rcx, rdx
mov rdx, rdi
mov r8, rdi
mov r9, rdi

call rax
add rsp, 30h // ; clear FrameHeader+args
mov rax, rbx

// ; clear root
xor ecx, ecx
mov [data : %CORE_SINGLE_CONTENT + tt_stack_root], rcx
mov [data : %CORE_SINGLE_CONTENT + tt_stack_frame], rcx

jmp labEnd

labNested:
mov rax, rcx

// ; allocate shadow stack
sub rsp, 20h
mov rcx, rdx
xor rdx, rdx
mov r8, rdx
mov r9, rdx

call rax
add rsp, 32 // ; clear FrameHeader+arg
add rsp, 20h // ; clear args
mov rax, rbx

labEnd:

// ; restore registers
pop r15
pop r14
Expand Down
22 changes: 22 additions & 0 deletions asm/x32/core60_win_client.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ define INVOKER 10001h

define CORE_SINGLE_CONTENT 2000Bh

define tt_stack_frame 0008h
define tt_stack_root 0014h

// INVOKER(function, arg)
Expand All @@ -16,19 +17,40 @@ procedure % INVOKER
push ebx
push ebp

// ; check if it is a nested call
mov ecx, [data : %CORE_SINGLE_CONTENT + tt_stack_root]
test ecx, ecx
jnz labNested

// ; declare new frame
push 0 // ; FrameHeader.previousFrame
push 0 // ; FrameHeader.reserved
mov ebp, esp // ; FrameHeader

mov [data : %CORE_SINGLE_CONTENT + tt_stack_root], esp
mov [data : %CORE_SINGLE_CONTENT + tt_stack_frame], esp

push esi // ; arg

call eax
add esp, 12 // ; clear FrameHeader+arg
mov eax, ebx

// ; clear root
xor ecx, ecx
mov [data : %CORE_SINGLE_CONTENT + tt_stack_root], ecx
mov [data : %CORE_SINGLE_CONTENT + tt_stack_frame], ecx

jmp labEnd

labNested:

push esi // ; arg
call eax
add esp, 4 // ; clear arg

labEnd:

// ; restore registers
pop ebp
pop ebx
Expand Down
Loading

0 comments on commit 6a457b6

Please sign in to comment.