From: SourceForge.net <no...@so...> - 2007-05-07 10:57:41
|
Bugs item #1714204, was opened at 2007-05-07 13:57 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1714204&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ds390 target Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Utku Erten (uerten) Assigned to: Nobody/Anonymous (nobody) Summary: Possible loss of value in acc after return from gptrgetWord Initial Comment: Version: SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.5 #4711 (May 7 2007) (UNIX) Command line: >sdcc -mds390 --no-peep test.c Problem: In produced file test.asm, ... mov dps,#1 mov dptr,#_test_sloc1_1_0 mov dps,#0 lcall __gptrgetWord mov dps,#1 mov a,_ap ; value in A is lost! movx @dptr,a mov dps,#0 mov dps,#1 inc dptr movx @dptr,a ; which is needed here.. mov dps,#0 ... Library function gptrgetWord() returns the value in _AP and A, which will be put in a spill location in xram. When moving _AP to xram the return value in A is overwritten. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1714204&group_id=599 |