Skip to content

Commit

Permalink
mecrisp-stellaris-ra-0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean Jonethal committed Oct 26, 2015
1 parent dc7d295 commit 1bd02d9
Show file tree
Hide file tree
Showing 24 changed files with 3,686 additions and 2,775 deletions.
2 changes: 1 addition & 1 deletion README-RA
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It should look and feel like the mainstream Mecrisp-Stellaris,
but with a very important difference:

This time, it contains an analytical compiler which keeps track
of the top three stack elements and maps them to registers
of the top five stack elements and maps them to registers
whenever possible.

Five targets are available:
Expand Down
5 changes: 5 additions & 0 deletions common/disassembler-m3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@

$EA5F0676 of ." rors r6 r6 #1" endof

$F8470D04 of ." str r0 [ r7 #-4 ]!" endof
$F8471D04 of ." str r1 [ r7 #-4 ]!" endof
$F8472D04 of ." str r2 [ r7 #-4 ]!" endof
$F8473D04 of ." str r3 [ r7 #-4 ]!" endof
$F8476D04 of ." str r6 [ r7 #-4 ]!" endof

$F8576026 of ." ldr r6 [ r7 r6 lsl #2 ]" endof
$F85D6C08 of ." ldr r6 [ sp #-8 ]" endof

Expand Down
22 changes: 15 additions & 7 deletions common/sine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,29 @@ decimal

: 2rshift 0 ?do d2/ loop ;

: cordic ( f-angle -- f-error f-sine f-cosine )
( Angle between -Pi/2 and +Pi/2 ! )
0 0 $9B74EDA8 0
32 0 do
2rot dup 0<
if
: cordic-erster-teil
i e^ka 0 d+ 2rot 2rot
2over i 2rshift 2rot 2rot
2swap 2over i 2rshift
d- 2rot 2rot d+
else
;

: cordic-zweiter-teil
i e^ka 0 d- 2rot 2rot
2over i 2rshift 2rot 2rot
2swap 2over i 2rshift
d+ 2rot 2rot 2swap d-
;

: cordic ( f-angle -- f-error f-sine f-cosine )
( Angle between -Pi/2 and +Pi/2 ! )
0 0 $9B74EDA8 0
32 0 do
2rot dup 0<
if
cordic-erster-teil
else
cordic-zweiter-teil
then
loop
2-foldable ;
Expand Down
Binary file modified kl25z128-ra/mecrisp-stellaris-kl25z128.bin
Binary file not shown.
Loading

0 comments on commit 1bd02d9

Please sign in to comment.