diff options
author | Camil Staps | 2016-11-08 22:27:41 +0100 |
---|---|---|
committer | Camil Staps | 2016-11-08 22:27:41 +0100 |
commit | 4d3a5d107d458f569276c008af4de51355c90771 (patch) | |
tree | d7303b6685eef2eb87a7d1043d67d65487503023 | |
parent | Log: problem with division / modulo (diff) |
Log 2016-11-08
-rw-r--r-- | log.md | 68 |
1 files changed, 68 insertions, 0 deletions
@@ -360,3 +360,71 @@ rts `08f4cf8`). AP. I still need to look at records, unboxed lists, uniqueness, and possibly other things. Apart from that, all small examples in the Clean distribution seem to work. + +### 2016-11-08 + +Tackled several problems: + +- cg `6ad63a4` fixes an issue where the offset added to `pc` was incorrect in + `_system.s`, `e_60` (caused issues with hof). +- cg `59e9272` ensures that code addresses stored in data sections have the LSB + set for Thumb mode, which solves an issue with hof. For example (`twice.s`): + + ```armasm + .long dTwice_P1+2 + dTwice_P1: + .hword 0 + .hword 16 + .long yet_args_needed_0+1 @ here + .hword 1 + .hword 8 + .long lTwice_P1+1 @ here + .hword 2 + .hword 0 + .hword 0 + .hword 2 + .long m__twice+1 @ here + ``` + +- cg `f64b035` ensures that the jump to the `ea*` label right before the `l*` + entry is in fact exactly 8 bytes before that label, as is assumed in + `thumb2ap.s`(?). Example affected code (`twice.s`): + + ```armasm + b.w eaTwice_P1 @ The .w ensures a wide instruction + nop.w + lTwice_P1: + ldr r7,[r7,#4] + eaTwice_P1: + ldr r12,[r7] + ``` + +- Cleaned up `thumb2{ap,divmod,startup}.s` in rts (`3e5b585`, `70a575a`): don't + `orr lr,lr,#1` before `mov lr,pc` and `ldr pc,[sp],#4` directly instead of + through `lr`. This caused alignment issues in `thumb2divmod.s` that are fixed + now, but it should be **noted** that this file is very sensitive to + alignment. + +- Fixed an issue with the `pascal.icl` example program, where the argument to + `toString` was not strict, causing problems with its instance for `Int` + (i.e., no changes for cg or rts) (tests `00310d6`). + +All in all, some higher order functions now work: + +```clean +Start = map toReal (fromto 1 10) +Start = app plus 1 2 +where + app f a b = f a b + plus a b = a + b +``` + +However, `twice.icl` and `stwice.icl` still segfault. + +**Status** of the example programs: + +- `copyfile.icl`: not looked into yet. +- `reverse.icl`, `revtwice.icl`, `sieve.icl`: require `StdEnum` for `..` + notation, which is hard to test in my current setup. +- `stwice.icl`, `twice.icl`: broken (segfault). +- All others work fine. |