git @ Cat's Eye Technologies SixtyPical / ff54a56
Update TODO Chris Pressey 6 years ago
1 changed file(s) with 15 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
00 TODO for SixtyPical
11 ===================
22
3 ### `low` and `high` address operators
3 ### 16-bit `cmp`
44
5 To turn `word` type into `byte`.
5 This is because we don't actually want `low` and `high` address operators
6 that turn `word` type into `byte`.
67
7 Trying to remember if we have a compelling case for this or now. The best I can think
8 of is for implementing 16-bit `cmp` in an efficient way. Maybe we should see if we
9 can get by with 16-bit `cmp` instead though.
8 This is because this immediately makes things harder (that is, effectively
9 impossible) to analyze.
1010
11 The problem is that once a byte is extracted, putting it back into a word is awkward.
12 The address operators have to modify a destination in a special way. That is, when
13 you say `st a, >word`, you are updating `word` to be `word & $ff | a << 8`, somelike.
14 Is that consistent with `st`? Well, probably it is, but we have to explain it.
15 It might make more sense, then, for it to be "part of the operation" instead of "part of
16 the reference"; something like `st.hi x, word`; `st.lo y, word`. Dunno.
11 16-bit `cmp` also benefits from some special differences between `cmp`
12 and `sub` on 6502, so it would be nice to capture them.
1713
1814 ### Save values to other-than-the-stack
1915
3127 Check that the buffer being read or written to through pointer, appears in appropriate
3228 inputs or outputs set.
3329
34 In the analysis, when we obtain a pointer, we need to record, in contect, what buffer
30 In the analysis, when we obtain a pointer, we need to record, in context, what buffer
3531 that pointer came from.
3632
3733 When we write through that pointer, we need to set that buffer as written.
7268 More generally, define a block as having zero or one `goto`s at the end. (and `goto`s cannot
7369 appear elsewhere.)
7470
75 If a block ends in a `call` can that be converted to end in a `goto`? Why not? I think it can.
76 The constraints should iron out the same both ways.
71 If a block ends in a `call` can that be converted to end in a `goto`? Why not? I think it can,
72 if the block is in tail position. The constraints should iron out the same both ways.
7773
7874 And - once we have this - why do we need `goto` to be in tail position, strictly?
7975 As long as the routine has consistent type context every place it exits, that should be fine.
8581 One such library routine might be an `interrupt routine` type for various architectures.
8682 Since "the supervisor" has stored values on the stack, we should be able to trash them
8783 with impunity, in such a routine.
84
85 ### Line numbers in analysis error messages
86
87 For analysis errors, there is a line number, but it's the line of the routine
88 after the routine in which the analysis error occurred. Fix this.