Skip to content

Commit f7e15d1

Browse files
committed
comments on the compiler
1 parent 9e9398f commit f7e15d1

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,18 @@ resulting stack content (starting at [SP], using simulator sstm8):
275275

276276
=> first paramter starts at [SP+3], MSB first.
277277

278+
#### Register assignment
279+
280+
**return values**:
281+
8 bit values in A, 16 bit values in X, 32 bit values in Y/X (Y=MSB, X=LSB)
282+
283+
**register preservation**:
284+
Not implemented for the STM8 (yet?). For some architectures SDCC implements
285+
the possibility to mark a function that it does not effect the contents of
286+
some registers:
287+
288+
void f(void) __preserves_regs(b, c, iyl, iyh);
289+
278290

279291

280292

@@ -391,11 +403,13 @@ Multiplikation mit zwei wird nicht durch bitshift ersetzt (besonders beim
391403
Arrayzugriff absurd)
392404

393405
Fehlende Features:
406+
- _ _preserves_regs() function attribute not supported
394407
- _ _attribute_ _((weak))
395-
- _ _critical{} erzeugt sim/rim statt push cc,sim/pop cc
396-
- dead code elimination: Verbietet es, const-Tabellen anzulegen und fordert
397-
"#define" für alles.
398-
408+
- _ _critical{} generates sim/rim instead of push cc,sim/pop cc
409+
- dead code elimination: Does not recognize tables of const values. Using a
410+
const table would still pull in the whole object file, even when all
411+
accesses to the table have been eleminated by the optimizer. Only way out
412+
is to use `#define` statements instead.
399413

400414

401415
## ST Standard Library

0 commit comments

Comments
 (0)