Skip to content

Commit

Permalink
Merge pull request #576 from ELENA-LANG/develop
Browse files Browse the repository at this point in the history
Iteration15 (#575)
  • Loading branch information
arakov authored May 30, 2023
2 parents 1b5dc6d + e289580 commit 6ad7186
Show file tree
Hide file tree
Showing 227 changed files with 10,773 additions and 3,849 deletions.
17 changes: 17 additions & 0 deletions .github/workflow/ci_i386.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Build
run: make all_i386
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## ELENA 6.0.2b
*31.03.2023*

- ELENA
- fixing a critical error with long number comparision operations
- (re)implementing Script Engine (elenasm60 dll)
Expand Down
211 changes: 209 additions & 2 deletions asm/aarch64/core60.asm
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,22 @@ inline % 1Ch

end

// ; xload
inline %1Dh

add x12, x10, __arg12_1
ldrsw x9, [x12]

end

// ; xlload
inline %1Eh

add x12, x10, __arg12_1
ldr x9, [x12]

end

// ; coalesce
inline % 20h

Expand Down Expand Up @@ -800,6 +816,50 @@ inline %02Fh

end

// ; fabsdp
inline %78h

add x19, x29, __arg12_1
ldr d18, [x0]
fabs d18, d18
str d18, [x19]

end

// ; fsqrtdp
inline %79h

add x19, x29, __arg12_1
ldr d18, [x0]
fsqrt d18, d18
str d18, [x19]

end

// ; fexp
inline %07Ah
end

// ; fln
inline %07Bh
end

// ; fsin
inline %07Ch
end

// ; fcos
inline %07Dh
end

// ; farchtan
inline %07Eh
end

// ; fpi
inline %07Fh
end

// ; setr
inline %80h

Expand Down Expand Up @@ -1007,15 +1067,15 @@ inline %8Dh

end

// ; peekfi
// ; setfi
// ; NOTE : it is presumed that arg1 < 0 (it is inverted in jitcompiler)
inline %08Eh

sub x10, x29, -__arg12_1

end

// ; peekfi
// ; setfi
// ; NOTE : it is presumed that arg1 > 0 (it is inverted in jitcompiler)
inline %58Eh

Expand Down Expand Up @@ -1263,6 +1323,44 @@ inline %9Ch

end

// ; xadddp
inline %9Dh

add x11, x29, __arg12_1
ldrsw x12, [x11]
add x9, x9, x12

end

// ; xsetfi
// ; NOTE : it is presumed that arg1 < 0 (it is inverted in jitcompiler)
inline %09Eh

lsl x14, x9, #3
sub x10, x29, -__arg12_1
sub x10, x10, x14

end

// ; xsetfi
// ; NOTE : it is presumed that arg1 > 0 (it is inverted in jitcompiler)
inline %59Eh

lsl x14, x9, #3
add x10, x29, __arg12_1
add x10, x10, x14

end
// ; frounddp
inline %9Fh

add x19, x29, __arg12_1
ldr d18, [x0]
frintn d18, d18
str d18, [x19]

end

// ; saveddp
inline %0A0h

Expand Down Expand Up @@ -1492,6 +1590,47 @@ inline %0ACh

end

// ; xfillr
inline % 0ADh

ldr w11, [x0]
lsl x11, x11, #3

movz x12, __ptr32lo_1
movk x12, __ptr32hi_1, lsl #16
mov x13, x10

labLoop:
cmp x11, 0
beq labEnd
sub x11, x11, 8
str x12, [x13], #8
b labLoop

labEnd:

end

// ; xfillr 0
inline % 1ADh

ldr w11, [x0]
lsl x11, x11, #3

movz x12, #0
mov x13, x10

labLoop:
cmp x11, 0
beq labEnd
sub x11, x11, 8
str x12, [x13], #8
b labLoop

labEnd:

end

// ; callr
inline %0B0h

Expand Down Expand Up @@ -1879,6 +2018,20 @@ inline %0D3h

end

// ; udivndp
inline %0D4h

add x19, x29, __arg12_1

ldr w17, [x0]
ldr w18, [x19]

udiv x18, x18, x17 // ; sp[0] / temp

str w18, [x19]

end

// ; ianddpn
inline %0D8h

Expand Down Expand Up @@ -2211,6 +2364,22 @@ inline %4DDh

end

// ; selultrr
inline %0DFh

ldrsw x17, [x0]
ldrsw x18, [x10]
cmp x17, x18

movz x11, __ptr32lo_1
movz x12, __ptr32lo_2
movk x11, __ptr32hi_1, lsl #16
movk x12, __ptr32hi_2, lsl #16

csel x10, x11, x12, cc

end

// ; copydpn
inline %0E0h

Expand Down Expand Up @@ -3099,6 +3268,44 @@ inline %0F7h

end

// ; fillir
inline %0F8h

movz x12, __ptr32lo_2
movk x12, __ptr32hi_2, lsl #16

mov x11, __arg12_1
mov x13, x10

labLoop:
cmp x11, 0
beq labEnd
sub x11, x11, 1
str x12, [x13], #8
b labLoop

labEnd:

end

// ; fill i,0
inline %1F8h

mov x11, __arg12_1
mov x12, 0
mov x13, x10

labLoop:
cmp x11, 0
beq labEnd
sub x11, x11, 1
str x12, [x13], #8
b labLoop

labEnd:

end

// ; xstorefir
inline %0F9h

Expand Down
Loading

0 comments on commit 6ad7186

Please sign in to comment.