Hardware 版 (精华区)
发信人: edmcgy (达达尼), 信区: Hardware
标 题: DSP(Data Signal Processor)的应用(12)
发信站: 紫 丁 香 (Thu Apr 23 15:31:48 1998), 转信
Workaround/Solution
WORKAROUND/SOLUTION
===================
None specified at this time. Will fix next release.
Title: Compiler generate incorrect code for access of ioport symbol
Bug #
Tool
Version
Fixed?
SDSsq02337
Compiler
V6.60
Fixed, will appear in next release.
Bug Description
BUG DESCRIPTION
===============
The compiler "tracks" values in the accumulator, so that it detect cases
where a memory value is already in the accumulator and therefore doesn't
need to be loaded. For example:
a = b + c; /* result ends up in accumulator and 'a' */
d = a; /* instead of loading 'a', copy accumulator to 'd' */
When an assignment from a I/O port is made:
a = port5;
the compiler fails to note that 'a' should no longer be tracked in the accumu-
lator. So, for instance
a = b + c; /* result ends up in accumulator and 'a' */
a = port5; /* 'a' is overwritten, but compiler still tracks 'a' */
/* in the accumulator */
call(a); /* BUG! Instead of loading 'a' from memory, copies */
/* the accumulator to the stack instead */
--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: edmcgy.hit.edu.c]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:7.282毫秒